/* Crossroads client portal. Same look as the website: cyan on asphalt black,
   Chakra Petch italic caps, road-sign cut corners, dashed lane lines, diamond markers. */
:root {
  --ink: #0B0E10;
  --ink2: #12191C;
  --ink3: #1B2428;
  --line: #2A3439;
  --line2: #3A474D;
  --paper: #EEF2F2;
  --text: #EEF2F3;
  --text2: #B9C5CA;
  --muted: #84939A;
  --cyan: #5BE0E6;
  --cyan2: #3FC9D0;
  --cyan-ink: #04282A;
  --teal: #0A7D84;
  --danger: #FF7A6B;
  --warn: #F2C55B;
  --display: 'Chakra Petch', 'Barlow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, sans-serif;
  --cut: 12px;
  --nav-h: 70px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ink); }
body { margin: 0; min-height: 100vh; background: var(--ink); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cyan); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.wm { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 22px; letter-spacing: 1.5px; color: var(--cyan); line-height: 1; }
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ''; width: 8px; height: 8px; background: var(--muted); transform: rotate(45deg); }
.h1 { margin: 4px 0 0; font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: 34px; line-height: 1; letter-spacing: -.3px; }
.h1 em, .h2 em { font-style: italic; color: var(--cyan); }
.lede { margin: 10px 0 0; color: var(--text2); font-size: 15px; }
.h2 { margin: 0; display: flex; align-items: center; gap: 12px; font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: 17px; letter-spacing: .6px; }
.h2.lane::after { content: ''; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--line2) 0 14px, transparent 14px 24px); }
.step { width: 24px; height: 24px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--cyan); color: var(--cyan-ink); font-size: 13px; clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.muted { color: var(--muted); }
.soft { color: var(--text2); }
.cyan { color: var(--cyan); }
.price { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 20px; color: var(--cyan); white-space: nowrap; }
.price s { color: var(--muted); font-size: 14px; margin-right: 4px; font-weight: 600; }

/* ---------- Layout ---------- */
.shell { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px; background: rgba(11,14,16,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; flex-direction: column; gap: 5px; text-decoration: none; background: none; border: 0; padding: 0; text-align: left; }
.brand small { font-family: var(--display); font-weight: 600; font-size: 10px; letter-spacing: 3.2px; color: var(--muted); text-transform: uppercase; line-height: 1; }
.avatar { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line2); background: var(--ink3); color: var(--cyan); font-family: var(--display); font-style: italic; font-weight: 700; font-size: 16px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%); }
.page { padding: 20px 18px calc(var(--nav-h) + 40px + var(--safe-b)); display: flex; flex-direction: column; gap: 22px; }
.page.has-bar { padding-bottom: calc(var(--nav-h) + 170px + var(--safe-b)); }
.sec { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Cut-corner panels (border follows the cut) ---------- */
.panel { --bd: var(--line); --bg: var(--ink2); --c: var(--cut); position: relative; isolation: isolate; padding: 16px; background: var(--bd);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%); }
.panel::before { content: ''; position: absolute; inset: 1px; z-index: -1; background: var(--bg);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--c) + .4px), calc(100% - var(--c) + .4px) 100%, 0 100%); }
.panel.on { --bd: var(--cyan); --bg: #0F2326; }
.panel.on::before { inset: 1.5px; }
button.panel { width: 100%; border: 0; color: inherit; text-align: left; }
.panel.flat { --bd: var(--line); --bg: var(--ink); }

/* ---------- Buttons ---------- */
.btn { --bg: var(--ink3); --fg: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; background: var(--bg); color: var(--fg); font-family: var(--display); font-style: italic; font-weight: 700; font-size: 15px; letter-spacing: .6px; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); transition: filter .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn:hover { filter: brightness(1.12); }
.btn.primary { --bg: var(--cyan); --fg: var(--cyan-ink); }
.btn.ghost { --bg: transparent; box-shadow: inset 0 0 0 1px var(--line2); }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.btn.danger { --fg: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.link { background: none; border: 0; padding: 4px 0; color: var(--cyan); font-family: var(--display); font-weight: 700; font-style: italic; text-transform: uppercase; letter-spacing: .5px; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text2); letter-spacing: .2px; }
.field input, .field textarea, .field select { width: 100%; min-height: 50px; padding: 12px 14px; background: var(--ink2); border: 1px solid var(--line2); border-radius: 0; color: var(--text); font-size: 17px; font-weight: 500; outline: none; -webkit-appearance: none; appearance: none; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--cyan); }
.field input[type=date] { color-scheme: dark; }
.code-in { text-align: center; letter-spacing: 8px; font-family: var(--display) !important; font-weight: 700 !important; font-size: 28px !important; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button, .chip { min-height: 42px; padding: 0 14px; border: 1px solid var(--line2); background: var(--ink2); color: var(--text2); font-weight: 600; font-size: 14px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%); }
.seg button.on, .chip.on { background: var(--cyan); border-color: var(--cyan); color: var(--cyan-ink); }
.chip:disabled { opacity: .35; }
.radio { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--line2); background: var(--paper); display: flex; align-items: center; justify-content: center; }
.radio.on { border-color: var(--cyan); background: var(--ink); }
.radio.on::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); }
.box { width: 22px; height: 22px; flex-shrink: 0; border: 2px solid var(--line2); background: var(--ink); display: flex; align-items: center; justify-content: center; color: var(--cyan-ink); }
.box.on { background: var(--cyan); border-color: var(--cyan); }

/* ---------- Option cards (vehicle / service pickers) ---------- */
.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.opt b, .title { font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: 17px; line-height: 1.15; display: block; }
.opt .desc { display: block; font-size: 13.5px; color: var(--text2); margin-top: 2px; line-height: 1.35; }
.tag { display: inline-block; padding: 3px 10px; background: var(--cyan); color: var(--cyan-ink); font-family: var(--display); font-style: italic; font-weight: 700; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.tag.ghost { background: var(--ink3); color: var(--text2); }
.tag.warn { background: var(--warn); color: #2a1f00; }
.tag.red { background: #3a1d1a; color: var(--danger); }
.list { display: flex; flex-direction: column; gap: 10px; }
details.more { border-top: 1px solid var(--line); }
details.more > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 2px; cursor: pointer; font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: 15px; letter-spacing: .4px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .chev { margin-left: auto; transition: transform .2s; color: var(--muted); }
details.more[open] > summary .chev { transform: rotate(180deg); }
details.more > .list { padding-bottom: 14px; }
.note { padding: 12px 14px; background: #0F2326; border-left: 3px solid var(--cyan); font-size: 14px; color: var(--text2); }
.note.err { background: #2a1513; border-color: var(--danger); color: #ffd3cd; }
.note.warn { background: #2a2210; border-color: var(--warn); color: #f7e3b0; }

/* ---------- Home ---------- */
.clubcard { position: relative; padding: 20px; background: linear-gradient(120deg, var(--cyan) 0%, var(--cyan2) 100%); color: var(--cyan-ink); border: 0; width: 100%; text-align: left; display: flex; align-items: center; gap: 16px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%); }
.clubcard small { display: block; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; opacity: .8; }
.clubcard b { display: block; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 30px; line-height: 1.05; text-transform: uppercase; margin: 4px 0; }
.clubcard span { font-size: 14px; font-weight: 600; }
.ring { width: 76px; height: 76px; flex-shrink: 0; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 26px; font-style: normal; }
.visit { display: flex; gap: 14px; align-items: flex-start; }
.datebox { width: 58px; flex-shrink: 0; padding: 8px 0; background: var(--cyan); color: var(--cyan-ink); text-align: center; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); }
.datebox b { display: block; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; }
.datebox small { display: block; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.datebox.muted { background: var(--ink3); color: var(--text2); }
.visit .title { font-size: 19px; }
.scroller { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 18px; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; flex: 0 0 148px; }
.qcar { display: flex; flex-direction: column; gap: 6px; min-height: 150px; }
.qcar .title { font-size: 16px; }
.qcar .link { margin-top: auto; font-size: 13px; }
.qadd { --bg: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: 14px; }
.promo { padding: 20px; background: var(--paper); color: #0D1417; border: 0; width: 100%; text-align: left; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%); }
.promo small { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--teal); }
.promo b { display: block; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 26px; line-height: 1.05; text-transform: uppercase; margin: 4px 0 6px; }
.promo span { font-size: 14px; color: #3D4A50; }
.offer { padding: 14px 16px; background: #0F2326; border: 1px dashed var(--cyan); display: flex; flex-direction: column; gap: 4px; }
.offer b { font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: 16px; }

/* ---------- Rewards ---------- */
.member { --bg: linear-gradient(160deg, #15292C 0%, var(--ink2) 55%); padding: 20px; }
.member::before { background: linear-gradient(160deg, #15292C 0%, var(--ink2) 55%); }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin: 18px 0 14px; }
.stamp { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line2); color: var(--line2); font-family: var(--display); font-style: italic; font-weight: 700; font-size: 18px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.stamp.on { background: var(--cyan); border-color: var(--cyan); color: var(--cyan-ink); }
.stamp.free { border: 1.5px solid var(--cyan); color: var(--cyan); font-size: 13px; letter-spacing: .5px; }
.stamp.free.on { color: var(--cyan-ink); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-top: 3px solid var(--cyan); }
.plan small { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text2); }
.plan .big { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 30px; color: var(--cyan); line-height: 1; }
.plan .big small { font-size: 14px; letter-spacing: 0; color: var(--muted); text-transform: none; }
.plan p { margin: 0; font-size: 13px; color: var(--text2); line-height: 1.35; flex: 1; }

/* ---------- Visits ---------- */
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 15px; }
.kv dt { color: var(--muted); font-size: 13px; padding-top: 2px; }
.kv dd { margin: 0; }
.lines { display: flex; flex-direction: column; gap: 6px; }
.lines .between { font-size: 15px; }
.total { border-top: 1px dashed var(--line2); padding-top: 10px; margin-top: 4px; }

/* ---------- Bottom nav ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.nav-in { max-width: 560px; margin: 0 auto; height: var(--nav-h); display: grid; grid-template-columns: repeat(5, 1fr); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-decoration: none; color: var(--muted); font-family: var(--display); font-style: italic; font-weight: 700; font-size: 11.5px; letter-spacing: .8px; text-transform: uppercase; }
.nav a.on { color: var(--cyan); }
.nav a.fab span.ic { width: 52px; height: 52px; margin-top: -26px; display: flex; align-items: center; justify-content: center; background: var(--cyan); color: var(--cyan-ink); box-shadow: 0 6px 20px rgba(91,224,230,.25);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%); }
.nav a.fab { color: var(--cyan); }

/* ---------- Booking total bar ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 25; background: var(--ink2); border-top: 1px solid var(--line2); }
.bar-in { max-width: 560px; margin: 0 auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; }
.bar .amt { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 30px; color: var(--cyan); line-height: 1; }

/* ---------- Sign in ---------- */
.auth { min-height: 100vh; max-width: 440px; margin: 0 auto; padding: calc(40px + env(safe-area-inset-top, 0px)) 22px 40px; display: flex; flex-direction: column; gap: 22px; }
.auth .wm { font-size: 30px; }
.auth .lanes { height: 2px; background: repeating-linear-gradient(90deg, var(--line2) 0 14px, transparent 14px 24px); }
.perks { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.perks li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--text2); }
.perks li i { width: 9px; height: 9px; background: var(--cyan); transform: rotate(45deg); flex-shrink: 0; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + var(--safe-b)); z-index: 60; transform: translateX(-50%); max-width: calc(100% - 36px); padding: 12px 18px; background: var(--paper); color: #0D1417; font-weight: 600; font-size: 15px; box-shadow: 0 8px 30px rgba(0,0,0,.5);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%); animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } }
.empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 15px; }
.demo { background: var(--warn); color: #2a1f00; text-align: center; font-size: 13px; font-weight: 600; padding: 6px 12px; }
.foot { text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.foot a { color: var(--text2); }

@media (min-width: 600px) {
  .h1 { font-size: 40px; }
  .page { padding-left: 24px; padding-right: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
