:root {
  color-scheme: light;
  --canvas: #f5f5f2;
  --surface: #ffffff;
  --surface-soft: #efefec;
  --ink: #1c1c1e;
  --graphite: #1c1c1e;
  --muted: #777773;
  --line: #e2e2de;
  --yellow: #ffd21c;
  --yellow-strong: #f2c400;
  --yellow-soft: #fff3ab;
  --secondary-action: #e3e3df;
  --secondary-action-pressed: #d4d4cf;
  --green: #239653;
  --green-strong: #17733e;
  --green-soft: #e2f6e9;
  --danger: #c43a3a;
  --danger-soft: #ffe7e4;
  --shadow: 0 18px 50px rgba(28, 28, 30, 0.1);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 2%, rgba(255, 210, 28, 0.16), transparent 19rem),
    var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.offline-banner {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  padding: calc(8px + var(--safe-top)) 16px 8px;
  background: var(--ink);
  color: var(--yellow);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -0.05em;
  box-shadow: 0 9px 24px rgba(28, 28, 30, 0.12);
}

.brand-mark:not(.large) svg {
  width: 24px;
  height: 24px;
  display: block;
  transform: translateY(-1px);
}

.brand-mark.large {
  width: 58px;
  height: 58px;
  border: 5px solid rgba(255, 255, 255, 0.9);
  background: var(--ink);
  color: var(--yellow);
  font-size: 16px;
  box-shadow: 0 14px 35px rgba(28, 28, 30, 0.2);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* Login */
.login-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--ink);
}

.login-shell {
  width: min(100%, 460px);
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: minmax(330px, 43dvh) 1fr;
  overflow: hidden;
  background: var(--ink);
}

.login-hero {
  position: relative;
  min-height: 0;
  padding: calc(24px + var(--safe-top)) 24px 56px;
  overflow: hidden;
  background: var(--yellow);
  color: var(--ink);
}

.login-hero::before,
.login-hero::after {
  position: absolute;
  border: 1px solid rgba(28, 28, 30, 0.12);
  border-radius: 50%;
  content: "";
}

.login-hero::before {
  width: 250px;
  height: 250px;
  right: -90px;
  bottom: -115px;
}

.login-hero::after {
  width: 150px;
  height: 150px;
  right: -36px;
  bottom: -66px;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand strong {
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.login-kicker {
  position: relative;
  z-index: 1;
  margin: 34px 0 8px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 320px;
  margin: 0;
  font-size: clamp(46px, 14vw, 66px);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.login-hero > p:last-of-type {
  position: relative;
  z-index: 1;
  max-width: 290px;
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.route-illustration {
  position: absolute;
  right: 22px;
  bottom: 24px;
  width: 145px;
  height: 74px;
  transform: rotate(-8deg);
}

.route-line {
  position: absolute;
  top: 35px;
  right: 20px;
  left: 20px;
  height: 3px;
  border-top: 3px dashed var(--ink);
}

.route-pin,
.route-car {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 950;
}

.route-pin {
  top: 21px;
  width: 30px;
  height: 30px;
  border: 4px solid var(--yellow);
  background: var(--ink);
  color: var(--yellow);
  box-shadow: 0 0 0 2px var(--ink);
}

.route-pin.start {
  left: 0;
}

.route-pin.finish {
  right: 0;
}

.route-car {
  top: 17px;
  left: 57px;
  width: 40px;
  height: 40px;
  background: #fff;
  color: var(--ink);
  font-size: 19px;
  box-shadow: 0 8px 22px rgba(28, 28, 30, 0.15);
}

.login-card {
  position: relative;
  z-index: 2;
  margin-top: -30px;
  padding: 28px 24px calc(28px + var(--safe-bottom));
  border-radius: 32px 32px 0 0;
  background: var(--ink);
  color: #fff;
}

.login-card .eyebrow {
  color: var(--yellow);
}

.login-card h2 {
  margin: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.login-copy {
  margin: 11px 0 22px;
  color: #a8a8a3;
  font-size: 13px;
  line-height: 1.45;
}

.login-form,
.stack-form {
  display: grid;
  gap: 13px;
}

.payment-fields-row {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-fields-row label {
  min-width: 0;
}

.payment-type-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231c1c1e' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-form label {
  color: #b8b8b2;
}

.login-form input {
  border-color: #333336;
  background: var(--graphite);
  color: #fff;
}

.login-form input::placeholder {
  color: #757572;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--yellow-strong);
  box-shadow: 0 0 0 4px rgba(255, 210, 28, 0.2);
}

.primary-button,
.secondary-button,
.danger-button,
.trip-action-button {
  min-height: 52px;
  padding: 12px 17px;
  border: 0;
  border-radius: 15px;
  font-weight: 900;
}

.primary-button,
.trip-action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(255, 210, 28, 0.17);
}

.primary-button:active,
.trip-action-button:active {
  background: var(--yellow-strong);
  transform: translateY(1px);
}

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

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

.form-error {
  margin: 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

/* Driver home */
.app-shell {
  width: min(100%, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(10px + var(--safe-top)) 14px calc(32px + var(--safe-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: calc(-10px - var(--safe-top)) -14px 0;
  padding: calc(11px + var(--safe-top)) 14px 11px;
  background: rgba(245, 245, 242, 0.9);
  backdrop-filter: blur(18px) saturate(140%);
  opacity: 1;
  transform: translateY(0);
  transition:
    transform 360ms cubic-bezier(0.22, 0.78, 0.2, 1),
    opacity 280ms ease;
  will-change: transform, opacity;
}

.app-header.is-hidden-by-scroll {
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-100% - var(--safe-top) - 4px));
}

.brand-group,
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-group strong {
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.vehicle-selector-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: #e3e3df;
  color: var(--ink);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.vehicle-selector-button:disabled {
  color: var(--muted);
  opacity: 0.7;
}

.avatar-button,
.icon-button,
.contact-button,
.minor-action {
  display: inline-grid;
  place-items: center;
  border: 0;
}

.avatar-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-weight: 950;
}

.welcome-section {
  position: relative;
  min-height: 146px;
  display: block;
  margin-top: 13px;
  padding: 24px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--yellow);
  color: var(--ink);
}

.welcome-heading-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.welcome-section.is-completed {
  min-height: 0;
}

.welcome-section.is-completed .welcome-subtitle {
  display: none;
}

.welcome-section::before,
.welcome-section::after {
  position: absolute;
  border: 1px solid rgba(28, 28, 30, 0.11);
  border-radius: 50%;
  content: "";
}

.welcome-section::before {
  width: 190px;
  height: 190px;
  right: -62px;
  top: -85px;
}

.welcome-section::after {
  width: 112px;
  height: 112px;
  right: -20px;
  top: -45px;
}

.welcome-copy,
.count-badge,
.completed-stats {
  position: relative;
  z-index: 1;
}

.welcome-section .eyebrow {
  color: rgba(28, 28, 30, 0.62);
}

.welcome-section h1 {
  margin: 0;
  font-size: clamp(32px, 9vw, 44px);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.welcome-subtitle {
  max-width: 260px;
  margin: 10px 0 0;
  color: rgba(28, 28, 30, 0.67);
  font-size: 12px;
  font-weight: 700;
}

.count-badge {
  min-width: 70px;
  padding: 12px 14px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--ink);
  color: var(--yellow);
  box-shadow: 0 12px 24px rgba(28, 28, 30, 0.16);
}

.count-badge strong {
  font-size: 25px;
  line-height: 1;
}

.count-badge small {
  margin-top: 3px;
  color: #c9c9c3;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-trip-countdown {
  width: fit-content;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--graphite);
  color: #fff;
  box-shadow: 0 8px 20px rgba(28, 28, 30, 0.13);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.next-trip-countdown svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--yellow);
}

.next-trip-countdown.is-urgent {
  background: #e5483f;
  color: #fff;
  box-shadow: 0 8px 22px rgba(229, 72, 63, 0.3);
}

.next-trip-countdown.is-urgent svg {
  color: #fff;
}

.completed-stats {
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.stats-period-control {
  position: relative;
  flex: 0 0 auto;
}

.stats-period-control select {
  min-height: 34px;
  max-width: 132px;
  appearance: none;
  -webkit-appearance: none;
  padding: 7px 30px 7px 12px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.stats-period-control svg {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 13px;
  height: 13px;
  pointer-events: none;
  transform: translateY(-50%);
}

.completed-stats-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.58);
}

.completed-stats-metrics > div {
  min-width: 0;
  padding: 12px 14px;
}

.completed-stats-metrics > div + div {
  border-left: 1px solid rgba(28, 28, 30, 0.1);
}

.completed-stats-metrics span {
  display: block;
  margin-bottom: 4px;
  color: rgba(28, 28, 30, 0.6);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.completed-stats-metrics strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-range-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(28, 28, 30, 0.12);
}

.stats-range-form label {
  color: rgba(28, 28, 30, 0.64);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats-range-form input {
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  padding: 7px 8px;
  border: 1px solid rgba(28, 28, 30, 0.12);
  border-radius: 11px;
  outline: 0;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.stats-range-form input:focus {
  border-color: var(--yellow-strong);
  box-shadow: 0 0 0 3px rgba(255, 210, 28, 0.16);
}

.stats-range-form button {
  grid-column: 1 / -1;
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  background: var(--ink);
  color: var(--yellow);
  font-size: 10px;
  font-weight: 900;
}

.stats-error {
  margin: 9px 2px 0;
  color: var(--danger);
  font-size: 10px;
  font-weight: 800;
}

.orders-list {
  display: grid;
  gap: 13px;
  padding: 14px 0;
}

.loading-card,
.empty-state {
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 11px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 10px 32px rgba(28, 28, 30, 0.045);
  text-align: center;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--yellow-strong);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.trip-card {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 14px 32px rgba(28, 28, 30, 0.11),
    0 2px 8px rgba(28, 28, 30, 0.05);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.trip-card:focus-visible {
  outline: 2px solid rgba(28, 28, 30, 0.55);
  outline-offset: 3px;
}

.trip-card.is-active {
  border-color: var(--yellow-strong);
  box-shadow: 0 14px 36px rgba(255, 210, 28, 0.17);
}

.trip-card.is-active::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--yellow);
  content: "";
}

.trip-card.is-missed {
  border-color: #e5483f;
  box-shadow:
    0 14px 32px rgba(229, 72, 63, 0.15),
    0 2px 8px rgba(28, 28, 30, 0.05);
}

.trip-card.is-missed::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #e5483f;
  content: "";
}

.trip-card-header,
.sheet-header,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trip-time {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.time-badge {
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.date-label,
.vehicle-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.status-pill {
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.status-pill.en_route,
.status-pill.at_pickup,
.status-pill.passenger_on_board {
  background: var(--ink);
  color: var(--yellow);
}

.status-pill.completed {
  background: var(--green-soft);
  color: var(--green-strong);
}

.status-pill.missed {
  background: #e5483f;
  color: #fff;
}

.trip-card:has(.status-pill.completed) {
  border-color: #bfe6cc;
}

.route-preview {
  position: relative;
  display: grid;
  gap: 16px;
  margin: 16px 0;
  padding-left: 25px;
}

.trip-card .route-preview {
  gap: 14px;
  margin: 17px 0 18px;
  padding: 2px 2px 2px 31px;
  border-radius: 0;
  background: transparent;
}

.route-preview::before {
  display: none;
}

.route-point {
  position: relative;
  min-width: 0;
}

.route-marker {
  position: absolute;
  top: 1px;
  left: -25px;
  z-index: 1;
  width: 18px;
  height: 18px;
  display: block;
  color: var(--ink);
}

.route-marker svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-point:first-child::after {
  position: absolute;
  top: 22px;
  left: -17px;
  width: 2px;
  height: calc(100% - 8px);
  background: repeating-linear-gradient(to bottom, var(--line) 0 3px, transparent 3px 6px);
  content: "";
}

.trip-card .route-point:first-child::after {
  background: repeating-linear-gradient(to bottom, #c5c5c0 0 3px, transparent 3px 6px);
}

.trip-card .route-marker {
  color: var(--ink);
}

.route-point.destination .route-marker,
.trip-card .route-point.destination .route-marker {
  color: var(--yellow);
}

.route-point small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trip-card .route-point small {
  color: var(--muted);
}

.route-point strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-card .route-point strong {
  color: var(--ink);
}

.trip-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 0;
}

.trip-meta span {
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: #565653;
  font-size: 10px;
  font-weight: 800;
}

.trip-meta .driver-price {
  margin-left: auto;
  padding: 7px 2px 7px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.empty-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state h2 {
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -0.035em;
}

.empty-state p {
  max-width: 28ch;
  line-height: 1.45;
}

/* Sheets and trip detail */
.sheet-dialog {
  width: min(100%, 620px);
  max-width: none;
  max-height: min(94dvh, 920px);
  margin: auto auto 0;
  padding: 8px 16px calc(20px + var(--safe-bottom));
  border: 0;
  border-radius: 30px 30px 0 0;
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 -24px 80px rgba(28, 28, 30, 0.3);
}

.sheet-dialog::backdrop {
  background: rgba(28, 28, 30, 0.58);
  backdrop-filter: blur(3px);
}

.compact-sheet {
  min-height: 280px;
}

.order-sheet {
  position: fixed;
  inset: 0;
  width: min(100%, 620px);
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: none;
  margin: 0 auto;
  padding-top: calc(8px + var(--safe-top));
  border-radius: 0;
  overscroll-behavior: contain;
  box-shadow: none;
}

.order-sheet > .sheet-grabber {
  display: none;
}

.sheet-grabber {
  width: 46px;
  height: 5px;
  margin: 3px auto 13px;
  border-radius: 999px;
  background: var(--line);
}

.sheet-header {
  padding: 4px 0 14px;
}

.sheet-header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.045em;
}

.sticky-sheet-header {
  position: sticky;
  top: -8px;
  z-index: 5;
  padding-top: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(15px);
}

.order-sheet .sticky-sheet-header {
  min-height: 42px;
}

.order-reference-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.order-sheet .sticky-sheet-header h2 {
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-reference-copy {
  width: 24px;
  height: 24px;
}

.order-reference-copy:focus,
.order-reference-copy:focus-visible {
  outline: none;
  box-shadow: none;
}

.icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.icon-button:focus,
.icon-button:focus-visible,
.icon-button:active {
  outline: none;
  box-shadow: none;
}

.icon-button::before,
.icon-button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.icon-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.icon-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.profile-actions {
  display: grid;
  gap: 10px;
}

.profile-navigation {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 5px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.profile-nav-item {
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.profile-nav-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--surface);
  color: currentColor;
}

.profile-nav-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.profile-nav-item strong,
.profile-nav-item small {
  display: block;
}

.profile-nav-item strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.profile-nav-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.profile-nav-item.is-active {
  background: var(--surface);
  color: var(--yellow-strong);
  box-shadow: 0 5px 16px rgba(28, 28, 30, 0.07);
}

.profile-nav-item.is-active .profile-nav-icon {
  background: var(--ink);
  color: var(--yellow);
}

.vehicle-options {
  display: grid;
  gap: 9px;
}

.vehicle-option {
  width: 100%;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
}

.vehicle-option span:first-child,
.vehicle-option strong,
.vehicle-option small {
  display: block;
}

.vehicle-option strong {
  font-size: 15px;
}

.vehicle-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.vehicle-option-check {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #dddeda;
  color: transparent;
  font-weight: 950;
}

.vehicle-option.is-selected {
  border-color: var(--yellow-strong);
  background: #fff9dc;
}

.vehicle-option.is-selected .vehicle-option-check {
  background: var(--yellow);
  color: var(--ink);
}

.vehicle-option-clear {
  border-color: transparent;
  background: #e7e7e2;
}

.vehicle-option-clear strong {
  color: var(--ink);
}

.vehicle-empty {
  margin: 0;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

.order-dialog-content {
  display: grid;
  gap: 14px;
}

.detail-hero {
  padding: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--yellow);
}

.detail-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-hero-header .status-pill {
  flex: 0 0 auto;
}

.detail-date-time {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.detail-time {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 1;
}

.detail-date {
  color: #806f2b;
  font-size: 13px;
  font-weight: 850;
}

.detail-hero .route-preview {
  margin: 0;
  padding: 16px 14px 16px 40px;
  border-radius: 18px;
  background: #fff2b8;
}

.detail-hero .route-point:first-child::after {
  background: repeating-linear-gradient(to bottom, rgba(28, 28, 30, 0.34) 0 3px, transparent 3px 6px);
}

.route-address-value {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: start;
  gap: 5px;
}

.detail-hero .route-address-value strong {
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.route-copy-button {
  margin-top: -1px;
}

.route-summary {
  min-height: 33px;
  display: grid;
  grid-template-columns: auto 33px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.route-metrics-pill {
  min-width: 0;
  min-height: 33px;
  width: fit-content;
  display: grid;
  grid-template-columns: auto 1px auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff2b8;
}

.route-metric {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
}

.route-metric-divider {
  width: 1px;
  height: 14px;
  background: rgba(28, 28, 30, 0.2);
}

.route-metric strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.navigation-button {
  width: 33px;
  min-height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}

.navigation-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.route-map-button {
  transform: translateX(-1px);
  color: var(--yellow);
}

@media (max-width: 360px) {
  .route-summary {
    gap: 6px;
  }

  .route-metrics-pill {
    padding-inline: 10px;
  }

  .route-metric strong {
    font-size: 13px;
  }

  .navigation-button {
    padding: 0;
  }
}

.trip-workflow {
  padding: 17px;
  border-radius: 21px;
  background: var(--ink);
  color: #fff;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-bottom: 15px;
}

.workflow-step {
  position: relative;
  padding-top: 20px;
  color: #777773;
  font-size: 8px;
  font-weight: 850;
  text-align: center;
}

.workflow-step::before {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid #454548;
  border-radius: 50%;
  background: var(--ink);
  transform: translateX(-50%);
  content: "";
}

.workflow-step.is-done {
  color: var(--yellow);
}

.workflow-step.is-done::before {
  border-color: var(--yellow);
  background: var(--yellow);
}

.trip-action-button {
  width: 100%;
  min-height: 68px;
}

.trip-action-button.completed {
  background: var(--green-soft);
  color: var(--green-strong);
  box-shadow: none;
}

.detail-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.detail-section h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.driver-flight-status {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content 16px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 15px;
  outline: none;
  background: #e6e6e2;
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 150ms ease, transform 150ms ease;
}

.driver-flight-status:active {
  background: #ddddda;
  transform: translateY(1px);
}

.driver-flight-status:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 210, 28, 0.38);
}

.driver-flight-identity,
.driver-flight-identity > span,
.driver-flight-copy,
.driver-flight-time {
  min-width: 0;
}

.driver-flight-identity {
  display: flex;
  align-items: center;
  gap: 7px;
}

.driver-flight-identity svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.driver-flight-identity small,
.driver-flight-identity strong,
.driver-flight-copy strong,
.driver-flight-copy small,
.driver-flight-time strong,
.driver-flight-time small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-flight-identity small,
.driver-flight-copy small,
.driver-flight-time small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
}

.driver-flight-identity strong {
  margin-top: 1px;
  font-size: 12px;
  font-weight: 950;
}

.driver-flight-copy strong,
.driver-flight-time strong {
  font-size: 11px;
  font-weight: 900;
}

.driver-flight-copy small,
.driver-flight-time small {
  margin-top: 2px;
}

.driver-flight-time {
  max-width: 82px;
  text-align: right;
}

.driver-flight-external {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.driver-flight-status[data-status-tone="green"] .driver-flight-copy strong,
.driver-flight-status[data-status-tone="green"] .driver-flight-time strong {
  color: var(--green-strong);
}

.driver-flight-status[data-status-tone="red"] .driver-flight-copy strong,
.driver-flight-status[data-status-tone="red"] .driver-flight-time strong {
  color: var(--danger);
}

.driver-flight-status.is-loading .driver-flight-copy strong::after {
  display: inline-block;
  width: 10px;
  overflow: hidden;
  vertical-align: bottom;
  animation: driver-flight-loading 1.2s steps(4, end) infinite;
  content: "…";
}

.driver-flight-status.is-unavailable .driver-flight-copy strong {
  color: var(--muted);
}

@keyframes driver-flight-loading {
  0% { width: 0; }
  100% { width: 10px; }
}

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

.detail-grid div {
  min-width: 0;
}

.detail-grid dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 800;
}

.copyable-detail-value {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.copyable-detail-value > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-copy-button {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8b8b87;
}

.detail-copy-button svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-copy-button:active,
.detail-copy-button.is-copied {
  background: var(--yellow-soft);
  color: var(--ink);
}

.customer-actions,
.minor-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 13px;
}

.minor-actions.single-action {
  grid-template-columns: 1fr;
}

.contact-button,
.minor-action {
  min-height: 44px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.minor-action {
  background: var(--secondary-action);
}

.minor-action:active {
  background: var(--secondary-action-pressed);
  transform: translateY(1px);
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.comment-form textarea {
  height: 44px;
  min-height: 44px;
  max-height: 130px;
  padding: 11px 12px;
  line-height: 20px;
}

.comment-form button {
  min-height: 44px;
  min-width: 74px;
  height: 44px;
  padding: 9px 11px;
  border: 0;
  border-radius: 12px;
  background: var(--secondary-action);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.comment-form button:active {
  background: var(--secondary-action-pressed);
  transform: translateY(1px);
}

.activity-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.activity-item {
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 12px;
  line-height: 1.4;
}

.activity-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

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

.payment-item-main strong {
  font-size: 15px;
}

.payment-item-main span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.payment-item p {
  margin: 5px 0 0;
  white-space: pre-wrap;
}

.attachment-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.attachment-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
}

.attachment-preview {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  overflow: hidden;
}

.attachment-preview.is-image {
  background: #deded9;
  box-shadow: inset 0 0 0 1px rgba(28, 28, 30, 0.06);
}

.attachment-preview.is-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.attachment-preview.is-file {
  background: var(--ink);
}

.attachment-file-icon {
  position: relative;
  width: 36px;
  height: 46px;
  border-radius: 6px;
  background: var(--yellow);
  box-shadow: 0 5px 12px rgba(28, 28, 30, 0.24);
}

.attachment-file-icon::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 0 5px 0 4px;
  background: #fff3b2;
  content: "";
}

.attachment-file-icon::after {
  position: absolute;
  right: 4px;
  bottom: 5px;
  left: 4px;
  overflow: hidden;
  color: var(--ink);
  content: attr(data-extension);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: -0.02em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-info {
  min-width: 0;
  display: block;
}

.attachment-info strong,
.attachment-info span,
.attachment-info small {
  display: block;
}

.attachment-info strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-info span,
.attachment-info small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.note-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.toast {
  position: fixed;
  z-index: 210;
  right: 16px;
  bottom: calc(18px + var(--safe-bottom));
  left: 16px;
  width: min(calc(100% - 32px), 500px);
  margin: auto;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 46px rgba(28, 28, 30, 0.3);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

@media (min-width: 640px) {
  .login-view {
    padding: 18px;
    background: var(--graphite);
  }

  .login-shell {
    min-height: min(900px, calc(100dvh - 36px));
    border-radius: 38px;
    box-shadow: 0 25px 90px rgba(28, 28, 30, 0.32);
  }

  .login-card {
    border-radius: 32px 32px 38px 38px;
  }

  .app-shell {
    padding-right: 20px;
    padding-left: 20px;
  }

  .app-header {
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .sheet-dialog:not(.order-sheet) {
    margin-bottom: 18px;
    border-radius: 30px;
  }
}

@media (max-height: 760px) {
  .login-shell {
    grid-template-rows: minmax(270px, 38dvh) 1fr;
  }

  .login-kicker {
    margin-top: 20px;
  }

  .login-hero h1 {
    font-size: 43px;
  }

  .route-illustration {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
