/* Ride With Mike — black & white, mobile-first.
   Hard automotive / road-dispatch look: square corners, slab buttons,
   thick black borders, hard offset shadows, condensed uppercase type,
   checker-flag and road-marking details. Black, white, grays only.
   No soft shadows, no pills, no rounded cards. */
:root {
  --ink: #111111;
  --ink-soft: #2b2b2b;
  --paper: #ffffff;
  --wash: #ededeb;
  --line: #c9c9c6;
  --mid: #5c5c58;
  --gray-shadow: #9a9a96;
  --head-font: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body-font: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 2px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body-font);
  background: var(--wash);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}
::selection { background: var(--ink); color: var(--paper); }
h1, h2, h3 {
  font-family: var(--head-font);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.15;
  margin: 0 0 .5rem;
}
h2 { font-size: 1.4rem; }
h3 { font-size: 1.12rem; }
.card h2::before, .card h3::before {
  content: ""; display: inline-block; width: .52em; height: .52em;
  background: var(--ink); margin-right: .45em;
}
p { margin: 0 0 .75rem; }
label {
  display: block; margin: 0 0 .8rem;
  font-family: var(--head-font); font-weight: 600; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .07em;
}
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem;
  padding: .8rem .9rem; font-size: 1rem; font-family: var(--body-font);
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  text-transform: none; letter-spacing: normal;
}
input:focus, select:focus, textarea:focus {
  outline: none; box-shadow: 3px 3px 0 var(--ink);
}
textarea { min-height: 4.2rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] { display: inline-block; width: auto; margin: 0 .45rem 0 0; transform: scale(1.25); box-shadow: none; }
.error {
  color: var(--ink); font-weight: 700; background: #e3e3e0;
  border: 2px solid var(--ink); border-left: 8px solid var(--ink);
  padding: .45rem .6rem;
}

/* ---------- buttons: slab rectangles, hard offset shadows ---------- */
.btn {
  appearance: none; border: 3px solid var(--ink); background: var(--paper); color: var(--ink);
  border-radius: var(--radius); padding: .65rem 1.2rem;
  font-family: var(--head-font); font-size: 1rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--gray-shadow); }
.btn-primary:active { box-shadow: 1px 1px 0 var(--gray-shadow); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:active { transform: none; box-shadow: none; }
.btn-big { width: 100%; padding: .95rem 1.2rem; font-size: 1.12rem; margin-top: .4rem; }
.btn-small { padding: .4rem .85rem; font-size: .88rem; border-width: 2px; box-shadow: 2px 2px 0 var(--ink); }
.btn-small:active { box-shadow: 0 0 0 var(--ink); }
.btn-danger { border-style: dashed; color: var(--ink); box-shadow: 3px 3px 0 var(--gray-shadow); }
.btn-danger:active { box-shadow: 1px 1px 0 var(--gray-shadow); }
.btn[disabled] { opacity: .45; cursor: default; }

/* ---------- auth ---------- */
[hidden] { display: none !important; }
.auth-wrap { min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center; padding: 1.2rem .9rem 2.5rem; }
.auth-card {
  position: relative; background: var(--paper);
  border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 7px 7px 0 var(--ink);
  padding: 2.1rem 1.2rem 1.6rem; max-width: 430px; width: 100%; text-align: center;
}
/* checker-flag strip across the top of the sign-in card */
.auth-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 14px;
  background-image: conic-gradient(var(--ink) 25%, var(--paper) 0 50%, var(--ink) 0 75%, var(--paper) 0);
  background-size: 14px 14px;
  border-bottom: 3px solid var(--ink);
}
.auth-logo { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 3px solid var(--ink); }
.auth-card h1 { font-size: 2.15rem; font-weight: 700; letter-spacing: .02em; margin-top: .6rem; }
.auth-card h1::before { content: none; }
.tagline { font-family: var(--head-font); font-weight: 600; text-transform: uppercase; letter-spacing: .3em; font-size: .82rem; margin-top: -.35rem; }
.auth-note { color: var(--mid); font-size: .95rem; }
.auth-card form { text-align: left; margin-top: 1rem; }
.demo-logins { text-align: left; margin-top: 1.1rem; border-top: 3px dashed var(--ink); padding-top: .8rem; font-size: .9rem; }
.demo-logins summary { font-family: var(--head-font); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; cursor: pointer; }
.demo-logins ul { margin: .5rem 0; padding-left: 1.1rem; }
.register-box { border-top: 3px dashed var(--ink); margin-top: 1.2rem; padding-top: 1rem; }
.register-box h2 { font-size: 1.08rem; }
.register-box h2::before { content: none; }

/* ---------- app frame: thick black grille header ---------- */
.app-header {
  display: flex; align-items: center; gap: .7rem;
  background-color: var(--ink); color: var(--paper);
  /* checker-flag band along the bottom edge of the header */
  background-image: conic-gradient(var(--paper) 25%, transparent 0 50%, var(--paper) 0 75%, transparent 0);
  background-size: 12px 12px; background-repeat: repeat-x; background-position: bottom left;
  border-bottom: 3px solid var(--ink);
  padding: .6rem .8rem 1.05rem; position: sticky; top: 0; z-index: 20;
}
.header-logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--paper); border: 2px solid var(--paper); }
.header-titles { flex: 1; min-width: 0; }
.biz-name { font-family: var(--head-font); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 1.28rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-tagline { font-size: .7rem; text-transform: uppercase; letter-spacing: .22em; opacity: .85; }
.app-header .btn { border-color: var(--paper); color: var(--paper); box-shadow: none; }
.app-header .btn:active { transform: none; box-shadow: none; }

.who-line {
  text-align: center; color: var(--mid); margin: .55rem .8rem 0;
  font-family: var(--head-font); font-size: .85rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em;
}

main { max-width: 640px; margin: 0 auto; padding: .8rem .8rem 6.2rem; }

.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: var(--paper); border-top: 3px solid var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-bar button {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: .7rem .2rem .6rem;
  font-family: var(--head-font); font-size: .92rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--mid);
}
.tab-bar button.active { color: var(--paper); background: var(--ink); }

/* ---------- cards & lists: dispatch-board blocks ---------- */
.card {
  background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 1rem; margin-bottom: 1rem;
}
.card.flat { border-width: 2px; border-left: 8px solid var(--ink); box-shadow: none; }
.card h2, .card h3 { margin-bottom: .35rem; }
.muted { color: var(--mid); }
.small { font-size: .88rem; }
.row { display: flex; gap: .6rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row > * { min-width: 0; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
/* license-plate badge */
.pill {
  display: inline-block; background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--paper);
  padding: .18rem .6rem;
  font-family: var(--head-font); font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
}
.pill.soft { background: var(--paper); color: var(--mid); border-color: var(--mid); box-shadow: inset 0 0 0 1px var(--line); }
.flag {
  border: 3px dashed var(--ink); border-radius: 0; background: #f7f7f5;
  padding: .55rem .7rem; font-size: .9rem; font-weight: 600; margin: .5rem 0;
}
.route { font-size: 1.02rem; font-weight: 600; }
.route .arrow { color: var(--mid); padding: 0 .3rem; font-weight: 700; }
/* fare shown like a plate screwed to the board */
.price {
  display: inline-block; background: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--ink); padding: .08rem .55rem;
  font-family: var(--head-font); font-size: 1.35rem; font-weight: 700; letter-spacing: .03em;
}
/* dashed center line, like road markings */
.divider {
  height: 4px; margin: .9rem 0; border: none;
  background: repeating-linear-gradient(90deg, var(--ink) 0 28px, transparent 28px 44px);
}
.checkline { display: flex; align-items: center; font-weight: 600; margin: .45rem 0; }
.checkline input { flex: none; }

/* ---------- booking steps ---------- */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .9rem; }
.choice {
  border: 3px solid var(--ink); border-radius: var(--radius); background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  padding: .9rem .7rem; text-align: left; cursor: pointer; font-family: inherit; font-size: 1rem;
}
.choice:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.choice strong { display: block; font-family: var(--head-font); font-size: 1.08rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.choice span { color: var(--mid); font-size: .88rem; }
.choice.selected { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--gray-shadow); }
.choice.selected span { color: var(--paper); opacity: .85; }
.step-nav { display: flex; gap: .6rem; margin-top: 1rem; }
.step-nav .btn { flex: 1; }

/* ---------- messages: dispatch log blocks ---------- */
.thread { display: flex; flex-direction: column; gap: .45rem; margin: .6rem 0; }
.msg { max-width: 82%; padding: .55rem .75rem; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--paper); }
.msg.mine { align-self: flex-end; background: var(--ink); color: var(--paper); }
.msg .who { font-family: var(--head-font); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; opacity: .75; }
.msg-form { display: flex; gap: .5rem; }
.msg-form input { flex: 1; margin-top: 0; }
.msg-form .btn { flex: none; }

/* ---------- progress (loyalty): hazard-striped bar ---------- */
.progress { height: 16px; border: 2px solid var(--ink); border-radius: 0; overflow: hidden; background: var(--paper); margin: .4rem 0 .2rem; }
.progress > div { height: 100%; background: repeating-linear-gradient(-45deg, var(--ink) 0 12px, var(--ink-soft) 12px 24px); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 5.4rem; z-index: 50;
  background: var(--ink); color: var(--paper); padding: .7rem 1.1rem;
  border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--gray-shadow);
  font-family: var(--head-font); font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  max-width: 92vw; text-align: center;
}

@media (min-width: 700px) {
  .auth-wrap { align-items: center; }
}
