:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-strong: #f3f6fb;
  --text: #1f2937;
  --muted: #667085;
  --line: #d7dde8;
  --blue: #2f6fed;
  --blue-dark: #174ea6;
  --green: #12b76a;
  --amber: #d97706;
  --red: #dc2626;
  --ink: #0c1222;
  --accent: #2f6fed;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
}

a {
  color: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 18px;
  background: #0c1222;
  color: #f8fafc;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--blue);
  font-weight: 800;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

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

.brand-name {
  font-weight: 780;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtitle {
  margin-top: 2px;
  color: #bcd3ca;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a,
.nav-action {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #d9e2ef;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.nav .nav-link {
  width: 100%;
  font: inherit;
}

.nav a.active,
.nav a:hover,
.nav .nav-link.active,
.nav .nav-link:hover,
.nav-action:hover {
  background: #183f35;
  color: #ffffff;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.8;
  flex: 0 0 auto;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  padding: 28px clamp(20px, 3vw, 42px) 40px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dispatch-topbar {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: start;
}

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

.dispatch-metrics {
  margin-bottom: 20px;
}

.dashboard-section {
  margin-top: 32px;
  scroll-margin-top: 22px;
}

.dispatch-view {
  display: none;
}

.dispatch-view.active {
  display: block;
}

.view-section {
  margin-top: 0;
}

.overview-workspace,
.dispatch-workspace,
.driver-workspace {
  display: grid;
  gap: 16px;
  align-items: start;
}

.overview-workspace {
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  margin-top: 0;
}

.operations-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 16px;
  align-items: start;
  margin-top: 0;
}

.operations-workspace .map-wrap {
  min-height: 520px;
}

.dispatch-workspace {
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
}

.driver-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.channel-provider {
  margin: 0;
}

.channel-list {
  display: grid;
  gap: 0;
}

.channel-connection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.channel-connection:first-child {
  padding-top: 0;
}

.channel-connection:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.webhook-result {
  margin-top: 16px;
  border-color: #86d8ab;
}

.copy-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-field code {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px;
  overflow-wrap: anywhere;
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
}

.error-copy {
  color: var(--red);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.section-subtitle {
  max-width: 700px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.panel-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.panel-body {
  padding: 16px;
}

.metric {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.metric-value {
  color: var(--ink);
  font-size: 27px;
  font-weight: 780;
  line-height: 1;
}

.metric-detail {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.count-chip {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f6df;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.manage-panel {
  overflow: hidden;
}

.manage-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.manage-summary::-webkit-details-marker {
  display: none;
}

.manage-summary:hover {
  background: #f8fafc;
}

.manage-summary .panel-subtitle {
  display: block;
}

.summary-control {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 19px;
  font-weight: 620;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.manage-panel[open] .summary-control {
  transform: rotate(45deg);
  background: #eaf1ff;
  color: var(--blue-dark);
}

.manage-panel[open] .manage-summary {
  border-bottom: 1px solid var(--line);
}

.map-wrap {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border-radius: var(--radius);
  border: 1px solid #bfd4e5;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px) 0 0 / 44px 44px,
    #eef7f6;
}

.map-wrap.small {
  min-height: 300px;
}

.map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.google-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 100%;
  opacity: 0;
  pointer-events: none;
}

.map-wrap.google-active .google-map {
  opacity: 1;
  pointer-events: auto;
}

.map-wrap.google-active .map-canvas {
  opacity: 0;
}

.map-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 7px 9px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.map-eta {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;
  max-width: min(430px, calc(100% - 24px));
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  box-shadow: var(--shadow);
}

.map-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
}

.map-eta:not([hidden]) + .map-legend {
  top: 52px;
  bottom: auto;
}

.driver-map-pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--pin-color, #2563eb);
  border: 2px solid #fff;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.24);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.item-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.item-title {
  margin: 0;
  color: var(--ink);
  font-weight: 720;
}

.item-detail {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-actions,
.tracking-links {
  display: grid;
  gap: 8px;
}

.tracking-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.tracking-link:first-child {
  padding-top: 0;
  border-top: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status.active,
.status.en-route {
  background: #dbeafe;
  color: #1d4ed8;
}

.status.available,
.status.approved,
.status.delivered {
  background: #dcfce7;
  color: #047857;
}

.compact-heading {
  margin: 4px 0 12px;
}

.review-heading {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.status.completed,
.status.submitted {
  background: #fef3c7;
  color: #92400e;
}

.status.wix-fulfilled {
  background: #e0f2fe;
  color: #075985;
}

.status.wix-pending {
  background: #f1f5f9;
  color: #475569;
}

.status.rejected,
.status.offline {
  background: #fee2e2;
  color: #b91c1c;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  background: var(--blue-dark);
}

.button.secondary {
  background: #ffffff;
  color: var(--text);
  border-color: var(--line);
}

.button.secondary:hover {
  background: #f1f5f9;
}

.button.success {
  background: var(--green);
}

.button.warning {
  background: var(--amber);
}

.button.danger {
  background: var(--red);
}

.button.ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.form-grid.compact {
  gap: 8px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.color-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.color-field legend {
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatch {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  cursor: pointer;
}

.color-swatch input {
  position: absolute;
  opacity: 0;
}

.color-swatch-dot {
  width: 28px;
  height: 28px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--swatch-color);
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.color-swatch:hover .color-swatch-dot {
  transform: scale(1.08);
}

.color-swatch input:checked + .color-swatch-dot {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--blue);
}

.color-swatch input:focus-visible + .color-swatch-dot {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink);
}

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

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 9px 10px;
  outline: none;
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #ffffff;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  background: #f8fafc;
}

tr:last-child td {
  border-bottom: 0;
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 20px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.login-help {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #c7d7fe;
  border-radius: var(--radius);
  background: #f5f8ff;
  color: #33507a;
  font-size: 13px;
  line-height: 1.45;
}

.login-help strong {
  color: #174ea6;
}

.status.queued {
  background: #fef3c7;
  color: #92400e;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #0f172a;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 160ms ease;
}

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

.public-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f7f9fd 0%, #eef4ff 54%, #f6f8fb 100%);
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(215, 221, 232, 0.84);
  backdrop-filter: blur(16px);
}

.public-nav .brand-name {
  color: var(--ink);
}

.public-nav .brand-subtitle {
  color: var(--muted);
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.public-nav-links a {
  padding: 9px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
}

.public-nav-links a:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.public-brand-mark {
  width: 44px;
  height: 44px;
}

.public-main {
  display: grid;
  gap: 44px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.app-login-main {
  min-height: calc(100vh - 77px);
  align-items: center;
  padding: 44px 0;
}

.app-gateway {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.64fr);
  gap: 44px;
  align-items: center;
  width: 100%;
}

.app-gateway-copy {
  display: grid;
  gap: 18px;
}

.app-gateway-title {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: 58px;
  line-height: 1;
}

.app-gateway-subtitle {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.app-gateway-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  width: fit-content;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid #c8d8f8;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.app-status-dot {
  grid-row: span 2;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(18, 183, 106, 0.14);
}

.app-gateway-status strong,
.app-gateway-grid strong,
.app-gateway-meta strong {
  color: var(--ink);
  line-height: 1.25;
}

.app-gateway-status small,
.app-gateway-grid span,
.app-gateway-meta span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.app-gateway-grid,
.app-gateway-meta {
  display: grid;
  gap: 10px;
}

.app-gateway-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
}

.app-gateway-grid > div,
.app-gateway-meta > div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.app-gateway-login {
  display: grid;
  gap: 12px;
}

.app-gateway-login .login-panel {
  width: 100%;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.15);
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
  min-height: min(760px, calc(100vh - 78px));
  padding: 18px 0 26px;
}

.public-copy {
  display: grid;
  gap: 18px;
}

.public-badge {
  width: fit-content;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #b8caf8;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.public-title {
  max-width: 740px;
  margin: 0;
  color: var(--ink);
  font-size: 68px;
  line-height: 0.98;
}

.public-subtitle {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

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

.button.public-primary,
.public-primary {
  background: #0c1222;
  color: #ffffff;
}

.button.public-primary:hover,
.public-primary:hover {
  background: #1f2a44;
}

.public-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.public-proof-grid > div,
.public-card,
.pricing-mini > div,
.revenue-ladder > div,
.growth-checklist > div,
.growth-stats > div {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.public-proof-grid > div {
  display: grid;
  gap: 5px;
  min-height: 108px;
  padding: 14px;
}

.public-proof-grid strong,
.public-card h3,
.pricing-mini strong,
.revenue-ladder strong,
.growth-checklist strong,
.growth-stats strong {
  color: var(--ink);
}

.public-proof-grid span,
.public-card p,
.pricing-mini span,
.pricing-mini small,
.revenue-ladder span,
.revenue-ladder small,
.growth-checklist span,
.growth-stats span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.public-product-frame {
  overflow: hidden;
  min-height: 500px;
  border: 1px solid #c6d4ec;
  border-radius: var(--radius);
  background: #0c1222;
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.22);
}

.ops-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #e5eefb;
}

.ops-window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #5dd6a0;
}

.ops-window-bar span:nth-child(2) {
  background: #f8c14b;
}

.ops-window-bar span:nth-child(3) {
  background: #fb7185;
}

.ops-window-bar strong {
  margin-left: 8px;
  font-size: 13px;
}

.ops-dashboard-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 16px;
  padding: 18px;
}

.ops-preview-main,
.ops-preview-side > div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.ops-preview-main {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.ops-preview-header,
.lead-card-main {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.ops-preview-header span,
.ops-preview-side span {
  color: #aab8d4;
  font-size: 12px;
}

.ops-preview-header strong,
.ops-preview-side strong {
  color: #ffffff;
}

.ops-route-line {
  height: 12px;
  width: 68%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5dd6a0, #2f6fed);
}

.ops-route-line.wide {
  width: 100%;
  opacity: 0.55;
}

.ops-preview-map {
  position: relative;
  min-height: 315px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    #111b32;
}

.ops-preview-map::before {
  content: "";
  position: absolute;
  inset: 22% 14% 18% 12%;
  border-top: 5px solid #5dd6a0;
  border-right: 5px solid #2f6fed;
  border-radius: 120px 8px 120px 8px;
  transform: rotate(-11deg);
  opacity: 0.9;
}

.ops-preview-map i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 17px;
  height: 17px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: #2f6fed;
  box-shadow: 0 0 0 8px rgba(47, 111, 237, 0.16);
}

.ops-preview-side {
  display: grid;
  gap: 12px;
}

.ops-preview-side > div {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 118px;
  padding: 14px;
}

.ops-preview-side strong {
  font-size: 28px;
}

.public-section {
  scroll-margin-top: 88px;
}

.company-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: 28px;
  align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.company-copy {
  display: grid;
  gap: 8px;
}

.company-copy .section-title {
  max-width: 780px;
  font-size: 30px;
  line-height: 1.15;
}

.company-copy .section-subtitle {
  max-width: 820px;
  font-size: 16px;
}

.company-facts,
.service-flow,
.industry-grid {
  display: grid;
  gap: 12px;
}

.company-facts > div,
.service-flow article,
.industry-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.company-facts > div {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.company-facts span,
.service-flow span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.company-facts strong,
.service-flow strong,
.industry-grid strong {
  color: var(--ink);
  line-height: 1.25;
}

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

.public-card {
  min-height: 170px;
  padding: 18px;
}

.public-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.public-card p {
  margin: 0;
  font-size: 14px;
}

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

.service-flow article {
  display: grid;
  gap: 9px;
  min-height: 190px;
  padding: 18px;
}

.service-flow p,
.industry-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.industry-grid article {
  display: grid;
  gap: 8px;
  min-height: 140px;
  padding: 18px;
}

.public-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  gap: 28px;
  align-items: start;
  padding: 12px 0 24px;
}

.pricing-mini,
.revenue-ladder,
.growth-checklist,
.growth-stats {
  display: grid;
  gap: 10px;
}

.pricing-mini {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.pricing-mini > div,
.revenue-ladder > div,
.growth-checklist > div,
.growth-stats > div {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.pricing-mini strong {
  font-size: 21px;
  line-height: 1.1;
}

.pilot-panel {
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.lead-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-message {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.4;
}

.lead-message.success {
  background: #ecfdf3;
  color: #027948;
}

.lead-message.error {
  background: #fef2f2;
  color: #b42318;
}

.login-stack {
  display: grid;
  justify-items: center;
}

.login-panel {
  width: min(100%, 480px);
}

.growth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.growth-side {
  display: grid;
  gap: 16px;
}

.lead-list {
  display: grid;
  gap: 12px;
}

.lead-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.lead-card-title {
  color: var(--ink);
  font-weight: 780;
}

.lead-card-detail,
.lead-notes {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.lead-facts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-facts span,
.lead-stage {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lead-stage.new {
  background: #eef4ff;
  color: var(--blue-dark);
}

.lead-stage.qualified {
  background: #ecfdf3;
  color: #027948;
}

.lead-stage.pilot {
  background: #fff7ed;
  color: #b54708;
}

.lead-stage.won {
  background: #dcfce7;
  color: #047857;
}

.lead-stage.lost {
  background: #f1f5f9;
  color: #475467;
}

.compact-pricing {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.growth-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.growth-stats strong {
  font-size: 22px;
}

.customer-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.customer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.customer-main {
  padding: 24px;
}

.driver-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
}

.tracking-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.35);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(5, 150, 105, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
  }
}

.split-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.route-line {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.route-pin {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--blue);
}

.route-pin.end {
  background: var(--green);
}

.route-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.route-value {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 720;
}

.inline-edit {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-edit .input {
  width: 150px;
}

.desktop-table {
  display: block;
}

.mobile-log-list {
  display: none;
}

.trip-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.trip-card-metrics strong {
  color: var(--ink);
  text-align: right;
}

.mobile-tabs {
  display: none;
  gap: 4px;
  padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
  background: #ffffff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -14px 28px rgba(22, 32, 51, 0.09);
}

.mobile-tab {
  flex: 1 1 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 54px;
  padding: 7px 4px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 720;
}

.mobile-tab.active {
  background: #eaf1ff;
  color: var(--blue);
}

.mobile-tab-mark {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid currentColor;
}

.mobile-tab.active .mobile-tab-mark {
  background: currentColor;
}

.driver-topbar {
  margin-bottom: 24px;
}

.driver-section {
  margin-top: 34px;
  scroll-margin-top: 18px;
}

.driver-section:first-of-type {
  margin-top: 0;
}

.driver-today-layout,
.driver-inbox-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.driver-focus-card {
  border-color: #c9d8f3;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.08);
}

.driver-current-trip,
.driver-action-stack,
.driver-recent-list {
  display: grid;
  gap: 12px;
}

.driver-route-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.driver-primary-action {
  min-height: 52px;
  font-size: 16px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  background: #f1f5f9;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.privacy-note.sharing {
  background: #ecfdf3;
  color: #046c4e;
}

.privacy-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #94a3b8;
}

.privacy-note.sharing .privacy-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.driver-mini-metrics,
.driver-report-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.driver-mini-metrics > div,
.driver-report-status > div {
  display: grid;
  gap: 3px;
  padding: 12px 8px;
  border-radius: var(--radius);
  background: var(--surface-strong);
  text-align: center;
}

.driver-mini-metrics strong,
.driver-report-status strong {
  color: var(--ink);
  font-size: 18px;
}

.driver-mini-metrics span,
.driver-report-status span {
  color: var(--muted);
  font-size: 11px;
}

.driver-trip-row,
.driver-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.driver-trip-row:last-child,
.driver-profile-row:last-child {
  border-bottom: 0;
}

.compact-empty {
  min-height: 92px;
}

.driver-section .mobile-log-list {
  display: grid;
  gap: 10px;
}

.driver-report-card,
.driver-profile-card {
  max-width: 720px;
}

.driver-report-total {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
}

.driver-report-total span,
.driver-report-total small,
.driver-profile-row span,
.privacy-copy {
  color: var(--muted);
}

.driver-report-total strong {
  color: var(--ink);
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1;
}

.privacy-copy {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

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

  .sidebar {
    display: none;
  }

  .mobile-tabs {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
  }

  .main,
  .customer-main {
    padding: 16px 16px calc(94px + env(safe-area-inset-bottom));
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .overview-workspace,
  .operations-workspace,
  .dispatch-workspace,
  .driver-workspace,
  .channel-grid,
  .growth-grid,
  .app-gateway,
  .public-hero,
  .public-split,
  .company-band,
  .public-card-grid,
  .app-gateway-grid,
  .service-flow,
  .industry-grid,
  .driver-today-layout,
  .driver-inbox-grid {
    grid-template-columns: 1fr;
  }

  .public-hero {
    min-height: auto;
    padding-top: 10px;
  }

  .public-title {
    font-size: 52px;
  }

  .app-login-main {
    align-items: start;
  }

  .app-gateway {
    gap: 24px;
  }

  .app-gateway-title {
    font-size: 46px;
  }

  .public-product-frame {
    min-height: 430px;
  }

  .pricing-mini,
  .public-proof-grid {
    grid-template-columns: 1fr;
  }

  .map-wrap {
    min-height: 340px;
  }

  .desktop-table {
    display: none;
  }

  .mobile-log-list {
    display: grid;
    gap: 10px;
  }
}

@media (max-width: 680px) {
  .topbar,
  .customer-header,
  .item-main {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar,
  .split-actions {
    justify-content: stretch;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-section {
    margin-top: 26px;
  }

  .dispatch-topbar {
    margin-bottom: 18px;
  }

  .section-title {
    font-size: 18px;
  }

  .button {
    width: 100%;
    min-height: 44px;
  }

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

  .input,
  .select,
  .textarea {
    font-size: 16px;
    min-height: 44px;
  }

  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .map-wrap,
  .map-wrap.small {
    min-height: min(56vh, 430px);
  }

  .item-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .channel-connection {
    grid-template-columns: 1fr;
  }

  .copy-field {
    align-items: stretch;
    flex-direction: column;
  }

  .tracking-link {
    flex-direction: column;
    align-items: stretch;
  }

  .trip-card-metrics {
    grid-template-columns: 1fr;
  }

  .trip-card-metrics strong {
    text-align: left;
  }

  .driver-section {
    margin-top: 30px;
  }

  .driver-mini-metrics,
  .driver-report-status {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-value {
    font-size: 23px;
  }

  .page-title {
    font-size: 22px;
  }

  .public-main {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }

  .public-nav {
    flex-wrap: wrap;
    padding: 12px;
  }

  .public-nav .brand {
    flex: 1 1 auto;
  }

  .public-nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-top: 2px;
  }

  .company-copy .section-title {
    font-size: 24px;
  }

  .app-gateway-title {
    font-size: 36px;
    line-height: 1.06;
  }

  .app-gateway-subtitle {
    font-size: 16px;
  }

  .app-gateway-login {
    order: -1;
  }

  .public-title {
    font-size: 40px;
    line-height: 1.04;
  }

  .public-subtitle {
    font-size: 16px;
  }

  .public-actions,
  .public-login-link {
    width: 100%;
  }

  .public-product-frame {
    min-height: 380px;
  }

  .ops-dashboard-preview {
    grid-template-columns: 1fr;
  }

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

  .ops-preview-side > div {
    min-height: 88px;
    padding: 10px;
  }

  .ops-preview-side strong {
    font-size: 20px;
  }

  .lead-card-main {
    flex-direction: column;
  }

  .growth-stats,
  .driver-mini-metrics,
  .driver-report-status {
    grid-template-columns: 1fr;
  }
}
.active-route-stop[draggable="true"] {
  cursor: grab;
}

.active-route-stop.dragging {
  opacity: 0.55;
  cursor: grabbing;
  outline: 2px dashed var(--accent);
}

.active-route-group + .active-route-group {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
