﻿:root {
  color-scheme: light;
  --green: #0f4c3a;
  --green-2: #176c55;
  --mint: #e7f3ec;
  --gold: #f9c846;
  --amber: #fff3cc;
  --red: #d94b3d;
  --blue: #2967b2;
  --violet: #6b55bf;
  --ink: #15201c;
  --muted: #66736e;
  --soft: #f6f3ec;
  --paper: #fbf8f0;
  --white: #fffdf8;
  --line: #ded8cb;
  --shadow-sm: 0 8px 22px rgba(21, 32, 28, 0.07);
  --shadow: 0 18px 46px rgba(21, 32, 28, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background:
    linear-gradient(180deg, #fffdf8 0%, #f7f2e6 46%, #eef5ef 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.is-guest .app-shell,
body.is-guest .bottom-nav {
  display: none;
}

body.is-authenticated .auth-gate {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  max-width: 760px;
  font-size: 48px;
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.25;
}

.eyebrow {
  margin: 0;
  color: var(--red);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.brand,
.topbar,
.hero,
.metrics,
.service-grid,
.order-layout,
.market-grid,
.dispatch-grid,
.support-section,
.account-layout,
.profile-grid,
.admin-grid,
.section-heading,
.filter-bar,
.market-status {
  width: min(1120px, calc(100vw - 326px));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: auto;
  margin: 0;
  font-size: 23px;
  font-weight: 950;
}

.brand img {
  width: 42px;
  height: 42px;
}

.auth-gate {
  min-height: 100vh;
  padding: 42px clamp(18px, 5vw, 64px) 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  align-items: start;
  gap: clamp(28px, 5vw, 70px);
  background:
    linear-gradient(130deg, rgba(7, 44, 34, 0.96), rgba(15, 76, 58, 0.88) 52%, rgba(41, 103, 178, 0.72)),
    linear-gradient(90deg, rgba(249, 200, 70, 0.18), transparent 45%);
}

.auth-hero {
  display: grid;
  gap: 17px;
  color: var(--white);
  align-content: start;
  padding-top: clamp(8px, 4vh, 46px);
}

.auth-brand {
  color: var(--white);
  margin-bottom: 12px;
}

.auth-hero .eyebrow {
  color: var(--gold);
}

.auth-hero p:not(.eyebrow) {
  max-width: 640px;
  color: rgba(255, 253, 248, 0.8);
  font-size: 17px;
  line-height: 1.65;
}

.auth-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
}

.auth-highlights span {
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 253, 248, 0.88);
  display: grid;
  align-content: center;
  padding: 14px;
  font-weight: 900;
  line-height: 1.35;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.auth-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.auth-panel .account-form {
  min-height: 438px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 30px 80px rgba(7, 38, 29, 0.34);
  padding: 24px;
}

.auth-panel .account-form h3 {
  font-size: 28px;
  margin-bottom: 0;
}

.auth-panel .account-form p {
  color: var(--muted);
  line-height: 1.5;
}

.login-card-head {
  display: grid;
  gap: 8px;
}

.auth-lock {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: var(--green);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(15, 76, 58, 0.25);
}

.auth-back {
  justify-self: start;
}

.register-card,
.forgot-card {
  display: none;
}

.auth-register-mode .register-card,
.auth-register-mode .auth-panel .register-card,
.auth-forgot-mode .forgot-card,
.auth-forgot-mode .auth-panel .forgot-card,
.auth-login-mode .login-card,
.auth-login-mode .auth-panel .login-card {
  display: grid;
}

.auth-register-mode .login-card,
.auth-register-mode .auth-panel .login-card,
.auth-forgot-mode .login-card,
.auth-forgot-mode .auth-panel .login-card {
  display: none;
}

.auth-panel .role-panel {
  background: rgba(255, 253, 248, 0.94);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background:
    linear-gradient(180deg, #0f4c3a 0%, #0b382d 72%, #12231f 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.side-nav {
  display: grid;
  gap: 7px;
}

.side-nav a,
.bottom-nav a {
  border-radius: 8px;
  color: rgba(255, 253, 248, 0.72);
  font-weight: 850;
  padding: 12px 13px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.side-nav a:hover,
.side-nav a.active {
  background: rgba(255, 255, 255, 0.13);
  color: var(--white);
}

.side-nav a.active {
  box-shadow: inset 3px 0 0 var(--gold);
}

.rider-card {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 17px;
  display: grid;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.rider-card span {
  color: rgba(255, 253, 248, 0.74);
  line-height: 1.5;
}

main {
  min-width: 0;
  padding-bottom: 54px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 16px 0;
  background: rgba(251, 248, 240, 0.88);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.user-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  padding: 10px 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.search {
  width: min(520px, 100%);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.search input,
.order-form input,
.order-form select,
.order-form textarea,
.account-form input,
.account-form select,
.admin-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle.active {
  border-color: rgba(23, 108, 85, 0.18);
  background: #eef5ef;
}

.search input:focus,
.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus,
.account-form input:focus,
.account-form select:focus,
.admin-form input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px rgba(23, 108, 85, 0.12);
}

.search input {
  min-height: 46px;
  padding: 0 15px;
  box-shadow: var(--shadow-sm);
}

.location-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 10px 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.wellness-pill {
  border: 1px solid rgba(23, 108, 85, 0.2);
  border-radius: 999px;
  background: rgba(15, 76, 58, 0.08);
  padding: 9px 13px;
  display: grid;
  gap: 2px;
  min-width: 112px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.wellness-pill span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.location-pill strong,
.wellness-pill strong {
  color: var(--green);
}

.wellness-pill[data-status="offline"] {
  border-color: rgba(214, 57, 49, 0.22);
  background: rgba(214, 57, 49, 0.08);
}

.wellness-pill[data-status="offline"] strong {
  color: var(--red);
}

.section {
  scroll-margin-top: 90px;
}

.hero {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 372px;
  align-items: center;
  gap: 36px;
  padding: 28px 0 22px;
}

.hero-copy {
  display: grid;
  gap: 17px;
}

.hero-copy p:not(.eyebrow),
.support-section p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  max-width: 690px;
}

.hero-actions,
.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  padding: 0 17px;
  line-height: 1.1;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-btn {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(15, 76, 58, 0.2);
}

.secondary-btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.ghost-btn {
  background: var(--gold);
  color: #2d2500;
}

.ghost-btn.is-online {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(15, 76, 58, 0.22);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.phone-preview {
  min-height: 482px;
  border: 10px solid #111815;
  border-radius: 32px;
  background: #fff9ea;
  box-shadow: var(--shadow);
  padding: 15px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 15px;
  overflow: hidden;
}

.phone-status,
.mobile-order div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 900;
}

.map-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(35deg, transparent 48%, rgba(15, 76, 58, 0.24) 49%, rgba(15, 76, 58, 0.24) 51%, transparent 52%),
    linear-gradient(145deg, transparent 38%, rgba(41, 103, 178, 0.2) 39%, rgba(41, 103, 178, 0.2) 42%, transparent 43%),
    repeating-linear-gradient(90deg, #ebe4d2 0 24px, #f7f0dc 24px 48px);
}

.pin {
  position: absolute;
  border-radius: 999px;
  padding: 8px 11px;
  background: var(--green);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.pickup {
  top: 78px;
  left: 42px;
}

.dropoff {
  right: 32px;
  bottom: 88px;
  background: var(--red);
}

.route-line {
  position: absolute;
  width: 62%;
  height: 4px;
  left: 82px;
  top: 178px;
  background: var(--gold);
  transform: rotate(25deg);
  transform-origin: left center;
  border-radius: 99px;
}

.mobile-order {
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  padding: 17px;
  display: grid;
  gap: 8px;
}

.mobile-order span,
.mobile-order em {
  color: rgba(255, 253, 248, 0.72);
  font-style: normal;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 58px;
}

.metrics article,
.service-card,
.quote-panel,
.market-card,
.dispatch-board,
.support-section,
.account-form,
.role-panel,
.profile-card,
.admin-card,
.channel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-sm);
}

.metrics article {
  min-height: 112px;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.metrics strong {
  color: var(--green);
  font-size: 27px;
}

.metrics span,
.service-card p,
.market-card p,
.quote-panel p,
.request-item span,
.zone-card span {
  color: var(--muted);
  line-height: 1.45;
}

.section-heading {
  margin: 0 auto 21px;
  display: grid;
  gap: 8px;
}

.service-section,
.market-section,
.dispatch-section,
.support-section,
.account-section,
.profile-section,
.admin-section {
  margin-top: 64px;
}

.account-layout,
.profile-grid,
.admin-grid {
  display: grid;
  gap: 16px;
}

.account-layout {
  grid-template-columns: repeat(3, 1fr);
}

.profile-grid {
  grid-template-columns: 1.08fr 1fr 1fr;
}

.admin-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-form,
.role-panel,
.profile-card,
.admin-card,
.channel-card {
  padding: 18px;
}

.channel-card {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.channel-list,
.admin-control-list,
.admin-form,
.profile-stats,
.permission-list,
.activity-log,
#operationalTrustList {
  display: grid;
  gap: 10px;
}

.admin-wide {
  grid-column: 1 / -1;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.reliability-stats {
  margin-bottom: 14px;
}

.reliability-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.server-key-field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.server-key-field input {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 12px 13px;
  color: var(--ink);
}

.import-backup-label {
  cursor: pointer;
}

.admin-help-text {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-form label,
.account-form label,
.order-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.admin-form input,
.account-form input,
.account-form select {
  min-height: 48px;
  padding: 0 12px;
}

.account-form .password-field input {
  padding-right: 48px;
}

.admin-switch,
.admin-row,
.channel-request {
  border: 1px solid rgba(222, 216, 203, 0.82);
  border-radius: 8px;
  background: #f8f1de;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-switch span,
.admin-row span,
.channel-request span {
  display: grid;
  gap: 4px;
}

.admin-switch small,
.admin-row small,
.channel-request small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.admin-switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.channel-request {
  align-items: stretch;
}

.channel-request-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.tracking-strip {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 76, 58, 0.13);
  overflow: hidden;
}

.tracking-strip span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 180ms ease;
}

.payment-status {
  border: 1px solid rgba(222, 216, 203, 0.82);
  border-radius: 8px;
  padding: 11px 12px;
  display: grid;
  gap: 5px;
}

.payment-status strong {
  color: var(--green);
}

.payment-status span {
  font-weight: 900;
}

.payment-required {
  background: #fff5dc;
}

.payment-cash {
  background: #eef5ef;
}

.channel-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: flex-end;
  gap: 8px;
}

.account-form {
  display: grid;
  gap: 13px;
}

.auth-panel .register-card,
.auth-panel .forgot-card {
  display: none;
}

.auth-register-mode .auth-panel .register-card {
  display: grid;
}

.auth-forgot-mode .auth-panel .forgot-card {
  display: grid;
}

.auth-register-mode .auth-panel .login-card,
.auth-forgot-mode .auth-panel .login-card {
  display: none;
}

.auth-login-mode .auth-panel .login-card {
  display: grid;
}

.role-panel,
.profile-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.profile-avatar {
  width: 82px;
  height: 82px;
  border-radius: 8px;
  background: var(--green);
  background-size: cover;
  background-position: center;
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 950;
  box-shadow: var(--shadow-sm);
}

.profile-form {
  display: grid;
  gap: 12px;
}

.profile-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.profile-form input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 0 12px;
}

.profile-form input[type="file"] {
  min-height: auto;
  padding: 10px;
}

.trust-card,
.permission-item,
.activity-item,
.profile-stat,
.security-note {
  border: 1px solid rgba(222, 216, 203, 0.72);
  border-radius: 8px;
  background: #f8f1de;
  padding: 12px;
}

.trust-card,
.permission-item,
.activity-item,
.profile-stat,
.security-note {
  display: grid;
  gap: 6px;
}

.trust-card strong,
.permission-item strong,
.profile-stat strong,
.security-note strong {
  color: var(--green);
}

.security-note {
  border-color: rgba(23, 108, 85, 0.18);
  background: #eef5ef;
  color: var(--muted);
  line-height: 1.45;
}

.admin-setup-note {
  border-color: rgba(245, 196, 66, 0.65);
  background: #fff8df;
  color: #10231d;
}

.admin-setup-note .primary-btn {
  width: 100%;
  min-height: 46px;
}

.profile-section.locked .profile-card,
.admin-section.locked .admin-card {
  opacity: 0.74;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  min-height: 172px;
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.service-card:hover,
.service-card.active {
  transform: translateY(-3px);
  border-color: var(--green);
  box-shadow: var(--shadow);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef5ef;
  color: var(--service-color);
  font-size: 22px;
  font-weight: 950;
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 20px;
}

.order-layout .section-heading {
  width: auto;
}

.order-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-select-row select {
  font-size: 17px;
  font-weight: 950;
}

.route-entry-card {
  position: relative;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 16px 16px 16px 44px;
}

.manual-route-header {
  display: grid;
  gap: 3px;
  padding: 0 0 2px;
}

.manual-route-header strong {
  color: var(--ink);
  font-size: 15px;
}

.manual-route-header span,
.route-search-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.route-field {
  position: relative;
  z-index: 1;
}

.route-field input {
  min-height: 52px;
  font-size: 16px;
  font-weight: 850;
}

.route-search-status {
  border: 1px solid rgba(222, 216, 203, 0.9);
  border-radius: 8px;
  background: #f8f1de;
  padding: 10px 12px;
  font-weight: 850;
}

.route-search-status[data-status="ready"] {
  color: var(--green);
  background: rgba(15, 76, 58, 0.08);
  border-color: rgba(15, 76, 58, 0.24);
}

.route-search-status[data-status="weak"] {
  color: var(--red);
  background: rgba(214, 57, 49, 0.08);
  border-color: rgba(214, 57, 49, 0.2);
}

.route-step-line {
  position: absolute;
  left: 23px;
  top: 38px;
  bottom: 38px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(var(--green), var(--red));
}

.route-step-dot {
  position: absolute;
  left: -31px;
  top: 34px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px rgba(15, 76, 58, 0.2);
}

.pickup-dot {
  background: var(--green);
}

.dropoff-dot {
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(217, 75, 61, 0.2);
}

.booking-options {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.order-form select,
.order-form textarea {
  min-height: 50px;
  padding: 0 12px;
}

.order-form textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

.is-ride-order #packageSize {
  background: #f1eee5;
  color: #8c8678;
}

body:not(.is-ride-order) .ride-only {
  display: none;
}

.is-ride-order .delivery-only {
  display: none;
}

.is-bike-ride-order .passenger-count-field {
  display: none;
}

.wide {
  grid-column: 1 / -1;
}

.quote-panel {
  padding: 21px;
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 15px;
}

.price {
  font-size: 46px;
  line-height: 1;
  font-weight: 950;
  color: var(--green);
}

.quote-breakdown,
.trust-list,
.route-tracker {
  display: grid;
  gap: 10px;
}

.quote-breakdown div,
.trust-list span,
.route-tracker div,
.request-item,
.zone-card {
  border: 1px solid rgba(222, 216, 203, 0.72);
  border-radius: 8px;
  background: #f8f1de;
  padding: 12px;
}

.quote-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.route-tracker div {
  display: grid;
  gap: 5px;
}

.route-tracker strong {
  color: var(--green);
}

.route-tracker span {
  color: var(--muted);
  line-height: 1.4;
}

.live-map-section {
  display: grid;
  gap: 18px;
}

.live-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 18px;
  align-items: stretch;
}

.live-map-card,
.live-map-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 16px;
}

.live-map-card {
  display: grid;
  gap: 14px;
}

.order-map-monitor {
  margin-top: 0;
}

.compact-heading {
  width: 100%;
  margin: 0;
}

.compact-heading h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.order-live-map-layout {
  width: 100%;
}

.live-map-canvas {
  position: relative;
  min-height: 360px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(222, 216, 203, 0.82);
  background:
    linear-gradient(32deg, transparent 47%, rgba(15, 76, 58, 0.24) 48%, rgba(15, 76, 58, 0.24) 51%, transparent 52%),
    linear-gradient(128deg, transparent 38%, rgba(41, 103, 178, 0.18) 39%, rgba(41, 103, 178, 0.18) 42%, transparent 43%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.35) 0 2px, transparent 2px 58px),
    repeating-linear-gradient(90deg, #efe7d3 0 36px, #fbf4e3 36px 72px);
}

.map-grid-line {
  position: absolute;
  inset: auto;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
}

.map-grid-line-a {
  width: 72%;
  height: 10px;
  left: 9%;
  top: 48%;
  transform: rotate(-16deg);
}

.map-grid-line-b {
  width: 58%;
  height: 8px;
  right: 4%;
  top: 31%;
  transform: rotate(34deg);
}

.live-route-path {
  position: absolute;
  width: 62%;
  height: 6px;
  left: 18%;
  top: 53%;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 18px, var(--green) 18px 28px);
  transform: rotate(-18deg);
  transform-origin: left center;
  box-shadow: 0 8px 22px rgba(15, 76, 58, 0.22);
}

.live-map-pin,
.live-map-rider {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--white);
  background: var(--green);
  font-size: 12px;
  font-weight: 950;
  box-shadow: var(--shadow);
  transition: left 180ms ease, top 180ms ease;
}

.live-map-dropoff {
  background: var(--red);
}

.live-map-rider {
  background: #2967b2;
}

.live-map-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.live-map-actions .primary-btn,
.live-map-actions .secondary-btn {
  flex: 1 1 150px;
}

.route-polyline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.route-polyline polyline {
  fill: none;
  stroke: var(--green);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 5 4;
  filter: drop-shadow(0 5px 10px rgba(15, 76, 58, 0.22));
}

.live-map-pin,
.live-map-rider {
  z-index: 2;
}

.place-assist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.place-assist-column {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  padding: 10px;
}

.place-assist-column strong {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}

.place-suggestions {
  display: grid;
  gap: 7px;
}

.place-suggestions button,
.saved-place-strip button {
  border: 1px solid rgba(222, 216, 203, 0.9);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  padding: 8px 10px;
}

.place-suggestions button span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.saved-place-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.saved-place-strip button {
  flex: 0 1 auto;
  font-size: 12px;
}

.trust-list span {
  font-weight: 800;
}

.filter-bar {
  margin: 0 auto 14px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-bar button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  padding: 10px 14px;
}

.filter-bar button.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.market-status {
  margin: -2px auto 16px;
  color: var(--muted);
  font-weight: 800;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.market-card {
  overflow: hidden;
  display: grid;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.market-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.vendor-art {
  min-height: 132px;
  background:
    linear-gradient(135deg, var(--vendor-color), #22352f);
  display: grid;
  place-items: center;
  color: white;
  font-size: 38px;
  font-weight: 950;
}

.market-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.market-meta,
.request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  padding: 22px;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.empty-state strong {
  color: var(--ink);
}

.chip {
  width: fit-content;
  border-radius: 999px;
  background: #eef5ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 9px;
}

.dispatch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.rider-tools {
  width: min(1120px, calc(100vw - 326px));
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) minmax(240px, 1.3fr);
  gap: 16px;
  align-items: center;
}

.rider-tools label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.rider-tools select,
.rider-tools input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 0 12px;
}

.rider-tools input[readonly] {
  background: #f8f1de;
  font-weight: 900;
}

.rider-tools label .secondary-btn {
  min-height: 42px;
}

.rider-tools small {
  color: var(--muted);
  line-height: 1.35;
}

.rider-tools div,
.smart-match,
.relationship-log {
  display: grid;
  gap: 5px;
}

.rider-tools span,
.smart-match span,
.smart-match small,
.relationship-log small {
  color: var(--muted);
  line-height: 1.45;
}

.smart-match,
.relationship-log {
  border: 1px solid rgba(23, 108, 85, 0.18);
  border-radius: 8px;
  background: #eef5ef;
  padding: 10px;
}

.relationship-log {
  background: #fffaf0;
}

.smart-match strong,
.relationship-log strong {
  color: var(--green);
}

.dispatch-board {
  min-height: 382px;
  padding: 18px;
}

#requestList,
.zone-map {
  display: grid;
  gap: 10px;
}

.request-item {
  display: grid;
  gap: 8px;
}

.zone-map {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.zone-card {
  min-height: 112px;
  display: grid;
  align-content: space-between;
}

.zone-card strong {
  color: var(--green);
}

.support-section {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.bottom-nav {
  display: none;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transform: translateY(120px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
  z-index: 10;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Refined sizing pass for a calmer dashboard and mobile app feel. */
:root {
  --content: 1180px;
  --sidebar-size: 248px;
}

h1 {
  font-size: clamp(36px, 4vw, 46px);
  line-height: 1.08;
}

h2 {
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.14;
}

h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.app-shell {
  grid-template-columns: var(--sidebar-size) minmax(0, 1fr);
}

.brand,
.topbar,
.hero,
.metrics,
.service-grid,
.order-layout,
.market-grid,
.dispatch-grid,
.support-section,
.account-layout,
.profile-grid,
.admin-grid,
.section-heading,
.filter-bar,
.market-status,
.rider-tools {
  width: min(var(--content), calc(100vw - var(--sidebar-size) - 56px));
}

.sidebar {
  padding: 20px;
  gap: 20px;
}

.brand {
  font-size: 22px;
}

.brand img {
  width: 38px;
  height: 38px;
}

.side-nav {
  gap: 6px;
}

.side-nav a,
.bottom-nav a {
  padding: 11px 12px;
}

.rider-card {
  padding: 15px;
}

.topbar {
  padding: 13px 0;
  gap: 12px;
}

.search input {
  min-height: 44px;
}

.location-pill,
.wellness-pill,
.user-badge {
  padding-block: 9px;
}

.hero {
  min-height: 470px;
  grid-template-columns: minmax(0, 1.12fr) 340px;
  gap: 28px;
  padding: 22px 0 18px;
}

.hero-copy {
  gap: 14px;
}

.hero-copy p:not(.eyebrow),
.support-section p {
  font-size: 16px;
  line-height: 1.58;
}

.phone-preview {
  min-height: 440px;
  max-width: 340px;
}

.metrics {
  gap: 12px;
  margin-bottom: 46px;
}

.metrics article {
  min-height: 98px;
  padding: 16px;
}

.metrics strong {
  font-size: 24px;
}

.section-heading {
  margin-bottom: 18px;
}

.service-section,
.market-section,
.dispatch-section,
.support-section,
.account-section,
.profile-section,
.admin-section {
  margin-top: 52px;
}

.service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.service-card {
  min-height: 148px;
  padding: 16px;
  gap: 10px;
}

.service-icon {
  width: 42px;
  height: 42px;
  font-size: 19px;
}

.account-form,
.role-panel,
.profile-card,
.admin-card,
.channel-card,
.dispatch-board {
  padding: 16px;
}

.order-layout {
  grid-template-columns: minmax(0, 1fr) 326px;
  gap: 18px;
}

.order-form {
  gap: 12px;
}

.route-entry-card,
.live-map-card,
.live-map-panel {
  padding: 14px;
}

.route-entry-card {
  padding-left: 42px;
}

.route-field input {
  min-height: 54px;
  font-size: 15px;
}

.quote-panel {
  padding: 18px;
  top: 78px;
}

.price {
  font-size: 40px;
}

.quote-breakdown,
.trust-list,
.route-tracker {
  gap: 8px;
}

.quote-breakdown div,
.trust-list span,
.route-tracker div,
.request-item,
.zone-card {
  padding: 10px;
}

.live-map-layout {
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 14px;
}

.live-map-canvas {
  min-height: 300px;
}

.compact-heading h3 {
  font-size: 19px;
}

.dispatch-grid,
.admin-grid,
.profile-grid {
  gap: 14px;
}

.rider-tools {
  grid-template-columns: repeat(3, minmax(170px, 1fr)) minmax(220px, 1.2fr);
  padding: 14px;
  gap: 14px;
}

.dispatch-board {
  min-height: 340px;
}

.zone-card {
  min-height: 98px;
}

.support-section {
  padding: 20px;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .brand,
  .topbar,
  .hero,
  .metrics,
  .service-grid,
  .order-layout,
  .market-grid,
  .dispatch-grid,
  .rider-tools,
  .live-map-layout,
  .support-section,
  .account-layout,
  .profile-grid,
  .admin-grid,
  .section-heading,
  .filter-bar,
  .market-status {
    width: min(100% - 32px, 940px);
  }

  .auth-gate {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .phone-preview {
    min-height: 480px;
    max-width: 430px;
  }

  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .market-grid,
  .live-map-layout,
  .dispatch-grid,
  .account-layout,
  .profile-grid,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-layout {
    grid-template-columns: 1fr;
  }

  .quote-panel {
    position: static;
  }
}

/* Compact modern scale pass for cleaner dashboards and mobile views. */
:root {
  --compact-radius: 8px;
  --compact-gap: 12px;
}

body {
  font-size: 14px;
}

h1 {
  font-size: clamp(32px, 3.2vw, 40px);
  line-height: 1.08;
}

h2 {
  font-size: clamp(23px, 2.2vw, 28px);
}

h3 {
  font-size: 16px;
}

.eyebrow {
  font-size: 10px;
}

.topbar,
.hero,
.metrics,
.service-grid,
.order-layout,
.dispatch-grid,
.support-section,
.profile-grid,
.admin-grid,
.section-heading {
  width: min(1040px, calc(100vw - var(--sidebar-size, 248px) - 48px));
}

.section-heading {
  margin-bottom: 14px;
}

.hero {
  min-height: 440px;
  padding-block: 18px;
}

.hero-copy p:not(.eyebrow),
.support-section p,
.auth-hero p:not(.eyebrow) {
  font-size: 15px;
  line-height: 1.55;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 42px;
  border-radius: var(--compact-radius);
  padding-inline: 14px;
  font-size: 13px;
}

.search input,
.order-form input,
.order-form select,
.order-form textarea,
.account-form input,
.account-form select,
.admin-form input,
.profile-form input,
.rider-tools select,
.rider-tools input {
  min-height: 42px;
  border-radius: var(--compact-radius);
  font-size: 13px;
  padding-inline: 11px;
}

.order-form textarea {
  min-height: 96px;
}

.service-card,
.quote-panel,
.profile-card,
.admin-card,
.channel-card,
.dispatch-board,
.rider-tools,
.live-map-card,
.route-entry-card {
  border-radius: var(--compact-radius);
  padding: 14px;
}

.service-card {
  min-height: 118px;
}

.service-icon {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.service-card h3,
.channel-card h3,
.admin-card h3,
.profile-card h3 {
  margin-bottom: 7px;
}

.service-card p,
.quote-panel p,
.channel-request small,
.admin-row small,
.admin-switch small,
.profile-meta,
.permission-item span {
  font-size: 12px;
  line-height: 1.45;
}

.order-form,
.admin-grid,
.profile-grid,
.dispatch-grid,
.service-grid,
.metrics,
.zone-map,
.rider-tools {
  gap: var(--compact-gap);
}

.channel-request {
  border-radius: var(--compact-radius);
  padding: 10px;
  gap: 10px;
}

.channel-actions {
  gap: 7px;
}

.chip {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
}

.price {
  font-size: 34px;
}

.admin-stats,
.profile-stats {
  gap: 8px;
}

.profile-stat,
.permission-item,
.trust-card,
.admin-row,
.admin-switch {
  border-radius: var(--compact-radius);
  padding: 10px;
}

.profile-avatar {
  width: 74px;
  height: 74px;
  font-size: 22px;
}

.sidebar {
  padding: 16px;
}

.side-nav a {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: var(--compact-radius);
  font-size: 14px;
}

.rider-card {
  padding: 12px;
  border-radius: var(--compact-radius);
}

.bottom-nav {
  border-radius: 14px;
}

@media (max-width: 1080px) {
  .topbar,
  .hero,
  .metrics,
  .service-grid,
  .order-layout,
  .dispatch-grid,
  .rider-tools,
  .live-map-layout,
  .support-section,
  .profile-grid,
  .admin-grid,
  .section-heading {
    width: min(100% - 24px, 900px);
  }

  .hero {
    min-height: auto;
  }

  .phone-preview {
    min-height: 390px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 13px;
  }

  main {
    padding-bottom: 86px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 15px;
  }

  .auth-gate {
    padding: 14px 10px 26px;
  }

  .auth-panel .account-form {
    padding: 15px;
  }

  .auth-panel .account-form h3 {
    font-size: 22px;
  }

  .topbar {
    gap: 8px;
    padding-block: 10px;
  }

  .location-pill,
  .wellness-pill,
  .user-badge {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .hero {
    gap: 16px;
    padding-top: 10px;
  }

  .hero-copy p:not(.eyebrow),
  .support-section p,
  .auth-hero p:not(.eyebrow) {
    font-size: 14px;
  }

  .metrics article,
  .service-card,
  .quote-panel,
  .profile-card,
  .admin-card,
  .channel-card,
  .dispatch-board,
  .rider-tools,
  .live-map-card,
  .route-entry-card {
    padding: 12px;
  }

  .service-card {
    min-height: 104px;
  }

  .route-entry-card {
    padding-left: 34px;
  }

  .route-field input,
  .order-form input,
  .order-form select,
  .account-form input,
  .account-form select,
  .profile-form input {
    min-height: 40px;
  }

  .live-map-canvas {
    min-height: 220px;
  }

  .price {
    font-size: 30px;
  }

  .phone-preview {
    min-height: 320px;
    border-width: 7px;
    border-radius: 24px;
  }

  .bottom-nav {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
    gap: 5px;
    padding: 6px;
  }

  .bottom-nav a {
    min-height: 38px;
    font-size: 10px;
  }

  .toast {
    bottom: 76px;
  }
}

@media (max-width: 760px) {
  .auth-gate {
    min-height: 100svh;
    grid-template-columns: 1fr;
    gap: 12px;
    align-content: start;
    padding: 10px 10px 18px;
  }

  .auth-hero {
    gap: 8px;
    padding-top: 0;
  }

  .auth-brand {
    margin-bottom: 2px;
  }

  .auth-brand img {
    width: 38px;
    height: 38px;
  }

  .auth-hero h1 {
    max-width: 340px;
    font-size: 25px;
    line-height: 1.08;
  }

  .auth-hero p:not(.eyebrow) {
    max-width: 340px;
    font-size: 13px;
    line-height: 1.4;
  }

  .auth-highlights {
    display: none;
  }

  .auth-panel {
    gap: 10px;
  }

  .auth-panel .account-form {
    min-height: auto;
    padding: 14px;
  }

  .login-card-head {
    gap: 5px;
  }

  .auth-lock {
    width: 48px;
    height: 48px;
  }

  .auth-panel .account-form h3 {
    font-size: 21px;
  }

  .auth-panel .account-form p {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.35;
  }

  .auth-panel .role-panel {
    display: none;
  }
}

@media (max-width: 760px) {
  main {
    padding-bottom: 96px;
  }

  h1 {
    font-size: 32px;
    line-height: 1.1;
  }

  h2 {
    font-size: 25px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    width: calc(100% - 24px);
  }

  .auth-actions {
    justify-content: flex-start;
  }

  .location-pill,
  .wellness-pill {
    justify-content: space-between;
  }

  .auth-gate {
    min-height: 100vh;
    padding: 18px 12px 34px;
  }

  .auth-highlights {
    grid-template-columns: 1fr;
  }

  .auth-panel .account-form {
    min-height: auto;
    padding: 20px;
  }

  .hero {
    padding-top: 18px;
    gap: 20px;
  }

  .hero-copy p:not(.eyebrow),
  .support-section p {
    font-size: 16px;
  }

  .metrics,
  .service-grid,
  .market-grid,
  .live-map-layout,
  .dispatch-grid,
  .rider-tools,
  .order-layout,
  .order-form,
  .zone-map,
  .account-layout,
  .profile-grid,
  .admin-grid,
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 124px;
  }

  .route-entry-card {
    padding: 14px 14px 14px 40px;
  }

  .route-field input {
    min-height: 52px;
  }

  .live-map-canvas {
    min-height: 260px;
  }

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

  .metrics {
    margin-bottom: 28px;
  }

  .service-section,
  .market-section,
  .dispatch-section,
  .support-section,
  .account-section,
  .profile-section,
  .admin-section {
    margin-top: 44px;
  }

  .channel-request,
  .admin-row,
  .admin-switch {
    display: grid;
    align-items: start;
  }

  .channel-actions {
    justify-content: start;
  }

  .quote-panel {
    position: static;
  }

  .price {
    font-size: 36px;
  }

  .phone-preview {
    min-height: 400px;
    border-width: 8px;
    border-radius: 28px;
  }

  .market-grid {
    gap: 12px;
  }

  .support-section {
    display: grid;
  }

  .bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 253, 248, 0.94);
    box-shadow: var(--shadow);
    padding: 8px;
    backdrop-filter: blur(18px);
  }

  .bottom-nav a {
    min-height: 44px;
    display: grid;
    place-items: center;
    color: var(--muted);
    padding: 0;
    font-size: 11px;
  }

  .bottom-nav a.active {
    background: var(--green);
    color: var(--white);
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 88px;
    max-width: none;
  }
}
