/* RouteShare — clean, minimal, mobile-first (Uber-inspired) */
:root {
  --bg: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f6f6f6;
  --green: #1e6f4d;
  --green-dark: #14523a;
  --green-light: #e8f2ed;
  --amber: #b45309;
  --amber-light: #fef3c7;
  --red: #b91c1c;
  --red-light: #fee2e2;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; padding: 1rem 0 3rem; }
.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 1rem; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { opacity: 0.75; }
h1 { font-size: 1.8rem; margin: 0.8rem 0 0.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.8rem; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; }
p { margin-bottom: 0.6rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* Top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.logo { display: flex; align-items: center; gap: 0.35rem; text-decoration: none; }
.logo-pin { width: 26px; height: 26px; flex-shrink: 0; }
.logo-word { font-size: 1.3rem; font-weight: 800; font-style: italic; color: #232a33; letter-spacing: -0.02em; }
.logo-word span { color: var(--green); }
.nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: 0.92rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { opacity: 0.7; }
.nav-bell { position: relative; }
.badge-count { background: var(--red); color: #fff; border-radius: 999px; font-size: 0.7rem; padding: 0 0.35rem; margin-left: 0.2rem; }

/* Buttons & forms */
.btn {
  display: inline-block; background: var(--ink); color: #fff !important;
  border: none; padding: 0.7rem 1.3rem; border-radius: 8px;
  font-size: 1rem; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none;
  transition: background 0.15s ease;
}
.btn:hover { background: #374151; opacity: 1; }
.btn-small { padding: 0.45rem 0.9rem; font-size: 0.88rem; border-radius: 7px; }
.btn-outline { background: var(--soft); color: var(--ink) !important; }
.btn-outline:hover { background: #ebebeb; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #991b1b; }
.btn-block { display: block; width: 100%; }
.link-btn { background: none; border: none; color: var(--ink); cursor: pointer; font-size: 0.92rem; font-family: inherit; padding: 0; }
.link-btn:hover { opacity: 0.7; }
.inline-form { display: inline; }

label { display: block; font-weight: 600; font-size: 0.92rem; margin: 0.8rem 0 0.25rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="time"], input[type="date"], input[type="file"], select, textarea {
  width: 100%; padding: 0.65rem 0.75rem;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 1rem; font-family: inherit; background: var(--soft); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); border-color: var(--ink); background: #fff; }
.hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }
.form-narrow { max-width: 460px; }
.form-row { display: flex; gap: 0.8rem; }
.form-row > div { flex: 1; }

.day-picker { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.day-picker label {
  display: flex; align-items: center; gap: 0.3rem; margin: 0; font-weight: 500;
  border: 1px solid var(--line); border-radius: 8px; padding: 0.35rem 0.6rem; background: #fff; cursor: pointer;
}
.day-picker input { width: auto; accent-color: var(--ink); }
.day-picker label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
input[type="checkbox"] { accent-color: var(--ink); }

/* Google sign-in */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; padding: 0.7rem 1.2rem; margin-bottom: 0.9rem;
  background: #fff; color: var(--ink) !important; border: 1px solid #cfd4da; border-radius: 8px;
  font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-google:hover { background: var(--soft); opacity: 1; }
.google-icon { width: 18px; height: 18px; flex-shrink: 0; }
.or-divider { display: flex; align-items: center; gap: 0.8rem; margin: 0.2rem 0 1rem; color: var(--muted); font-size: 0.85rem; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.05rem; margin-bottom: 0.9rem; }
.card h3 { margin-bottom: 0.3rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Route cards */
.route-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.route-title { font-size: 1.02rem; }
.arrow { color: var(--green); }
.price-tag { background: var(--green-light); color: var(--green-dark); font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.9rem; white-space: nowrap; }
.route-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.87rem; color: var(--muted); margin: 0.5rem 0; }
.seats-open { color: var(--green-dark); font-weight: 600; }
.seats-full { color: var(--red); font-weight: 600; }
.route-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 0.6rem; }
.driver-line { font-size: 0.9rem; }

/* Badges & statuses */
.verified-badge { background: var(--green); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px; margin-left: 0.25rem; white-space: nowrap; }
.status { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0.12rem 0.55rem; border-radius: 999px; }
.status-verified, .status-open, .status-paid, .status-active, .status-assigned { background: var(--green-light); color: var(--green-dark); }
.status-pending, .status-requested, .status-pending_driver, .status-applied { background: var(--amber-light); color: var(--amber); }
.status-rejected, .status-cancelled, .status-paused, .status-declined, .status-expired { background: var(--red-light); color: var(--red); }
.status-unsubmitted, .status-accepted { background: #ececec; color: #374151; }

/* Flash messages */
.flash { padding: 0.7rem 1rem; border-radius: 10px; margin: 0.8rem 0; font-size: 0.95rem; }
.flash-success { background: var(--green-light); color: var(--green-dark); border: 1px solid #bfe0cd; }
.flash-error { background: var(--red-light); color: var(--red); border: 1px solid #f3c1c1; }

/* ===== Landing hero ===== */
.hero {
  display: flex; align-items: center; gap: 2rem;
  padding: 2.5rem 0 1.5rem;
}
.hero-inner { flex: 1 1 55%; }
.hero h1 { font-size: 2.2rem; line-height: 1.15; margin: 0 0 0.8rem; }
.hero p { font-size: 1.05rem; color: var(--muted); max-width: 30rem; }
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.2rem; }
.hero .btn-ghost { background: var(--soft); color: var(--ink) !important; }
.hero .btn-ghost:hover { background: #ebebeb; }
.hero-eyebrow {
  display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--green); margin-bottom: 0.7rem;
}
.hero-map-wrap { flex: 1 1 40%; max-width: 400px; }
.hero-map { width: 100%; height: auto; display: block; }
@media (max-width: 699px) {
  .hero { flex-direction: column-reverse; gap: 0.8rem; padding-top: 1rem; }
  .hero-map-wrap { max-width: 320px; margin: 0 auto; }
  .hero h1 { font-size: 1.7rem; }
}
@media (min-width: 900px) { .hero h1 { font-size: 2.6rem; } }
.map-label { font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }

/* Role sign-up cards */
.role-cards { display: grid; grid-template-columns: 1fr; gap: 0.9rem; margin: 1rem 0; }
@media (min-width: 700px) { .role-cards { grid-template-columns: 1fr 1fr 1fr; } }
.role-card { padding: 1.3rem 1.1rem; transition: box-shadow 0.15s ease; }
.role-card:hover { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07); }
.role-icon { font-size: 1.9rem; margin-bottom: 0.5rem; }
.role-card h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.role-card .btn { margin-top: 0.8rem; width: 100%; }

.stats-row { display: flex; gap: 2rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.stat { text-align: left; }
.stat .num { font-size: 1.5rem; font-weight: 800; }
.stat .lbl { font-size: 0.82rem; color: var(--muted); }

/* Wallet / balance panels */
.balance-panel {
  background: var(--soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem;
}
.balance-panel .amount { font-size: 1.7rem; font-weight: 800; }
.balance-panel .lbl { font-size: 0.85rem; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tr:last-child td { border-bottom: none; }

/* Admin overview tiles */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-tile { margin-bottom: 0; padding: 0.85rem 0.95rem; }
.stat-tile .num { font-size: 1.25rem; font-weight: 800; line-height: 1.3; }
.stat-tile .lbl { font-size: 0.76rem; color: var(--muted); }
.stat-attention { border-color: #f0c67e; background: var(--amber-light); }
.stat-attention .num { color: var(--amber); }

/* Tabs (admin) */
.section-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.section-tabs a { padding: 0.4rem 0.95rem; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 0.88rem; text-decoration: none; }
.section-tabs a:hover { background: #ebebeb; opacity: 1; }

/* Pricing table */
.pricing-table td, .pricing-table th { text-align: left; }
.price-big { font-weight: 800; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 1.4rem 0; font-size: 0.88rem; color: var(--muted); margin-top: auto; }
.footer p { margin-bottom: 0.25rem; }
.footer a { color: var(--muted); }

/* Notification list */
.notif { border-left: 3px solid var(--ink); }
.notif.unread { background: var(--soft); }

/* Desktop / mobile view toggle */
#view-toggle {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 50;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.55rem 1rem; font-size: 0.88rem; font-weight: 600; font-family: inherit;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
#view-toggle:hover { background: var(--soft); }
html.phone-view { background: #ececec; }
html.phone-view body { max-width: 420px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); box-shadow: 0 0 24px rgba(0, 0, 0, 0.08); }
html.phone-view .topbar { max-width: 420px; margin: 0 auto; left: auto; right: auto; }

/* Utility */
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin: 0.6rem 0; }
.divider { border: none; border-top: 1px solid var(--line); margin: 1.4rem 0; }
.empty { color: var(--muted); font-style: italic; padding: 0.6rem 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.searchbar { display: flex; gap: 0.5rem; margin: 0.8rem 0; }
.searchbar input { flex: 1; }
