/* Partner driver application: the wizard (start page, Photo & ID, Work documents, thank you).
   Look from the 2026 redesign: one column on white, DM Sans, navy buttons, dashed upload boxes. */
:root {
  --font: "DM Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --navy: #14326e;          /* titles, buttons */
  --navy-dark: #0f2757;
  --text: #1f2937;
  --label: #374151;
  --muted: #5b6575;         /* 5.9:1 on white */
  --line: #dfe3ea;
  --line-soft: #eef1f5;
  --tint: #f1f4f9;
  --blue: #3567d6;          /* dashed upload borders, links */
  --select-bg: #eef4fe;
  --focus: #9fbaf0;
  --error: #c0112a;
  --error-soft: #fdf1f2;
  --warn: #8a5a00;
  --warn-soft: #fff6d9;
  --warn-line: #e8c55a;
  --ok: #1f7a4a;
  --ok-soft: #dff5e8;
  --line-soft-2: #e6e9ef;
  --card: #ffffff;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; }
body { font-family: var(--font); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button { font: inherit; }

/* Header (hidden when embedded on the website, which has its own) */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(16px, 3vw, 36px); border-bottom: 1px solid var(--line); background: #fff; }
.logo { font-size: 30px; font-weight: 600; letter-spacing: -.02em; color: #3b6fdc; text-decoration: none; }
.top a.help { font-size: 15px; }
.embedded .top { display: none; }

.page { max-width: 640px; margin: 0 auto; padding: 32px 20px 48px; display: flex; flex-direction: column; gap: 28px; }
.page.wide { max-width: 680px; }
h1 { margin: 0; font-size: 34px; line-height: 1.2; font-weight: 500; color: var(--navy); letter-spacing: -.01em; }
h2 { margin: 0; font-size: 17px; font-weight: 500; color: var(--navy); }
.hint { margin: 0; color: var(--muted); font-size: 14px; }

/* Steps */
.steps { display: flex; flex-direction: column; gap: 10px; }
.steps-label { font-size: 14px; color: var(--text); }
.steps-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.steps-bar span { height: 4px; border-radius: 2px; background: #e3e8ef; }
.steps-bar span.on { background: var(--navy); }

/* Fields */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.fields .full { grid-column: 1 / -1; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbl-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lbl { font-size: 14px; color: var(--label); }
.inp { height: 44px; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; font: inherit; color: var(--text); background: #fff; }
select.inp { appearance: none; padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.inp::placeholder { color: #8a93a3; }
.inp:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--navy); }
.phone { display: flex; gap: 8px; }
.phone select { width: 160px; flex: none; }
.fld.invalid .inp { border-color: var(--error); }
.fld .err, .err-line { display: flex; gap: 6px; align-items: flex-start; color: var(--error); font-size: 13px; }
.fld.missing .inp { background: var(--warn-soft); border-color: var(--warn-line); }
.pill { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.pill.warn { background: #fdf0b7; color: #6b4a00; }
.pill.opt { background: #eef1f5; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 100px; border: 1px solid #3b6fdc;
  background: #3b6fdc; color: #fff; font-weight: 500; font-size: 16px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #2d5fc4; border-color: #2d5fc4; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.full { width: 100%; }
.btn.outline { background: #fff; color: #3b6fdc; border-color: #3b6fdc; }
.btn.outline:hover { background: var(--tint); }
.btn.icon { width: 40px; height: 40px; padding: 0; }
.link-btn { border: 0; background: none; padding: 4px 2px; color: var(--navy); font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; border-radius: 6px; color: #6b7280; cursor: pointer; }
.icon-btn:hover { background: var(--tint); color: var(--error); }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.consent { text-align: center; color: var(--muted); font-size: 14px; margin: 0; }
.consent a { color: var(--navy); }
.message { color: var(--error); font-size: 14px; margin: 0; min-height: 0; }
.message:empty { display: none; }

/* Document groups and upload boxes */
.group { display: flex; flex-direction: column; gap: 12px; }
.group-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tiles.one { grid-template-columns: 1fr; }
.tile { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; border-radius: 8px; border: 1.5px dashed var(--blue); background: #fff; }
.tile.drag { background: var(--select-bg); }
.tile .ico { flex: none; width: 40px; height: 40px; border-radius: 6px; background: var(--tint); color: #64748b; display: grid; place-items: center; overflow: hidden; }
.tile .ico img { width: 100%; height: 100%; object-fit: cover; }
.tile .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tile .name { color: var(--navy); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .title { color: var(--text); font-weight: 500; }
.tile .sub { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub a, .tile .sub b { color: var(--navy); font-weight: 500; text-decoration: underline; }
.tile label.pick { position: absolute; inset: 0; cursor: pointer; border-radius: 8px; }
.tile label.pick:focus-within { outline: 3px solid var(--focus); }
.tile.has { border: 1px solid var(--line); }
.tile.has .ico { background: #f3f4f6; }
.tile .acts { display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.tile.required { border: 1.5px solid var(--error); }
.tile.required .title, .tile.required .req { color: var(--error); }
.tile.bad { border: 1.5px solid var(--error); }
.tile.bad .name, .tile.bad .sub { color: var(--error); }
.tile.bad .icon-btn { color: var(--error); }
.cam { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--navy); border-radius: 6px;
  color: var(--navy); background: #fff; font-weight: 500; font-size: 14px; cursor: pointer; }
.spinner { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid #c3cddc; border-top-color: var(--navy); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.read-note { font-size: 13px; color: var(--muted); margin: 0; }

/* Profile photo tips */
.photo-tips { display: flex; gap: 16px; align-items: flex-start; }
.photo-tips .sample { flex: none; width: 64px; height: 80px; border-radius: 8px; background: #e9eef6; display: grid; place-items: center; color: #94a3b8; overflow: hidden; }
.photo-tips .sample img { width: 100%; height: 100%; display: block; object-fit: cover; align-self: stretch; justify-self: stretch; }
.photo-tips ol { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* Missing documents prompt */
.missing { border: 1px solid #f3d38a; background: #fff8e6; border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.missing ul { margin: 0; padding-left: 18px; }
.missing .actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 4px; }

/* Registration type */
.types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.type { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.type input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.type strong { display: block; font-weight: 500; color: var(--text); font-size: 16px; }
.type span { display: block; color: var(--muted); font-size: 14px; }
.type.on { border: 2px solid var(--navy); background: var(--select-bg); padding: 15px; }
.type:focus-within { outline: 3px solid var(--focus); }
.types.invalid .type { border-color: var(--error); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.check.invalid { color: var(--error); }

/* Thank you, continue link, delete */
.center { text-align: center; align-items: center; padding-top: 80px; }
.tick { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.center p { margin: 0; color: #475467; font-size: 17px; max-width: 480px; }
.center p.small { font-size: 15px; color: var(--muted); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.test-badge { align-self: flex-start; font-size: 12px; font-weight: 600; background: #fff4dc; color: #8a5a00; border-radius: 4px; padding: 2px 8px; }

/* Photo editor (popup) */
.ed-dialog { width: min(860px, 94vw); max-width: none; padding: 22px; border: 0; border-radius: 12px; background: #fff; color: var(--text); box-shadow: 0 24px 60px rgba(15, 23, 42, .35); }
.ed-dialog::backdrop { background: rgba(15, 23, 42, .5); }
.ed-dialog.at-anchor { position: absolute; margin: 0 auto; inset: auto 0 auto 0; }
.editor { display: flex; flex-direction: column; gap: 14px; }
.ed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ed-head > div { display: flex; flex-direction: column; gap: 2px; }
.ed-head strong { font-size: 20px; font-weight: 500; color: var(--navy); }
.ed-head .hint { font-size: 14px; }
.ed-x { flex: none; width: 36px; height: 36px; border: 0; background: none; font-size: 26px; line-height: 1; color: #475467; cursor: pointer; border-radius: 6px; }
.ed-x:hover { background: var(--tint); }
.ed-stage { position: relative; width: 100%; height: 380px; background: #1f2633; border-radius: 10px; overflow: hidden; touch-action: none; user-select: none; }
.ed-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(15,23,42,.55); cursor: move; z-index: 1; }
.ed-box:focus-visible { outline: 2px dashed #fff; outline-offset: 3px; }
.ed-h { position: absolute; width: 22px; height: 22px; background: #fff; border: 2px solid var(--navy); border-radius: 4px; }
.ed-h.nw { left: -12px; top: -12px; cursor: nwse-resize; } .ed-h.ne { right: -12px; top: -12px; cursor: nesw-resize; }
.ed-h.sw { left: -12px; bottom: -12px; cursor: nesw-resize; } .ed-h.se { right: -12px; bottom: -12px; cursor: nwse-resize; }
.ed-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.ed-stage { height: 420px; background: #3d3a3b; }
.ed-tools { justify-content: center; }
.ed-tools .btn2 { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--navy); font-weight: 500; cursor: pointer; }
.ed-tools .btn2:hover { background: var(--tint); }
.ed-actions .btn { min-width: 156px; }

/* Phones: one column, the main button pinned to the bottom, the editor full screen */
@media (max-width: 640px) {
  .page { padding: 20px 16px 140px; gap: 24px; }
  h1 { font-size: 30px; }
  .fields, .tiles, .types { grid-template-columns: 1fr; }
  .nav.sticky, .start-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
  .nav.sticky { flex-direction: row; }
  .nav.sticky .btn:not(.icon) { flex: 1; height: 52px; font-size: 18px; }
  .start-bar .btn { height: 52px; font-size: 18px; }
  .embedded .nav.sticky, .embedded .start-bar { position: static; border-top: 0; padding: 0; }
  .ed-dialog { width: 100vw; height: 100dvh; max-height: none; margin: 0; border-radius: 0; padding: 18px 16px; }
  .ed-dialog.at-anchor { height: auto; }
  .editor { height: 100%; }
  .ed-stage { height: 46vh; }
  .ed-actions { margin-top: auto; }
  .ed-actions .btn { flex: 1; min-width: 0; height: 52px; font-size: 18px; }
}

/* ===================== Edit mode (texts) ===================== */
.editing body { padding-top: 0; }
.cms-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px;
  background: #14326e; color: #fff; font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.cms-bar strong { margin-right: auto; }
.cms-screens { display: flex; gap: 4px; background: rgba(255,255,255,.12); border-radius: 10px; padding: 3px; }
.cms-bar .cms-btn { background: transparent; color: #fff; border-color: transparent; }
.cms-bar .cms-btn[aria-pressed="true"] { background: #fff; color: #14326e; }
.cms-bar .cms-primary { background: #fff; color: #14326e; }
.cms-count { font-size: 13px; opacity: .85; }
.cms-btn { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #14326e; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cms-btn:disabled { opacity: .45; cursor: default; }
.cms-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.editing [data-t], .editing [data-t-ph] { outline: 1.5px dashed rgba(42, 107, 217, .55); outline-offset: 2px; border-radius: 3px; cursor: pointer; }
.editing [data-t]:hover, .editing [data-t-ph]:hover { outline-style: solid; outline-color: var(--blue); background: rgba(42, 107, 217, .08); }
.editing .cms-changed { outline-color: rgba(31, 122, 74, .7); }
.cms-pop { position: absolute; z-index: 60; width: min(460px, calc(100vw - 16px)); background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(17, 24, 39, .25); padding: 14px; display: flex; flex-direction: column; gap: 8px; color: var(--text); font-size: 14px; }
.cms-pop.centered { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); }
.cms-pop-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.cms-pop-head code { font-size: 11px; color: var(--muted); }
.cms-pop textarea { width: 100%; min-height: 76px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 15px; resize: vertical; }
.cms-pop textarea:focus { outline: 3px solid var(--focus); border-color: var(--blue); }
.cms-orig, .cms-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.cms-orig span { font-weight: 600; }
.cms-err { margin: 0; color: var(--error); font-size: 13px; }
.cms-err:empty { display: none; }
.cms-actions { display: flex; gap: 8px; align-items: center; }
.cms-gap { flex: 1; }
.cms-drawer { position: fixed; right: 0; top: 0; bottom: 0; z-index: 55; width: min(420px, 100vw); background: #fff; border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(17, 24, 39, .15); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cms-drawer-head { display: flex; justify-content: space-between; align-items: center; }
.cms-search { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.cms-list { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.cms-list h3 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cms-item { display: flex; justify-content: space-between; gap: 8px; text-align: left; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: #fff;
  font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; }
.cms-item:hover { border-color: var(--blue); }
.cms-item em { font-style: normal; font-size: 11px; color: var(--ok); font-weight: 600; flex: none; }
.cms-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; transition: .2s; z-index: 70;
  background: #14326e; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; pointer-events: none; }
.cms-toast.show { opacity: 1; transform: translateX(-50%); }

/* Spacing between the parts of each screen (as in the design) */
#start, #step, #resume { display: flex; flex-direction: column; gap: 32px; }
#step > section.group + section.group { margin-top: 8px; }
#start .fields, #resume .fields { margin-top: 0 !important; }
#start .start-bar, #resume .start-bar { margin-top: 0 !important; }
.steps + h1, .steps + div { margin-top: -8px; }

/* Several vehicles (Drive on my own) */
.add-vehicle { align-self: flex-start; }
.add-vehicle + .hint { margin-top: -20px; }
