:root {
  --navy: #162238; --navy-d: #0e1826; --brand: #162238; --brand-l: #17603c; --brand-t: #e6f2ea; --mint: #6ee7a0;
  --go: #17603c; --accent: #1f7a4d; --tint: #f2f8f4;
  --ink: #0b1220; --ink2: #2b3445; --muted: #475467; --line: #c9cfd8; --line2: #98a2b3;
  --ok: #17603c; --ok-t: #e6f2ea; --warn: #6b4200; --warn-t: #fff3cf; --bad: #b42318; --bad-t: #fef3f2;
  --amber: #e9a100; --amber-t: #fff8e1;
  --ur: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif;
  --en: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #fff; color: var(--ink); }
body { font-family: var(--en); font-size: 18px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
html[lang="ur"] body { font-family: var(--ur); font-size: 20px; line-height: 2.05; }
bdi { font-family: var(--en); }
.mono { font-family: var(--mono); }
button { font: inherit; color: inherit; cursor: pointer; }
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.boot { margin: auto; color: var(--muted); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.top { background: var(--brand); color: #fff; padding: calc(8px + env(safe-area-inset-top)) 16px 14px; }
.top .row { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; flex-wrap: wrap; }
html[lang="ur"] .top .row { font-size: 17px; }
.net::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-inline-end: 8px; background: var(--mint); }
.net.off::before { background: #fdb022; }
.lang, .top .out { background: none; border: 2px solid #fff; border-radius: 12px; min-height: 48px; padding: 0 16px; font-family: var(--en); font-size: 16px; font-weight: 700; line-height: 1; color: #fff; }
.lang { margin-inline-start: auto; }
.top .out { margin: 0; }
html[lang="ur"] .top .out { font-size: 17px; line-height: 1.2; }
.top h1 { margin: 8px 0 0; font-size: 28px; font-weight: 800; line-height: 1.3; color: #fff; }
html[lang="ur"] .top h1 { line-height: 1.9; font-size: 30px; }
.top .sub { color: #e3e9f3; font-size: 16px; font-weight: 500; margin-top: 2px; order: 2; }
.top { display: flex; flex-direction: column; }
.top .row { order: 0; }
.top h1 { order: 1; }
html[lang="ur"] .top .sub { font-size: 17px; }
main { padding: 14px 14px 28px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.card { border: 2px solid var(--line); border-radius: 18px; padding: 14px; background: #fff; }
.job h3 { margin: 6px 0 2px; font-size: 22px; font-weight: 800; line-height: 1.3; color: var(--ink); }
html[lang="ur"] .job h3 { line-height: 1.9; }
.job > .row { justify-content: flex-start; flex-wrap: wrap; }
.meta bdi { white-space: nowrap; }
.meta { color: var(--ink2); font-size: 17px; font-weight: 500; }
html[lang="ur"] .meta { font-size: 19px; }
.acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.acts .btn { min-height: 60px; }
.empty { color: var(--muted); text-align: center; margin-top: 40px; }
.demo { position: fixed; left: 50%; transform: translateX(-50%); top: calc(2px + env(safe-area-inset-top)); background: #fdb022; color: #1b1b1b; border-radius: 100px; padding: 0 10px; font-size: 12px; font-weight: 700; font-family: var(--en); z-index: 30; }
.job [data-job-notes] { margin-top: 12px; border: 3px solid var(--amber); background: var(--amber-t); border-radius: 18px; padding: 12px 14px; font-size: 19px; line-height: 1.55; color: var(--ink); font-weight: 500; }
html[lang="ur"] .job [data-job-notes] { font-size: 21px; line-height: 2.1; }
.job [data-job-notes] > b { display: flex; align-items: center; gap: 8px; font-size: 18px; color: #6b4200; font-weight: 800; margin-bottom: 4px; }
html[lang="ur"] .job [data-job-notes] > b { font-size: 21px; }
.job [data-job-notes] > b svg { flex: none; }
.job.hasnote { border-color: var(--line); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 16px; padding: 8px 18px; border: 3px solid transparent; font-weight: 800; font-size: 20px; line-height: 1.2; text-decoration: none; min-height: 60px; }
html[lang="ur"] .btn { font-size: 22px; }
.btn.primary { background: var(--go); color: #fff; flex: 1; }
.btn.ghost { background: #fff; border-color: var(--go); color: var(--go); }
.btn.danger { background: #fff; border-color: var(--bad); color: var(--bad); width: 100%; min-height: 48px; font-size: 17px; padding: 4px 18px; }
.btn.big { width: 100%; }
.btn:disabled { opacity: 1; background: #e3e6eb; border-color: #e3e6eb; color: #475467; cursor: default; }
.chip { display: inline-block; border-radius: 8px; padding: 0 10px; font-size: 16px; font-weight: 800; line-height: 1.7; background: #e9edf3; color: var(--brand); white-space: nowrap; }
html[lang="ur"] .chip { font-size: 17px; line-height: 1.9; }
.chip.brand { background: #e9edf3; color: var(--brand); }
.chip.ok { background: #d5ecdd; color: #0e4a2a; }
.chip.warn { background: var(--warn-t); color: var(--warn); border: 1.5px solid #e9b949; }
.job.done-job { border-color: #9bd1b3; background: var(--tint); }
.visit { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.vtop { display: flex; gap: 10px; align-items: center; padding: calc(8px + env(safe-area-inset-top)) 14px 14px; background: var(--brand); color: #fff; }
.icon { border: 2px solid #fff; background: none; color: #fff; border-radius: 14px; width: 48px; height: 48px; font-size: 24px; flex: none; line-height: 1; }
.grow { flex: 1; min-width: 0; }
.stepof { font-size: 18px; font-weight: 800; }
html[lang="ur"] .stepof { font-size: 19px; line-height: 1.8; }
.prog { display: flex; gap: 3px; margin-top: 8px; }
.prog i { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .3); }
.prog i.d { background: var(--mint); }
.prog i.c { background: #fff; }
.vtop .queue { color: #e3e9f3; font-size: 14px; }
.stitle { margin: 10px 14px 0; font-size: 24px; font-weight: 800; line-height: 1.25; color: var(--ink); }
html[lang="ur"] .stitle { line-height: 1.85; font-size: 27px; }
.cam { position: relative; margin: 8px 14px 0; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 34vh; }
.cam video { width: 100%; height: 100%; object-fit: contain; display: block; }
.compass { position: absolute; bottom: 58px; inset-inline: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.compass > span { background: rgba(0, 0, 0, .7); color: #fff; border-radius: 12px; padding: 0 12px; line-height: 2; font-size: 16px; font-weight: 700; }
.compass.target > span { background: rgba(138, 74, 0, .96); }
.compass.target.on > span { background: rgba(23, 96, 60, .96); }
.compass .arrow { width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, .7); position: relative; transition: transform .15s; flex: none; }
.compass .arrow::after { content: ''; position: absolute; left: 50%; top: 7px; margin-left: -8px; border: 8px solid transparent; border-bottom: 18px solid #fff; border-top: 0; }
.compass.on .arrow { background: rgba(23, 96, 60, .96); }
.lens { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 8px; }
.lens:empty { display: none; }
.lens button { min-width: 48px; height: 40px; padding: 0 12px; border-radius: 100px; border: 0; background: rgba(0, 0, 0, .7); color: #fff; font: inherit; font-size: 16px; }
.lens button.on { background: #fff; color: #111; font-weight: 800; }
.gps { position: absolute; top: 10px; inset-inline: 10px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 15px; font-weight: 700; font-family: var(--en); }
.gps > span, .gps.wait, .gps.bad { background: rgba(0, 0, 0, .68); color: #fff; border-radius: 10px; padding: 0 10px; line-height: 1.9; }
.gps.wait, .gps.bad { inset-inline: auto; }
.gps.ok > span { background: rgba(23, 96, 60, .96); }
.gps.warn > span { background: rgba(138, 74, 0, .96); }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity .15s; pointer-events: none; }
.flash.on { opacity: .85; }
.camdone, .camerr { position: absolute; inset-inline: 8px; bottom: 8px; background: rgba(0, 0, 0, .78); color: #fff; border-radius: 12px; padding: 4px 12px; font-size: 17px; font-weight: 600; }
.hint { margin: 4px 14px 0; font-size: 17px; color: var(--ink2); }
html[lang="ur"] .hint { font-size: 19px; }
.labelnow { margin: 6px 14px 0; font-size: 19px; font-weight: 800; color: var(--go); }
.need { margin: 0; text-align: center; color: var(--warn); font-weight: 700; font-size: 17px; }
.shots { display: flex; gap: 8px; margin: 10px 14px 0; overflow-x: auto; padding-bottom: 2px; }
.shots img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; flex: none; border: 2px solid #fff; outline: 2px solid var(--go); }
.ctrl { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 14px 0; }
.ctrl .btn, .ctrl .count { width: 100px; flex: none; }
.ctrl .btn { min-height: 56px; font-size: 18px; }
.count { text-align: center; font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.shutter { width: 84px; height: 84px; border-radius: 50%; border: 6px solid var(--ink); background: #fff; display: grid; place-items: center; padding: 0; flex: none; box-shadow: 0 0 0 4px var(--go) inset; }
.shutter i { width: 54px; height: 54px; border-radius: 50%; background: var(--go); display: block; }
.shutter:disabled { opacity: .35; }
.gallery { margin: 8px 14px 0; text-align: center; font-size: 14px; color: var(--muted); }
.choices { display: flex; flex-direction: column; gap: 12px; margin: 10px 14px; }
.opt, .chk { display: flex; align-items: center; gap: 14px; border: 3px solid var(--line); border-radius: 18px; padding: 10px 16px; background: #fff; font-size: 22px; font-weight: 800; text-align: start; min-height: 76px; line-height: 1.3; }
html[lang="ur"] .opt, html[lang="ur"] .chk { font-size: 24px; }
.opt.on { border-color: var(--go); background: #e6f2ea; color: var(--ink); }
.radio { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #6b7587; flex: none; }
.opt.on .radio { border: 9px solid var(--go); }
.checks { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 10px 14px; }
.chk { font-size: 19px; min-height: 60px; padding: 8px 14px; }
html[lang="ur"] .chk { font-size: 21px; }
.chk.on { border-color: var(--go); background: #e6f2ea; }
.box { width: 28px; height: 28px; border-radius: 8px; border: 3px solid #6b7587; flex: none; }
.chk.on .box { background: var(--go) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.4'/%3E%3C/svg%3E") center/20px no-repeat; border-color: var(--go); }
.addphoto { display: flex; align-items: center; gap: 12px; margin: 10px 14px; }
.addphoto .btn { min-height: 56px; font-size: 18px; }
textarea { display: block; margin: 10px 14px; width: calc(100% - 28px); border: 2px solid var(--line2); border-radius: 14px; padding: 12px; font: inherit; font-size: 19px; color: var(--ink); }
.safe { margin: 10px 14px; background: var(--amber-t); border: 3px solid var(--amber); color: var(--ink); border-radius: 18px; padding: 10px 14px; font-size: 18px; font-weight: 500; }
.note { margin: 8px 14px; color: var(--ink2); }
.vfoot { margin-top: auto; padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; border-top: 2px solid #e3e6eb; background: #fff; position: sticky; bottom: 0; }
.vfoot .row { gap: 8px; }
.vfoot .row .btn.ghost { flex: none; min-width: 96px; }
.vfoot .btn.primary { margin-top: 0; }
.overlay { position: fixed; inset: 0; background: rgba(11, 18, 32, .6); display: flex; align-items: flex-end; z-index: 40; }
.sheet { background: #fff; border-radius: 24px 24px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); width: 100%; max-height: 92vh; overflow: auto; }
.sheet h3 { margin: 0 0 4px; font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.4; }
html[lang="ur"] .sheet h3 { line-height: 1.9; }
.sheet p { margin: 0 0 10px; color: var(--ink2); font-size: 18px; }
.sheet textarea { margin: 8px 0 12px; width: 100%; }
.sheet .btn { width: 100%; margin-top: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { border: 2px solid var(--line); border-radius: 14px; text-align: center; padding: 6px 0; }
.stats b { display: block; font-size: 26px; font-family: var(--en); line-height: 1.4; color: var(--ink); }
.stats span { font-size: 15px; color: var(--ink2); font-weight: 600; }
.banner { border-radius: 0; padding: 8px 16px; font-size: 18px; font-weight: 800; line-height: 1.5; margin: 0 -14px; }
html[lang="ur"] .banner { font-size: 19px; line-height: 1.9; }
.banner.warn { background: #fdb022; color: #2a1a00; }
.uplist { border: 2px solid var(--line); border-radius: 18px; padding: 4px 14px; }
.up { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 2px solid #e3e6eb; }
.up:last-child { border-bottom: 0; }
.up img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; }
.nm { font-size: 18px; font-weight: 700; }
.fine { font-size: 15px; color: var(--ink2); }
.center { text-align: center; }
.donebox { border: 3px solid #9bd1b3; background: var(--tint); border-radius: 18px; padding: 14px; text-align: center; }
.donebox p { margin: 4px 0 12px; color: var(--ink2); }
.submitbox { margin-top: 4px; }
.auth { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 22px; background: var(--tint);
  padding: calc(12px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.auth-top { width: 100%; max-width: 1160px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand b { font-family: var(--en); font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--navy); line-height: 1.2; }
.auth-brand small { font: 400 18px var(--ur); color: #5b6472; }
.auth-card { width: 100%; max-width: 440px; margin: auto 0; background: #fff; border: 1px solid var(--line-soft, #e5e7eb); border-radius: 20px; padding: 28px 24px; box-shadow: 0 10px 28px rgba(22, 34, 56, .08); }
.auth-foot { margin: 0; color: #5b6472; font-size: 13px; font-family: var(--en); }
.auth-card h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.3; color: var(--navy); letter-spacing: -.02em; }
html[lang="ur"] .auth-card h1 { line-height: 1.9; margin-bottom: 8px; }
.auth-lede { margin: 0 0 18px; color: #5b6472; font-size: 16px; }
.auth-card label { display: block; font-weight: 600; font-size: 15px; margin: 0 0 14px; color: var(--navy); }
.auth-card input { display: block; width: 100%; margin-top: 6px; min-height: 52px; border: 1.5px solid #cfd4dc; border-radius: 12px; padding: 12px 14px; font-size: 17px; font-family: var(--en); color: var(--ink); }
.auth-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 122, 77, .18); }
.auth-card #code { letter-spacing: .3em; font-weight: 600; text-align: center; font-size: 22px; }
.auth-card .btn { min-height: 52px; font-size: 16px; font-weight: 600; border-radius: 12px; }
.auth-card .btn.primary { background: var(--accent); }
.auth-card .btn.ghost { border-color: var(--line); color: var(--navy); }
.auth-note { margin: 0 0 14px; border-radius: 12px; padding: 6px 12px; font-size: 15px; }
.auth-note.ok { background: var(--ok-t); color: #14532d; }
.auth-note.warn { background: var(--warn-t); color: var(--warn); }
.auth-alt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 12px; }
.linkbtn { background: none; border: 0; padding: 12px 2px; min-height: 48px; color: #17603c; font-weight: 600; font-size: 15px; text-decoration: none; }
.auth-fine { margin: 14px 0 0; color: #5b6472; font-size: 14px; }
.auth .lang { margin: 0; border: 1px solid #cfd4dc; background: #fff; color: var(--navy); min-height: 44px; border-radius: 12px; font-weight: 600; }
html[lang="ur"] .auth-lede { font-size: 17px; line-height: 2.05; margin-bottom: 12px; }
html[lang="ur"] .auth-card label { font-size: 17px; line-height: 2.05; }
html[lang="ur"] .auth-card .btn { font-size: 20px; }
html[lang="ur"] .auth-note { font-size: 16px; line-height: 2; }
html[lang="ur"] .auth-fine { font-size: 15px; line-height: 2; }
html[lang="ur"] .linkbtn { font-size: 17px; line-height: 2; }
.guide section { border-bottom: 2px solid #e3e6eb; padding: 14px 0; }
.guide section:first-child { padding-top: 4px; }
.guide h3 { margin: 0 0 4px; font-size: 20px; color: var(--go); line-height: 1.5; font-weight: 800; }
.guide p { margin: 0; font-size: 18px; color: var(--ink2); }
html[lang="ur"] .guide h3 { font-size: 21px; line-height: 2; }
html[lang="ur"] .guide p { line-height: 2.1; font-size: 20px; }
.guide .btn { margin-top: 18px; }
.wrongdoor { border: 3px solid var(--amber); border-radius: 18px; padding: 12px 14px; background: var(--amber-t); }
.wrongdoor p { margin: 0 0 10px; color: var(--ink); font-size: 18px; }
.queue { margin-inline-start: 6px; }
#toast { position: fixed; inset-inline: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; border-radius: 12px; padding: 8px 14px; font-size: 16px; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; z-index: 50; text-align: center; }
#toast.show { opacity: 1; transform: none; }
