:root { --accent: #e6371b; --accent-dark: #c62d16; --bg: #f5f6f7; --card: #fff; --line: #dfe3e7; --text: #1c1e21; --muted: #667; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); }
header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--line); }
header .brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
header .brand img { width: 28px; height: 28px; border-radius: 6px; }
header .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
header select { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
header .icon { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 9px; cursor: pointer; font: inherit; }
.partner-badge { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.partner-badge img { height: 26px; max-width: 110px; object-fit: contain; }
main { max-width: 720px; margin: 0 auto; padding: 14px 14px 40px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 14px; }
footer a { color: var(--muted); }
h2 { font-size: 20px; margin: 4px 0 12px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
p { margin: 0 0 12px; }
.note { color: var(--text); }
.muted { color: var(--muted); font-size: 14px; }
.warn { background: #fff3cd; border-radius: 8px; padding: 10px 12px; }
.banner { background: #fff3cd; color: #6b4e00; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 14px 0; }
.screen { animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.field.req > span::after { content: ' *'; color: var(--accent); }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--text); padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
/* one height for text fields and drop-downs: Safari draws a native select
   shorter than an input, so the select gets the same box and its own arrow */
.field input:not([type=checkbox]):not([type=radio]), .field select { height: 44px; box-sizing: border-box; }
select { -webkit-appearance: none; appearance: none; padding-right: 34px !important; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23667' stroke-width='1.8' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }
header select { height: 32px; padding-right: 28px !important; background-position: right 9px center; }
.field textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.actions .back { margin-right: auto; }
.start-actions { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.btn { font: inherit; font-size: 16px; padding: 11px 20px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; }
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: #e9ecef; color: var(--text); }
.btn.secondary:hover { background: #dde1e5; }
.btn.link { background: none; color: var(--accent); padding: 6px 8px; }
.btn.x { position: absolute; top: 4px; right: 4px; padding: 0 8px; line-height: 22px; border-radius: 11px; background: rgba(0,0,0,.6); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.problem { background: #fdecea; color: #a12a1c; border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.problem:empty { display: none; }
.hidden { display: none !important; }
.radios { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.radio.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.radio input { margin-top: 4px; }
.radio small { display: block; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.check input { margin-top: 4px; }
.list { display: flex; flex-direction: column; }
.list .check { border-bottom: 1px solid var(--line); }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { text-align: left; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.choice.on { border-color: var(--accent); }
.choice b { display: block; }
.choice small { color: var(--muted); }
.checklist { padding-left: 20px; }
.checklist li { margin-bottom: 6px; }
#map { height: 300px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 10px; }
.pad { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; touch-action: none; }
.sketch { aspect-ratio: 8 / 5; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb { position: relative; width: 110px; height: 110px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.add { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 28px; color: var(--accent); cursor: pointer; border-style: dashed; }
.thumb.add small { font-size: 12px; color: var(--muted); }
.impact { display: flex; justify-content: center; }
.impact svg { max-width: 100%; height: auto; }
.impact-label { text-align: center; font-weight: 600; min-height: 1.4em; }
.party-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.party-card { text-align: left; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-left: 5px solid #c9ced3; border-radius: 10px; background: #fff; cursor: pointer; }
.party-card.done { border-left-color: #0a7d34; }
.party-card b { display: block; }
.party-card small { color: var(--muted); }
.people .sub { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 4px; margin-bottom: 10px; background: #fff; }
.license summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.insurer .picker-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 4px; }
.insurer input[type=search] { font: inherit; font-size: 16px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; width: 100%; margin-bottom: 6px; }
.pick { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; padding: 8px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.pick:hover { background: #f2f3f5; }
.pick img, .pick .nologo { width: 40px; height: 28px; object-fit: contain; flex: 0 0 auto; }
.pick.partner span:last-child { font-weight: 600; }
.chosen-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 8px; }
.chosen-row img { height: 28px; max-width: 80px; object-fit: contain; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #eef2f0; color: #333; white-space: nowrap; }
.scanner .viewport { margin: 8px 0; border-radius: 10px; overflow: hidden; background: #000; }
.scanner video { width: 100%; display: block; max-height: 60vh; object-fit: cover; }
.summary { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.deliveries { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.delivery { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.delivery.sent .pill, .delivery.delivered .pill { background: #e2f3e8; color: #0a7d34; }
.delivery.failed .pill { background: #fdecea; color: #a12a1c; }
.partner { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.partner img { height: 44px; max-width: 140px; object-fit: contain; }
.partner small { display: block; color: var(--muted); }
.loading { display: flex; justify-content: center; padding: 40px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid #ccd; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.sending { margin: 12px 0; color: var(--muted); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-card { background: #fff; border-radius: 12px; padding: 20px; max-width: 420px; width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.handoff { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.handoff .qr { width: 220px; max-width: 100%; margin: 8px auto; }
.handoff .qr svg { width: 100%; height: auto; display: block; }
.ok { color: #0a7d34; font-weight: 600; }
.start .lead { font-size: 17px; }
.points { margin: 0 0 6px; padding-left: 20px; }
.points li { margin-bottom: 6px; }
.app-card { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 22px; }
.app-card .app-text { flex: 1 1 auto; }
.app-card p { font-size: 14px; margin-bottom: 10px; }
.app-card .badge img { height: 44px; width: auto; display: block; }
.app-card .app-qr { flex: 0 0 auto; }
.app-card .app-qr img { width: 112px; height: 112px; display: block; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
@media (max-width: 480px) { .app-card .app-qr { display: none; } }
.made-by { margin-top: 18px; text-align: center; }
.made-by a { color: var(--muted); }
.fleet-head, .fleet-row { display: grid; grid-template-columns: 1fr 1fr 1.1fr 2.2fr 32px; gap: 6px; align-items: center; }
.fleet-row .numbers, .fleet-head .numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-left: 10px; border-left: 2px solid var(--line); }
.fleet-head { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.fleet-row { margin-bottom: 6px; }
.fleet-row input, .fleet-row select { font: inherit; font-size: 14px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; width: 100%; min-width: 0; height: 38px; box-sizing: border-box; background-color: #fff; }
.fleet-row select { padding-right: 26px !important; background-position: right 8px center; }
.fleet details { margin: 12px 0; }
.fleet details summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.fleet textarea { width: 100%; font: inherit; font-size: 14px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
@media (max-width: 640px) { .fleet-head { display: none; } .fleet-row { grid-template-columns: 1fr 1fr; } .fleet-row select, .fleet-row .numbers { grid-column: span 2; } }
.fleet-link { margin-top: 16px; text-align: center; }
.fleet-link a { color: var(--accent); }
.clip-promo { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 16px; }
.clip-promo .clip-qr img { width: 112px; height: 112px; display: block; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.clip-promo.compact .clip-qr img { width: 84px; height: 84px; }
.clip-promo b { display: block; margin-bottom: 4px; }
.clip-promo p { font-size: 14px; margin: 4px 0 6px; }
.clip-promo a.muted { font-size: 13px; }
a.btn { display: inline-block; text-decoration: none; text-align: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 4px 0 12px; }
.seg button { font: inherit; padding: 8px 16px; border: 0; background: #fff; cursor: pointer; color: var(--text); }
.seg button.on { background: var(--accent); color: #fff; }
.seg.small button { padding: 6px 12px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 14px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.clip .actions { justify-content: flex-start; }
body.code-mode { background: #fff; }
.clip-code { text-align: center; padding-top: 8px; }
.clip-code .code { display: flex; justify-content: center; }
.clip-code .code svg { max-width: 100%; height: auto; display: block; }
.clip-code p { margin: 16px 0; font-size: 17px; }
.clip-code .actions { justify-content: center; }
.contact-hint { font-size: 13px; margin: -4px 0 12px; }
