/* Driver application */
.apply-page { background: var(--gravel); }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* Progress (sticks under the header) */
.progress-wrap { position: sticky; top: calc(var(--hh) + 3px); z-index: 40; background: var(--slate-deep); color: var(--white); padding-block: 12px 14px; }
.progress-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.progress-meta #stepLabel { font-family: var(--head); font-weight: 700; font-size: 1.2rem; }
.progress-meta #stepCount { color: var(--on-dark-muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.progress { height: 6px; background: var(--slate-2); border-radius: 99px; overflow: hidden; }
.progress .bar { height: 100%; width: 0; background: var(--orange); transition: width .35s ease; }
.steps-dots { list-style: none; display: flex; margin: 10px 0 0; padding: 0; gap: 4px; }
.steps-dots li { flex: 1; font-size: .78rem; color: #7f8b97; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps-dots li.is-on { color: var(--orange); font-weight: 600; }
.steps-dots li.is-done { color: var(--on-dark); }
@media (max-width: 900px) { .steps-dots { display: none; } }

/* Layout */
.app-main { max-width: 820px; padding-block: 28px 40px; }
.step-h { font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: clamp(1.9rem, 5vw, 2.5rem); line-height: 1; margin-bottom: 20px; }
.step > p { max-width: 62ch; }
.sub { font-size: 1.4rem; margin: 32px 0 14px; padding-top: 24px; border-top: 1px solid var(--rule); }
.sub small { display: block; font-family: var(--body); font-weight: 400; color: var(--muted); font-size: .92rem; margin-top: 2px; }
@media (max-width: 560px) {
  .app-main { padding-inline: 0; padding-top: 0; }
  .app-main .panel { border-radius: 0; padding-inline: max(16px, env(safe-area-inset-left, 0px)); padding-block: 24px 28px; }
}

/* Welcome */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
@media (max-width: 680px) { .two { grid-template-columns: 1fr; } }
.note { background: var(--gravel); border-radius: var(--r); padding: 18px 20px; }
.note h4 { font-family: var(--head); font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
ul.ticks { list-style: none; margin: 0; padding: 0; }
ul.ticks li { padding: 6px 0 6px 26px; position: relative; font-size: .97rem; line-height: 1.45; }
ul.ticks li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.eeo { font-size: .82rem; color: var(--muted); margin: 0; }

/* Repeating groups (addresses, jobs, accidents) */
.repeater .items { display: grid; gap: 12px; margin-bottom: 12px; }
.repeater .item { border: 1.5px solid var(--rule); border-radius: var(--r); padding: 16px 16px 20px; background: #f8fafb; }
.repeater .item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.repeater .item-head b { font-family: var(--head); font-weight: 700; font-size: 1.2rem; text-transform: capitalize; }
.repeater .rm { background: none; border: 0; color: var(--err); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; min-height: 44px; padding: 0 4px; }
.repeater .add { display: flex; align-items: center; justify-content: center; min-height: 52px; background: var(--white); border: 1.5px dashed #aeb8c2; border-radius: var(--r); width: 100%; font: inherit; font-weight: 600; cursor: pointer; color: var(--text); }
.repeater .add:hover { border-color: var(--slate); background: #f8fafb; }
@media (max-width: 560px) { .repeater .item { padding: 14px 12px 18px; } }

/* Equipment grid */
.equip { display: grid; gap: 10px; }
.equip-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px 12px; align-items: center; border: 1.5px solid var(--rule); border-radius: var(--r); padding: 10px 14px; background: var(--white); }
.equip-row .check { min-height: 44px; align-items: center; font-weight: 500; }
.equip-row.on { border-color: var(--slate); background: #f6f8fa; }
.equip-row select { min-height: 44px; padding-block: 8px; }
.equip-row select:disabled { opacity: .45; }
@media (max-width: 640px) { .equip-row { grid-template-columns: 1fr 1fr; padding: 8px 12px 12px; } .equip-row .check { grid-column: span 2; } .equip-row:not(.on) select { display: none; } .equip-row:not(.on) { padding-bottom: 8px; } }

/* Back / Continue: sticky at the bottom of the screen */
.nav-btns { display: flex; gap: 12px; margin-top: 20px; }
.nav-btns .btn { min-width: 140px; min-height: 52px; }
.nav-btns #nextBtn { margin-left: auto; }
@media (max-width: 560px) {
  .nav-btns { position: sticky; bottom: 0; z-index: 30; margin-top: 0; padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); padding-inline: max(12px, env(safe-area-inset-left, 0px)); background: var(--white); border-top: 1px solid var(--rule); box-shadow: 0 -4px 14px rgba(26,34,43,.08); }
  .nav-btns .btn { min-width: 0; }
  .nav-btns #backBtn { flex: 0 0 34%; }
  .nav-btns #nextBtn { flex: 1; }
}
#appStatus { margin-inline: 0; }
@media (max-width: 560px) { #appStatus { margin: 12px max(16px, env(safe-area-inset-left, 0px)) 0; } }

/* Review, certification, signature */
.review-box { background: var(--gravel); border-radius: var(--r); padding: 8px 18px; margin-bottom: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; font-size: .95rem; }
.review-box div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.review-box span { color: var(--muted); flex: none; }
.review-box b { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.review-box .edit { grid-column: span 2; border: 0; color: var(--muted); font-size: .88rem; }
@media (max-width: 600px) { .review-box { grid-template-columns: 1fr; padding: 4px 14px; } .review-box .edit { grid-column: span 1; } }
.legal-box { background: #f8fafb; border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 18px; margin-bottom: 20px; font-size: .92rem; line-height: 1.55; max-height: 260px; overflow-y: auto; }
.legal-box h4 { font-family: var(--head); font-size: 1.25rem; font-weight: 700; }
.legal-box p { margin: 8px 0 0; }
.sig-wrap { position: relative; border: 1.5px solid #c7cfd7; border-radius: var(--r); background: var(--white); height: 180px; touch-action: none; }
@media (max-width: 560px) { .sig-wrap { height: 200px; } }
.invalid .sig-wrap { border-color: var(--err); }
.sig-wrap canvas { width: 100%; height: 100%; display: block; cursor: crosshair; border-radius: var(--r); }
.sig-clear { position: absolute; top: 6px; right: 6px; min-height: 40px; background: var(--gravel); border: 0; border-radius: var(--r-sm); padding: 0 14px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.sig-line { position: absolute; left: 18px; right: 18px; bottom: 40px; border-bottom: 1.5px solid #c7cfd7; color: #a7b0b9; font-size: .9rem; pointer-events: none; padding-bottom: 2px; }

/* Done */
.done { text-align: center; padding-block: 48px !important; }
.done-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: var(--white); font-size: 2.2rem; display: grid; place-items: center; margin: 0 auto 16px; }
.done .step-h { margin-bottom: 12px; }
.done p { max-width: 46ch; margin-inline: auto; }
@media (max-width: 560px) { .done .ctas .btn { width: 100%; } }
