/* Driver PWA styles (base shared with the merchant space). */
:root { --brand: #0f766e; --brand-2: #115e59; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f8fafc; --card: #fff; --ok: #047857; --warn: #b45309; --bad: #b91c1c; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand b { color: var(--brand); } .brand small { color: var(--muted); font-weight: 400; }
.brand__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 800; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 12px; } h2 { font-size: 17px; margin: 0 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
label.f { display: grid; gap: 4px; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
label.f small { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #99f6e4; outline-offset: 1px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; font: 600 14px/1 inherit; cursor: pointer; background: var(--brand); color: #fff; }
.btn:hover { background: var(--brand-2); } .btn[disabled] { opacity: .5; cursor: default; }
.btn--ghost { background: #fff; color: var(--ink); border-color: #cbd5e1; } .btn--ghost:hover { background: #f1f5f9; }
.btn--danger { background: var(--bad); } .btn--sm { padding: 7px 10px; font-size: 13px; }
.link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font: 600 14px inherit; cursor: pointer; color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.banner { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; }
.banner--warn { background: #fffbeb; border-color: #fde68a; } .banner--bad { background: #fef2f2; border-color: #fecaca; } .banner--ok { background: #ecfdf5; border-color: #a7f3d0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #e2e8f0; }
.pill--placed { background: #fef3c7; } .pill--confirmed, .pill--preparing { background: #dbeafe; } .pill--ready, .pill--driver_assigned, .pill--picked_up { background: #e0e7ff; }
.pill--delivered { background: #d1fae5; } .pill--rejected, .pill--cancelled, .pill--no_driver { background: #fee2e2; }
.list { display: grid; gap: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.row__main { display: grid; gap: 2px; min-width: 0; } .row__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; } .thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.prod-img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: #f1f5f9; flex: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; } .stat b { display: block; font-size: 20px; }
.hours { display: grid; gap: 6px; } .hours__row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.hours__row input[type=time] { min-width: 0; padding: 8px 6px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 6px 0; } .check input { width: auto; }
.err { color: var(--bad); min-height: 1.2em; margin: 4px 0; }
.toasts { position: fixed; right: 12px; bottom: 12px; display: grid; gap: 8px; z-index: 20; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; max-width: 340px; } .toast--ok { background: var(--ok); } .toast--error { background: var(--bad); }
/* ---- driver app */
main { max-width: 640px; padding-bottom: 90px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--line); background: #fff; margin-bottom: 14px; }
.switch b { font-size: 18px; } .switch--on { border-color: var(--ok); background: #ecfdf5; }
.switch button { min-width: 130px; padding: 14px; font-size: 16px; }
.offer { border: 2px solid var(--brand); }
.offer__money { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 700; margin: 6px 0; }
.offer__money span { background: #f1f5f9; border-radius: 8px; padding: 4px 8px; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.acts .btn { padding: 14px; font-size: 16px; }
.step { display: grid; gap: 4px; padding: 10px 0; border-top: 1px dashed var(--line); }
.step:first-of-type { border-top: 0; }
.pin-input { font: 700 28px/1.2 ui-monospace, monospace; letter-spacing: 10px; text-align: center; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--line); z-index: 6; }
.nav button { padding: 12px 4px 14px; border: 0; background: none; font: 600 13px inherit; color: var(--muted); cursor: pointer; }
.nav button[aria-current="page"] { color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.docs { display: grid; gap: 8px; }
.doc { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.doc input[type=file] { width: auto; max-width: 190px; font-size: 13px; padding: 6px; }
.meter { height: 10px; border-radius: 99px; background: #e2e8f0; overflow: hidden; } .meter i { display: block; height: 100%; background: var(--ok); }
.meter--warn i { background: var(--warn); } .meter--bad i { background: var(--bad); }
.toasts { bottom: 76px; }

.report-box { margin-top: 12px; } .report-box summary { list-style: none; display: inline-flex; } .report-box summary::-webkit-details-marker { display: none; }
.report-box[open] summary { margin-bottom: 8px; }

.terms { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 14px; margin: 8px 0 12px; } .terms input { width: auto; margin-top: 4px; }

.banner--test { background: #eef2ff; border-color: #6366f1; color: #312e81; }

/* ---- navigation map */
.nav-panel { padding: 10px; }
.nav-map { position: relative; height: 320px; border-radius: 12px; overflow: hidden; background: #e5e7eb; touch-action: none; cursor: grab; border: 1px solid var(--line); outline-offset: 2px; }
@media (min-width: 700px) { .nav-map { height: 420px; } }
.nav-map__tiles img { position: absolute; width: 256px; height: 256px; user-select: none; pointer-events: none; max-width: none; }
.nav-map__route { position: absolute; inset: 0; pointer-events: none; }
.nav-map__route polyline { fill: none; stroke: #2563eb; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav-map__marks { position: absolute; inset: 0; pointer-events: none; }
.nav-map__mark { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.45); color: #fff; font: 800 13px/1 system-ui, sans-serif; }
.nav-map__mark--driver { width: 20px; height: 20px; background: #2563eb; box-shadow: 0 0 0 6px rgba(37,99,235,.25), 0 1px 5px rgba(0,0,0,.45); }
.nav-map__mark--shop { background: #b45309; }
.nav-map__mark--customer { background: #b91c1c; }
.nav-map__btn { position: absolute; inset-inline-end: 8px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: #0f172a; }
.nav-map__btn--in { top: 8px; } .nav-map__btn--out { top: 54px; } .nav-map__btn--me { top: 100px; } .nav-map__btn--fit { top: 146px; }
.nav-map__attr { position: absolute; inset-inline-end: 4px; bottom: 2px; font-size: 10px; background: rgba(255,255,255,.85); padding: 0 4px; color: #333; }
.nav-map__status { position: absolute; inset-inline-start: 8px; top: 8px; max-width: calc(100% - 70px); background: rgba(15,23,42,.85); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.nav-map__status[hidden] { display: none; }
.nav-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; } .nav-chip { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: #eef2ff; color: #312e81; }
.nav-chip--bad { background: #fee2e2; color: #7f1d1d; } .nav-chip--warn { background: #fef3c7; color: #78350f; }
.nav-summary { margin: 6px 0; } .nav-next { padding: 10px 12px; background: #0f766e; color: #fff; border-radius: 10px; margin: 6px 0; font-size: 16px; }
.nav-next[hidden], .nav-steps-box[hidden] { display: none; }
.nav-steps { font-size: 14px; padding-inline-start: 22px; }
.nav { padding-bottom: env(safe-area-inset-bottom); } .toasts { bottom: calc(12px + env(safe-area-inset-bottom)); }
