/* Gold Route Mobility app — Outfit & Cormorant Garamond, SIL OFL 1.1 */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/outfit-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/outfit-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/outfit-latin-600-normal.woff2") format("woff2");
}

:root {
  --gold: #c9a227;
  --gold-soft: #e4cc6a;
  --gold-deep: #a6851d;
  --gold-ink: #6e5810;
  --ink: #0c0b09;
  --charcoal: #141311;
  --slate: #2a2824;
  --stone: #5c574c;
  --parchment: #f4efe3;
  --cream: #faf7f0;
  --paper: #fcfbf8;
  --line-gold: rgba(201, 162, 39, 0.32);
  --line-ink: rgba(12, 11, 9, 0.12);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", Helvetica, Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(12, 11, 9, 0.08);
  --header-h: 4.25rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html { font-size: 112.5%; } /* 18px */

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
}

img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

a {
  color: var(--gold-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  z-index: 20;
}
.skip-link:focus { top: 0.6rem; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1.1rem;
  background: var(--ink);
  color: var(--parchment);
  border-bottom: 1px solid rgba(201, 162, 39, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand img { width: 36px; height: 36px; flex: none; }

.brand-text { min-width: 0; }

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(0.98rem, 3.8vw, 1.15rem);
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--parchment);
  white-space: nowrap;
}

.brand-tag {
  display: block;
  font-size: 0.72rem;
  color: rgba(244, 239, 227, 0.62);
  margin-top: 0.1rem;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
@media (max-width: 420px) {
  .header-actions .muted { display: none; }
}

.header-actions .muted {
  color: rgba(244, 239, 227, 0.72);
  font-size: 0.85rem;
}

.wrap {
  width: min(100% - 2rem, 720px);
  margin: 0 auto;
  padding: 1.25rem 0 6.5rem;
}

.wrap--wide { width: min(100% - 2rem, 1100px); }

.kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.25rem; }

.lede, .hint, .muted { color: var(--stone); }
.lede { font-size: 1.05rem; margin: 0 0 1.1rem; }
.hint { font-size: 0.95rem; margin: 0.45rem 0 0; }
.muted { font-size: 0.95rem; }

.card {
  background: var(--paper);
  border: 1px solid var(--line-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.15rem 1.25rem;
  margin: 0 0 1rem;
}

.card--gold {
  border-color: var(--line-gold);
  background: linear-gradient(180deg, #fffdf6 0%, var(--paper) 100%);
}

.stack { display: grid; gap: 0.85rem; }
.row { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }

label {
  display: block;
  font-weight: 500;
  margin: 0 0 0.35rem;
}

.req { color: #8a2a12; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 3.15rem;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid rgba(12, 11, 9, 0.22);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

textarea { min-height: 6rem; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.28);
  outline: none;
}

.field-help { margin: 0.3rem 0 0; font-size: 0.9rem; color: var(--stone); }

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.form-grid--2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
  .form-grid--2 .span-2 { grid-column: 1 / -1; }
}

.choice-list { display: grid; gap: 0.55rem; }

.choice {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.8rem 0.85rem;
  border: 1.5px solid var(--line-ink);
  border-radius: 12px;
  background: #fff;
}

.choice:has(input:checked) {
  border-color: var(--gold);
  background: #fffdf6;
}

.choice input { margin-top: 0.3rem; accent-color: var(--gold-deep); }

.choice strong { display: block; font-weight: 600; }
.choice span { display: block; color: var(--stone); font-size: 0.92rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3.2rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn--gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.btn--gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink); }

.btn--ink {
  background: var(--ink);
  color: var(--parchment);
  border-color: var(--ink);
}

.btn--ink:hover { background: var(--slate); color: var(--parchment); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(12, 11, 9, 0.22);
}

.btn--ghost:hover { border-color: var(--gold-ink); color: var(--gold-ink); }

.btn--ghost-light {
  background: transparent;
  color: var(--parchment);
  border-color: rgba(244, 239, 227, 0.28);
}

.btn--ghost-light:hover { border-color: var(--gold); color: var(--gold-soft); }

.btn--danger {
  background: transparent;
  color: #8a2a12;
  border-color: rgba(138, 42, 18, 0.35);
}

.btn--danger:hover { background: #f8ece8; }

.btn--block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  border: 1px solid var(--line-ink);
}

.alert--error { background: #f8ece8; border-color: rgba(138, 42, 18, 0.25); color: #5c1c10; }
.alert--ok { background: #eef6ea; border-color: rgba(45, 90, 39, 0.25); color: #1d3b1a; }
.alert--warn { background: #fbf3dd; border-color: var(--line-gold); color: var(--gold-ink); }
.alert--info { background: var(--parchment); color: var(--ink); }

.tabs {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 1rem;
  background: var(--parchment);
  padding: 0.3rem;
  border-radius: 999px;
}

.tabs button {
  flex: 1;
  min-height: 2.8rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
}

.tabs button[aria-selected="true"] {
  background: #fff;
  box-shadow: 0 4px 12px rgba(12, 11, 9, 0.08);
}

.nav-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.4rem 0.5rem calc(0.45rem + var(--safe-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line-ink);
  z-index: 10;
}

.nav-bottom a,
.nav-bottom button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  border: 0;
  background: transparent;
  color: var(--stone);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 10px;
}

.nav-bottom a[aria-current="page"],
.nav-bottom button[aria-current="page"] {
  color: var(--ink);
  background: var(--parchment);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--parchment);
  color: var(--ink);
  border: 1px solid var(--line-ink);
}

.badge--requested { background: #fbf3dd; border-color: var(--line-gold); color: var(--gold-ink); }
.badge--confirmed, .badge--driver_assigned { background: #eef6ea; border-color: rgba(45, 90, 39, 0.25); color: #1d3b1a; }
.badge--en_route { background: #e7eef8; border-color: rgba(30, 64, 111, 0.25); color: #1e406f; }
.badge--completed { background: var(--parchment); color: var(--stone); }
.badge--cancelled, .badge--declined { background: #f3f1ee; color: var(--stone); }

.ride-card h3 { margin-bottom: 0.25rem; }
.ride-meta { margin: 0.15rem 0; }
.estimate {
  margin-top: 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.estimate-box {
  padding: 1rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--parchment);
}

.estimate-box .kicker { color: var(--gold-soft); }
.estimate-box .amount {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--gold-soft);
  margin: 0.15rem 0;
}
.estimate-box p { margin: 0.35rem 0 0; color: rgba(244, 239, 227, 0.78); font-size: 0.95rem; }

.hidden { display: none !important; }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--line-ink);
  vertical-align: top;
}

th { font-weight: 600; color: var(--stone); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }

.admin-shell {
  display: grid;
  grid-template-columns: 1fr;
}

.admin-nav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.75rem 0 0.2rem;
  margin-bottom: 0.8rem;
}

.admin-nav a,
.admin-nav button {
  flex: none;
  min-height: 2.7rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-ink);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.admin-nav a[aria-current="page"],
.admin-nav button[aria-current="page"] {
  background: var(--ink);
  color: var(--parchment);
  border-color: var(--ink);
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.calendar .dow {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-day {
  min-height: 3.4rem;
  border: 1px solid var(--line-ink);
  border-radius: 10px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  font-size: 0.95rem;
}

.cal-day.is-other { opacity: 0.4; }
.cal-day.is-today { border-color: var(--gold); }
.cal-day.has-trips { background: #fffdf6; font-weight: 600; }
.cal-day .count {
  font-size: 0.72rem;
  color: var(--gold-ink);
}

.cal-daybutton { width: 100%; border: 0; background: transparent; padding: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }

.dl-grid {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.35rem 0.7rem;
  margin: 0;
}

.dl-grid dt { color: var(--stone); font-weight: 500; }
.dl-grid dd { margin: 0; }

.empty {
  text-align: center;
  padding: 1.6rem 1rem;
  color: var(--stone);
}

@media (min-width: 900px) {
  .admin-shell { grid-template-columns: 200px 1fr; gap: 1.4rem; align-items: start; }
  .admin-nav {
    flex-direction: column;
    overflow: visible;
    position: sticky;
    top: calc(var(--header-h) + 1rem);
  }
  .admin-nav a, .admin-nav button { width: 100%; justify-content: flex-start; border-radius: 12px; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
