:root {
  --ink: #111827;
  --muted: #667085;
  --surface: #ffffff;
  --surface-soft: #f3f5f7;
  --line: #d8dee8;
  --accent: #d9ff43;
  --accent-strong: #b9e700;
  --danger: #b42318;
  --success: #027a48;
  --radius-lg: 24px;
  --radius-md: 14px;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-soft);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(217, 255, 67, 0.20), transparent 28rem),
    var(--surface-soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

button {
  cursor: pointer;
}

.site-header {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--accent);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.app-shell {
  width: min(920px, calc(100% - 32px));
  margin: 24px auto 64px;
}

.hero {
  min-height: 230px;
  border-radius: 32px;
  background: var(--ink);
  color: white;
  padding: clamp(28px, 6vw, 56px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border: 38px solid var(--accent);
  border-radius: 50%;
  right: -86px;
  top: -108px;
  opacity: 0.95;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.step-label {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent);
}

.step-label {
  color: var(--muted);
}

.hero h1,
.card h2 {
  margin: 0;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero h1 {
  max-width: 620px;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
}

.hero p:not(.eyebrow) {
  max-width: 560px;
  margin: 18px 0 0;
  color: #cbd5e1;
}

.status-pill {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  padding: 8px 12px;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-pill.offline {
  color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid rgba(216, 222, 232, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 42px);
}

.booking-card {
  margin-top: -26px;
  position: relative;
  z-index: 2;
}

.saved-card,
.confirmation-card {
  margin-top: 24px;
}

.confirmation-card {
  display: flex;
  gap: 18px;
  align-items: center;
  border-color: rgba(2, 122, 72, 0.28);
}

.confirmation-card[hidden] {
  display: none;
}

.confirmation-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ecfdf3;
  color: var(--success);
  font-size: 1.4rem;
  font-weight: 900;
}

.confirmation-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

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

.route-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px;
}

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

.field {
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  color: var(--ink);
  min-height: 50px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  margin-top: 8px;
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #809900;
  box-shadow: 0 0 0 4px rgba(217, 255, 67, 0.35);
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: var(--danger);
}

.input-with-icon {
  position: relative;
}

.input-with-icon input {
  padding-left: 42px;
}

.route-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.input-with-icon .route-dot {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.pickup-dot {
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px rgba(185, 231, 0, 0.14);
}

.destination-dot {
  background: var(--ink);
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.12);
}

.swap-button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease;
}

.swap-button:hover {
  transform: rotate(180deg);
  background: var(--surface-soft);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin-top: 2px;
  accent-color: var(--ink);
}

.button {
  border: 0;
  border-radius: var(--radius-md);
  padding: 13px 18px;
  font-weight: 850;
}

.button-primary {
  background: var(--accent);
  color: var(--ink);
}

.button-primary:hover {
  background: var(--accent-strong);
}

.button-secondary {
  background: var(--ink);
  color: white;
}

.submit-button {
  width: 100%;
  min-height: 56px;
  font-size: 1rem;
}

.install-button {
  white-space: nowrap;
}

.form-message {
  min-height: 22px;
  margin-bottom: 8px;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 700;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px;
  font-weight: 750;
}

.text-button:hover {
  color: var(--ink);
  text-decoration: underline;
}

.bookings-list {
  display: grid;
  gap: 14px;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
}

.booking-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.booking-route {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  align-items: center;
}

.booking-route small,
.booking-route strong {
  display: block;
}

.booking-route small {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.route-line {
  width: 2px;
  height: 22px;
  background: var(--line);
  margin-left: 5px;
}

.booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 10px;
}

.booking-meta span {
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.delete-booking {
  color: var(--danger);
}

footer {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto 32px;
  color: var(--muted);
  text-align: center;
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 16px;
  }

  .brand small {
    display: none;
  }

  .app-shell {
    margin-top: 8px;
  }

  .hero {
    min-height: 250px;
    align-items: flex-start;
    flex-direction: column;
  }

  .status-pill {
    margin-top: auto;
  }

  .route-grid {
    grid-template-columns: 1fr auto;
  }

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

  .swap-button {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    margin-top: 22px;
    position: absolute;
    right: 34px;
    transform: rotate(0deg);
  }

  .swap-button:hover {
    transform: rotate(180deg);
  }

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

@media (max-width: 520px) {
  .site-header,
  .app-shell,
  footer {
    width: min(100% - 20px, 920px);
  }

  .install-button {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .hero {
    border-radius: 24px;
    padding: 28px 22px 48px;
  }

  .booking-card {
    margin-top: -22px;
  }

  .card {
    border-radius: 20px;
    padding: 24px 18px;
  }

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

  .confirmation-card {
    align-items: flex-start;
  }
}

@media (display-mode: standalone) {
  .site-header {
    padding-top: calc(18px + env(safe-area-inset-top));
  }

  footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
