/* Driver pages: Tabler (core/static/vendor/tabler) plus the brand colour and the few pieces
   Tabler has no component for: the money card, payment buttons' size, toasts, bottom bar. */

:root {
  /* Tabler derives every primary shade from this one value. Tailwind teal-700, as in the admin. */
  --tblr-primary: oklch(51.1% 0.096 186.391);
  --tblr-primary-rgb: 0, 120, 111;
  --hero-from: oklch(24% 0.03 255);
  --hero-to: oklch(38.6% 0.063 188.416);
}

.driver-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(120px + env(safe-area-inset-bottom));
}
.num, .hero-amount, .money-input, .phone-input { font-variant-numeric: tabular-nums; }
.min-w-0 { min-width: 0; }
.big-btn { min-height: 3.5rem; font-weight: 600; }
/* The optional yuan note under the kargo fee: a tappable fold */
.yuan > summary { padding: 6px 0; }
/* Row form: "Хүргээгүй" hides the delivery and payment part and explains where the row goes */
.undelivered-note { display: none; }
form:has(#delivered-no:checked) .undelivered-note { display: block; }
form:has(#delivered-no:checked) .delivered-part { display: none; }
/* Home shortcuts: icon over label, with a count badge in the corner */
.tile { position: relative; flex-direction: column; gap: 4px; min-height: 4.75rem; font-weight: 600; }
.tile .icon { margin: 0; width: 1.5rem; height: 1.5rem; }
.tile .badge { position: absolute; top: 6px; right: 6px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px 8px;
  color: var(--tblr-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* The money card */
.hero {
  position: relative;
  overflow: hidden;
  padding: 20px 20px 16px;
  border-radius: 20px;
  background: linear-gradient(140deg, var(--hero-from), var(--hero-to));
  color: #fff;
  box-shadow: 0 12px 32px -12px rgb(0 60 55 / 0.5);
}
.hero::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.06);
}
.hero-label { font-size: 0.875rem; opacity: 0.75; }
.hero-amount { margin-bottom: 12px; font-size: 2.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.hero-note { margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; background: rgb(255 255 255 / 0.14); font-size: 0.875rem; }
.hero-grid { padding-top: 12px; border-top: 1px solid rgb(255 255 255 / 0.15); font-variant-numeric: tabular-nums; }
.hero-term { font-size: 0.75rem; opacity: 0.7; }
.hero .minus { color: #ffd38a; }
.hero-foot { margin-top: 10px; font-size: 0.75rem; opacity: 0.7; }

.is-void { opacity: 0.45; }
.is-void .item-title { text-decoration: line-through; }

/* Row form */
.phone-input { font-size: 1.625rem; font-weight: 600; letter-spacing: 0.06em; }
.pin { letter-spacing: 0.6em; }
.customer-hint { min-height: 22px; margin-top: 4px; color: var(--tblr-secondary); font-size: 0.875rem; }
.customer-hint[data-state="found"] { color: var(--tblr-primary); font-weight: 600; }
.customer-hint[data-state="new"] { color: var(--tblr-orange); font-weight: 600; }
.chip { min-height: 2.75rem; padding-inline: 1.125rem; }
.stepper { flex-wrap: nowrap; }
.stepper .btn { width: 3rem; justify-content: center; }
.stepper .form-control { min-width: 0; padding-inline: 0; }
.stepper .btn .icon { margin: 0; }
.pay { min-height: 4rem; font-weight: 700; }

.bottom-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  padding: 24px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--tblr-body-bg) 65%, transparent);
}
.bottom-bar .btn { max-width: 528px; margin: 0 auto; display: flex; }

/* Messages appear at the top and fade out on their own */
.toasts {
  position: fixed;
  top: 12px;
  right: 16px;
  left: 16px;
  z-index: 10;
  display: grid;
  gap: 8px;
  max-width: 528px;
  margin: 0 auto;
  pointer-events: none;
  animation: toast-out 0.4s ease 3s forwards;
}
.toast-msg { padding: 12px 16px; border-radius: 12px; background: var(--tblr-body-color); color: var(--tblr-bg-surface); box-shadow: 0 8px 24px rgb(0 0 0 / 0.18); font-weight: 600; }
.toast-error { background: var(--tblr-danger); color: #fff; }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* Login */
.login { display: grid; min-height: 100dvh; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; }
.brand-icon { width: 64px; height: 64px; border-radius: 18px; }
