/* Driver web registration (/driver/register/). Mobile-first; uses the
   site.css tokens (--green, --ink, --muted, --line, --field-line, --err). */

.dr-wrap { max-width: 760px; padding-top: 28px; padding-bottom: 72px; }
.dr-head { margin-bottom: 20px; }
.dr-h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 10px; }
.dr-intro { font-size: 16px; line-height: 1.55; color: var(--muted); }
.dr-intro--small { font-size: 14.5px; margin-top: 6px; }
.dr-h2 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 12px; }
.dr-h3 { font-size: 17px; font-weight: 700; margin: 18px 0 8px; }
.dr-p { font-size: 15.5px; line-height: 1.55; margin-bottom: 12px; }
.dr-p--muted { color: var(--muted); font-size: 14.5px; }
.dr-ok { color: var(--green-deep); font-weight: 600; }

.dr-card {
  background: #fff; border: 1px solid #e4e8e6; border-radius: 22px; padding: 22px 18px;
  box-shadow: 0 10px 28px rgba(16, 60, 34, .06); margin-bottom: 16px;
}
@media (min-width: 640px) { .dr-card { padding: 28px; } }

/* Progress */
.dr-progress { margin-bottom: 16px; scroll-margin-top: 84px; }
.dr-progress__count { font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.dr-progress__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--steps, 7), 1fr); gap: 4px; }
.dr-progress__item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.dr-progress__dot {
  width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--field-line); background: #fff;
  color: var(--muted); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.dr-progress__label { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.2; overflow-wrap: anywhere; }
.dr-progress__item.is-done .dr-progress__dot { background: var(--tint); border-color: var(--green); color: var(--green-deep); }
.dr-progress__item.is-current .dr-progress__dot { background: var(--green); border-color: var(--green); color: #fff; }
.dr-progress__item.is-current .dr-progress__label { color: var(--ink); font-weight: 700; }
.dr-progress__item.is-flagged .dr-progress__dot { border-color: var(--err); color: var(--err); }
@media (max-width: 420px) { .dr-progress__label { display: none; } .dr-progress__item.is-current .dr-progress__label { display: none; } }

/* Fields */
.dr-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.dr-field--inline { margin-bottom: 10px; }
.dr-label { font-size: 14px; font-weight: 600; color: #3d4a43; }
.dr-hint { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.dr-err { font-size: 14px; line-height: 1.4; color: var(--err); font-weight: 500; }
.dr-textarea { font-family: inherit; height: auto; min-height: 76px; padding: 12px 14px; resize: vertical; }
.th-form__input:disabled, .th-form__input[readonly] { background: #f3f6f4; color: #59645e; }
select.th-form__input { background: #fff; }
.dr-fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dr-fieldset legend { margin-bottom: 8px; padding: 0; }
.dr-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dr-choices--stack { grid-template-columns: 1fr; }
.dr-choice { position: relative; }
.dr-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dr-choice span {
  min-height: 48px; border-radius: 12px; border: 1.5px solid var(--field-line); background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 10px;
}
.dr-choice input:checked + span { background: var(--tint-soft); border-color: var(--green); }
.dr-choice input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.dr-choice input:disabled + span { opacity: .6; cursor: default; }
.dr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dr-phone { display: flex; align-items: stretch; }
.dr-phone__cc {
  display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--field-line); border-right: 0;
  border-radius: 12px 0 0 12px; background: #f3f6f4; font-weight: 600; font-size: 16px;
}
.dr-phone .th-form__input { border-radius: 0 12px 12px 0; }
.dr-input--code { letter-spacing: .3em; font-size: 20px; text-align: center; }
[aria-invalid="true"] { border-color: var(--err) !important; }

/* Buttons */
.dr-btn {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 600;
  cursor: pointer; height: 48px; padding: 0 22px; font-size: 15px; background: #fff; color: var(--green-deep);
  border: 1.5px solid var(--green);
}
.dr-btn:hover { background: var(--tint-soft); }
.dr-btn-block { width: 100%; margin-top: 4px; }
.th-btn[disabled], .dr-btn[disabled] { opacity: .55; cursor: progress; }
.dr-link {
  background: none; border: 0; padding: 8px 0; color: var(--green); font-weight: 600; font-size: 15px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; font-family: inherit;
}
.dr-link--danger { color: var(--err); }
.dr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 8px; }

/* Step navigation: sticky at the bottom on phones */
.dr-nav {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 10px;
  background: rgba(255, 255, 255, .96); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
}
.dr-nav .th-btn { height: 48px; flex: 1; }
.dr-nav__later { flex-basis: 100%; text-align: center; padding: 2px 0; }

/* Uploads */
.dr-upload { border: 1px dashed #cfdad4; border-radius: 16px; padding: 14px; margin: 6px 0 14px; background: #fbfdfc; }
.dr-upload__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.dr-upload__label { font-size: 15px; font-weight: 700; }
.dr-upload__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.dr-upload__actions .dr-btn { height: 42px; font-size: 14.5px; }
.dr-upload__status { font-size: 14px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.dr-upload.is-done { border-style: solid; border-color: #bfe3cd; background: #f6fbf8; }
.dr-upload.is-flagged { border-style: solid; border-color: #e8b9a3; background: #fff8f4; }
.dr-upload.is-locked .dr-upload__actions .dr-btn, .dr-upload.is-locked [data-remove] { display: none; }
.dr-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 10px; }
.dr-bar__fill { height: 100%; width: 0; background: var(--green); transition: width .15s linear; }
.dr-reason { font-size: 14px; color: #7a3412; background: #fff1e8; border-radius: 10px; padding: 8px 10px; margin-top: 8px; }

/* Badges */
.dr-badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 4px 10px; border-radius: 99px;
  background: #eef1ef; color: #3d4a43; white-space: nowrap;
}
.dr-badge--lg { font-size: 14px; padding: 5px 12px; vertical-align: middle; }
.dr-badge[data-tone="ok"] { background: var(--tint); color: #075d31; }
.dr-badge[data-tone="warn"] { background: #fff1e0; color: #7a4206; }
.dr-badge[data-tone="bad"] { background: #fde8e2; color: #8d2e0f; }
.dr-badge[data-tone="info"] { background: #e7f0fb; color: #1d4a7a; }

/* Vehicles */
.dr-vehicles { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.dr-vehicle { border: 1px solid #e1e8e4; border-radius: 18px; padding: 16px; }
.dr-vehicle__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dr-vehicle__head .dr-h3 { margin: 0; }
.dr-vehicle__summary { font-size: 14.5px; color: var(--muted); margin: 6px 0 10px; line-height: 1.5; }
.dr-vehicle__form { margin-top: 10px; }

/* Agreements */
.dr-agree { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.5; cursor: pointer; }
.dr-agree input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--green); }
.dr-agree a { text-decoration: underline; text-underline-offset: 2px; }

/* Review / status */
.dr-summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin: 0 0 12px; }
.dr-summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.dr-summary__row dt { color: var(--muted); }
.dr-summary__row dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.dr-summary__edit { font-size: 13.5px; }
.dr-list { margin: 0 0 12px; padding-left: 20px; font-size: 15px; line-height: 1.55; }
.dr-list--status { list-style: none; padding: 0; }
.dr-list--status li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.dr-list--status li small { display: block; color: var(--muted); font-size: 13px; }
.dr-history { list-style: none; padding: 0; }
.dr-history li { padding: 8px 0 8px 16px; border-left: 2px solid var(--tint); font-size: 14.5px; }
.dr-history time { display: block; color: var(--muted); font-size: 13px; }
.dr-missing { background: #fffaf2; border: 1px solid #f2dfbd; border-radius: 14px; padding: 4px 14px 2px; margin-bottom: 14px; }
.dr-correction { background: #fff8f4; border: 1px solid #f0cdbb; border-radius: 16px; padding: 4px 16px 16px; margin: 12px 0 8px; }
.dr-note { white-space: pre-line; font-size: 15px; background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.dr-ref { font-size: 15px; margin-bottom: 10px; }
.dr-ref strong { font-size: 18px; letter-spacing: .04em; }
.dr-done { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* Alerts and session bar */
.dr-alert { border-radius: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.45; margin-bottom: 14px; background: #fde8e2; color: #7d2a0d; border: 1px solid #f3c3b2; }
.dr-alert--ok { background: var(--tint-soft); color: #075d31; border-color: #bfe3cd; }
.dr-session { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.dr-unavailable { text-align: left; }

/* Wizard v2: progress bar, required markers, agreements on the last step. */
.dr-progress__bar { height: 6px; border-radius: 99px; background: #e4ebe7; margin-top: 10px; overflow: hidden; }
.dr-progress__fill { height: 100%; width: 0; background: var(--green); border-radius: 99px; transition: width .25s ease; }
.dr-req { color: var(--err); font-weight: 700; margin-left: 2px; }
.dr-required-note { font-size: 13.5px; color: var(--muted); margin: -6px 0 12px; }
.dr-agreements { border-top: 1px solid #e4ebe7; margin-top: 18px; padding-top: 14px; }
.dr-agreements .dr-h3 { margin-top: 0; }
[aria-invalid="true"].th-form__input { border-color: var(--err); }
.dr-fieldset.is-invalid .dr-choice { border-color: var(--err); }
.dr-upload.is-invalid { border-color: var(--err); }
.dr-btn-block[disabled] { cursor: not-allowed; }
