:root {
  --bg: #f6f6f4; --card: #fff; --ink: #141414; --muted: #6b6b6b; --line: #e6e6e3;
  --brand: #ffc531; --brand-ink: #141414; --green: #16a34a; --red: #dc2626; --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h3 { margin-top: 1.4em; }
.container { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; }
.muted { color: var(--muted); } .small { font-size: 13px; font-weight: 400; }
.center { text-align: center; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; }
.gap { gap: 12px; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }

/* top bar */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 1000; }
.brand { font-weight: 800; font-size: 20px; text-decoration: none; color: var(--brand); }
.topbar nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; opacity: .9; } .topbar nav a:hover { opacity: 1; }
.topbar .muted { color: #bbb; }
.footer { text-align: center; color: var(--muted); padding: 24px; font-size: 13px; }

/* cards & forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.narrow { max-width: 440px; margin: 30px auto; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 12px; }
input, select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; margin-top: 5px; background: #fff; }
input:focus, select:focus { outline: 2px solid var(--brand); border-color: transparent; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0 0 12px; }
legend { font-weight: 700; padding: 0 6px; }
.btn { display: inline-block; background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 12px 18px;
  font: 600 15px inherit; font-family: inherit; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { opacity: .9; } .btn:disabled { opacity: .5; cursor: wait; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.topbar .btn { background: var(--brand); color: var(--brand-ink); }
.btn-danger { background: var(--red); }
.full { width: 100%; margin-top: 8px; }
.link-btn { background: none; border: 0; cursor: pointer; font-size: 18px; padding: 4px; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; }
.alert-success { background: #e8f7ee; color: #12632f; } .alert-error { background: #fdecec; color: #8a1c1c; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 12px; }

.tabs { display: flex; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.tabs a { flex: 1; text-align: center; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--muted); }
.tabs a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tabs.inline { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 500; cursor: pointer; margin: 0 6px 8px 0; }
.pill input { width: auto; margin: 0; }
.vehicle-pick { margin-bottom: 8px; }

/* landing */
.hero { padding: 50px 0 30px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); }
.hero p { font-size: 18px; color: var(--muted); margin-bottom: 24px; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.big-icon { font-size: 48px; }

/* booking */
.book-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
.book-panel { margin: 0; }
.map { height: calc(100vh - 130px); min-height: 420px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
@media (max-width: 820px) {
  .book-layout { grid-template-columns: 1fr; }
  .map { height: 340px; min-height: 0; order: -1; }
}
.loc-field { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.loc-field input { margin: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.dot-green { background: var(--green); } .dot-red { background: var(--red); }
.suggest { position: absolute; top: 100%; left: 18px; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  list-style: none; margin: 4px 0 0; padding: 0; z-index: 2000; max-height: 260px; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.suggest:empty { display: none; }
.suggest li { padding: 9px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest li:hover { background: var(--bg); }
.vehicle-list { margin-top: 6px; }
.vehicle-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; margin-bottom: 8px; font-weight: 400; }
.vehicle-opt input { display: none; }
.vehicle-opt:has(input:checked) { border-color: var(--ink); background: #fffbea; }
.v-icon { font-size: 30px; }
.v-info { flex: 1; display: flex; flex-direction: column; } .v-info small { color: var(--muted); }
.v-fare { font-weight: 700; font-size: 17px; }
.pin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.4); margin: 6px; }
.pin-emoji { font-size: 26px; line-height: 30px; text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }

/* ride view */
.status-msg { background: var(--bg); border-radius: 10px; padding: 12px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.otp-box { display: flex; justify-content: space-between; align-items: center; background: #fffbea; border: 1px dashed var(--brand); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.otp-box strong { font-size: 26px; letter-spacing: 6px; }
.otp-input { font-size: 24px; letter-spacing: 10px; text-align: center; }
.driver-card { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.driver-card > div:nth-child(2) { flex: 1; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.route { list-style: none; padding: 0; margin: 12px 0; }
.route li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; font-size: 14px; }
.fare-line { border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 8px; font-size: 14px; }
.fare-line b { font-size: 20px; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 1s linear infinite; flex: none; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin-bottom: 10px; }
.stars input { display: none; }
.stars label { font-size: 32px; color: #ccc; cursor: pointer; margin: 0; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f5a400; }

/* badges */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eee; color: #444; }
.badge-requested { background: #fff4d6; color: #8a5a00; }
.badge-accepted  { background: #e3efff; color: #1d4ed8; }
.badge-started   { background: #ede4ff; color: #6d28d9; }
.badge-completed { background: #e3f6ea; color: #15803d; }
.badge-cancelled { background: #fde8e8; color: #b91c1c; }

/* lists & stats */
.ride-list .ride-item { display: flex; gap: 14px; align-items: center; text-decoration: none; padding: 14px 16px; margin-bottom: 10px; }
.ride-item:hover { border-color: #bbb; }
.request { margin-bottom: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; margin: 0; }
.stat small { color: var(--muted); } .stat b { font-size: 24px; }
.stats-inline { display: flex; gap: 22px; }
.stats-inline div { display: flex; flex-direction: column; } .stats-inline small { color: var(--muted); } .stats-inline b { font-size: 18px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; border: 0; background: #e5e5e5; padding: 10px 18px 10px 10px; border-radius: 999px; font: 700 15px inherit; font-family: inherit; cursor: pointer; }
.toggle span { width: 22px; height: 22px; border-radius: 50%; background: #999; }
.toggle.on { background: #dcfce7; color: #15803d; } .toggle.on span { background: var(--green); box-shadow: 0 0 0 4px rgba(22,163,74,.25); }

/* tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
.card .table-wrap { border: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafaf8; }
td form { margin: 0; }
input.num { width: 100px; margin: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px; }
.filters input, .filters select { width: auto; margin: 0; flex: 1; min-width: 140px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; }
