:root {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: #111827;
  background: #f3f4f6;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f3f4f6;
}

body {
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  padding-bottom: 92px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding:
    calc(14px + env(safe-area-inset-top))
    18px
    14px;

  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(14px);
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 22px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  color: #6b7280;
}

.topbar-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge.good {
  color: #166534;
  background: #dcfce7;
}

.badge.warn {
  color: #92400e;
  background: #fef3c7;
}

.badge.bad {
  color: #991b1b;
  background: #fee2e2;
}

.badge.pending {
  color: #374151;
  background: #e5e7eb;
}

.view {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.stack {
  display: grid;
  gap: 14px;
}

.card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 5px 20px rgba(17,24,39,.05);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.card-subtitle {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}

.section-title {
  margin: 8px 2px 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #6b7280;
  text-transform: uppercase;
}

.map-shell {
  position: relative;
  min-height: 320px;
  background: #e5e7eb;
}

.map-shell iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

.map-state {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  color: #4b5563;
  background:
    linear-gradient(
      135deg,
      #f9fafb,
      #e5e7eb
    );
}

.map-state strong {
  display: block;
  margin-bottom: 7px;
  color: #111827;
  font-size: 16px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.button {
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  padding: 12px 15px;
  font-weight: 800;
}

.button.primary {
  color: #ffffff;
  background: #111827;
}

.button.secondary {
  color: #111827;
  background: #e5e7eb;
}

.button.success {
  color: #ffffff;
  background: #166534;
}

.button.danger {
  color: #991b1b;
  background: #fee2e2;
}

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

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

  padding: 11px 0;
  border-bottom: 1px solid #f3f4f6;
}

.row:last-child {
  border-bottom: 0;
}

.row-label {
  color: #6b7280;
  font-size: 12px;
}

.row-value {
  max-width: 66%;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  word-break: break-word;
}

.proof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.proof {
  padding: 13px;
  border-radius: 13px;
  background: #f3f4f6;
}

.proof.done {
  color: #166534;
  background: #dcfce7;
}

.proof strong {
  display: block;
  font-size: 13px;
}

.proof span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.route-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.route-stop {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  background: #ffffff;
}

.route-stop.current {
  border-width: 2px;
  border-color: #111827;
}

.route-stop.done {
  opacity: .62;
}

.route-stop-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

.route-stop-meta {
  margin-top: 5px;
  color: #6b7280;
  font-size: 12px;
}

.offer {
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
}

.offer:last-child {
  border-bottom: 0;
}

.offer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.offer-payout {
  white-space: nowrap;
  font-weight: 900;
}

.swipe-shell {
  position: relative;
  height: 58px;
  margin-top: 14px;
  overflow: hidden;

  border-radius: 999px;
  background: #dcfce7;
  border: 1px solid #bbf7d0;

  touch-action: none;
  user-select: none;
}

.swipe-shell.disabled {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.swipe-label {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  padding-left: 60px;
  padding-right: 18px;

  color: #166534;
  font-size: 13px;
  font-weight: 900;
}

.swipe-shell.disabled .swipe-label {
  color: #6b7280;
}

.swipe-thumb {
  position: absolute;
  top: 5px;
  left: 5px;

  display: grid;
  place-items: center;

  width: 48px;
  height: 48px;

  border: 0;
  border-radius: 50%;

  color: #ffffff;
  background: #166534;

  font-size: 20px;
  font-weight: 900;

  transform: translateX(0);
  transition: transform .18s ease;
}

.swipe-shell.dragging .swipe-thumb {
  transition: none;
}

.swipe-shell.disabled .swipe-thumb {
  background: #9ca3af;
}

.empty {
  padding: 24px 18px;
  text-align: center;
  color: #6b7280;
}

.form-group {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.form-group label {
  font-size: 12px;
  font-weight: 800;
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;

  border: 1px solid #d1d5db;
  border-radius: 12px;

  background: #ffffff;
  color: #111827;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;

  display: grid;
  grid-template-columns: repeat(5,1fr);

  padding:
    8px
    8px
    calc(8px + env(safe-area-inset-bottom));

  background: rgba(255,255,255,.97);
  border-top: 1px solid #e5e7eb;
  backdrop-filter: blur(16px);
}

.nav-button {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: transparent;

  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
}

.nav-button.active {
  color: #111827;
  background: #f3f4f6;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 96px;

  max-width: min(92vw,480px);
  padding: 12px 16px;

  border-radius: 13px;

  color: #ffffff;
  background: #111827;

  font-size: 13px;
  font-weight: 700;

  opacity: 0;
  pointer-events: none;

  transform: translate(-50%,12px);
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%,0);
}

.small {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}

@media (min-width: 620px) {
  .actions.two {
    grid-template-columns: 1fr 1fr;
  }

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