:root { --navy: #14213d; --gold: #c9a227; --ink: #1c2230; --muted: #5b6475; --line: #e2ddd0; --ok: #1b7f3b; --bad: #c62828; --paper: #fbfaf7; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Devanagari", Arial, sans-serif; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.4; }
.top { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center; background: var(--navy); color: #fff; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
.top b { display: block; color: #e0bd4f; font-size: 17px; letter-spacing: .3px; }
.top span { font-size: 13px; color: #cfd6e4; }
form { max-width: 640px; margin: 0 auto; padding: 12px 12px 40px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
label:last-child { margin-bottom: 0; }
input, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 17px; color: var(--ink); padding: 11px 12px; border: 1px solid #cfc9b8; border-radius: 8px; background: #fff; }
input:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
input[name="vehicle_no"] { text-transform: uppercase; font-weight: 600; letter-spacing: .5px; }

.sec { padding: 0; overflow: hidden; }
.sec-head { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px; background: #f4efe0; color: var(--navy); font-weight: 700; font-size: 16px; cursor: pointer; border-bottom: 1px solid var(--line); }
.sec-head input { width: 28px; height: 28px; margin: 0; flex: none; accent-color: var(--ok); }
.sec-head span { flex: 1; }
.sec-head small { font-weight: 600; color: var(--ok); font-size: 13px; }
.item { display: grid; grid-template-columns: 26px 1fr; gap: 6px 8px; padding: 12px 14px; border-top: 1px solid #f0ece2; }
.item:first-of-type { border-top: 0; }
.item .no { color: var(--muted); font-weight: 600; }
.item .seg { grid-column: 2; display: flex; gap: 8px; }
.item.miss { background: #fff4f4; box-shadow: inset 3px 0 0 var(--bad); }
.opt { flex: 1; font: inherit; font-weight: 600; padding: 10px 0; border-radius: 8px; border: 1px solid #cfc9b8; background: #fff; color: var(--muted); cursor: pointer; }
.opt.ok[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.not_ok[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #fff; }

.warn { margin: 0 0 10px; color: var(--bad); font-weight: 600; }
.sign p { margin: 0; }
#sig { font-size: 20px; font-weight: 700; color: var(--navy); padding: 6px 0 4px; border-bottom: 1px solid #999; }
.muted { color: var(--muted); }
.small { font-size: 13px; text-align: center; }
#msg { min-height: 1em; margin: 6px 2px 10px; font-weight: 600; }
#msg.err { color: var(--bad); }
#msg.ok { color: var(--ok); }
.send { width: 100%; font: inherit; font-size: 18px; font-weight: 700; padding: 16px; border: 0; border-radius: 12px; background: #1fa855; color: #fff; cursor: pointer; }
.send:active { transform: translateY(1px); }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 10px; }
.pick:empty { display: none; }
.chip { font: inherit; font-size: 17px; font-weight: 700; letter-spacing: .5px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--navy); background: #eef2fa; color: var(--navy); cursor: pointer; }
.chip.recent { background: #fff; }
.pick .none { color: var(--muted); font-size: 14px; align-self: center; }
input.good { border-color: var(--ok); background: #f1faf3; }
input.bad { border-color: var(--bad); background: #fff4f4; }
.nosh { max-width: 640px; margin: 12px auto 0; padding: 12px 14px; background: #fff7e0; border: 1px solid #e8c766; border-radius: 10px; }
.nosh p { margin: 0 0 10px; }
.chrome { display: block; text-align: center; font-weight: 700; padding: 12px; border-radius: 10px; background: var(--navy); color: #fff; text-decoration: none; margin-top: 8px; }
.ready { position: fixed; inset: 0; z-index: 20; background: rgba(10, 16, 30, .7); display: flex; align-items: flex-end; justify-content: center; }
.ready[hidden] { display: none; }
.ready-in { background: #fff; width: 100%; max-width: 640px; max-height: 100%; overflow: auto; border-radius: 16px 16px 0 0; padding: 14px 14px max(16px, env(safe-area-inset-bottom)); }
#shot { width: 100%; max-height: 52vh; object-fit: contain; object-position: top; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.why { color: var(--bad); font-weight: 600; margin: 8px 0; }
.why:empty { display: none; }
.ready .send { margin-top: 10px; }
.row2 { display: flex; gap: 10px; margin-top: 10px; }
.lite { flex: 1; font: inherit; font-weight: 600; padding: 12px; border-radius: 10px; border: 1px solid #cfc9b8; background: #fff; color: var(--ink); cursor: pointer; }
body.locked { overflow: hidden; }
.chrome[hidden], .send[hidden] { display: none; }
.top .tt { flex: 1; min-width: 0; }
.langbtn { font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.langs { position: fixed; inset: 0; z-index: 30; background: var(--navy); display: flex; align-items: center; justify-content: center; padding: 20px; }
.langs[hidden] { display: none; }
.langs-in { width: 100%; max-width: 420px; text-align: center; color: #fff; }
.langs-in img { margin: 0 auto 10px; }
.langs-in h2 { font-size: 20px; font-weight: 600; margin: 0 0 20px; color: #e0bd4f; line-height: 1.5; }
.langopt { display: block; width: 100%; margin: 0 0 12px; font: inherit; font-size: 22px; font-weight: 700; padding: 16px; border-radius: 12px; border: 0; background: #fff; color: var(--navy); cursor: pointer; }
.field { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.prods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.prods.bad .prod { border-color: var(--bad); }
.prod { font: inherit; font-size: 15px; font-weight: 700; padding: 12px 0; border-radius: 8px; border: 1px solid #cfc9b8; background: #fff; color: var(--ink); cursor: pointer; }
.prod[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.badlist { margin: 0 0 10px; padding-left: 20px; color: var(--bad); font-weight: 600; }
.badlist:empty { display: none; }
@media (max-width: 360px) { .prods { grid-template-columns: repeat(2, 1fr); } }
input[name="vehicle_no"]::placeholder { font-weight: 400; text-transform: none; letter-spacing: 0; }
.subs { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding: 10px; background: #fff4f4; border-radius: 8px; }
.subs[hidden] { display: none; }
.subq { width: 100%; margin: 0 0 2px; font-weight: 600; color: var(--bad); font-size: 14px; }
.sub { font: inherit; font-size: 15px; font-weight: 700; padding: 9px 12px; border-radius: 8px; border: 1px solid #e0b4b4; background: #fff; color: var(--ink); cursor: pointer; }
.sub[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #fff; }
/* GRS-LOAD-01 (loading.html) */
.rep { margin: -2px 0 12px; padding: 10px 12px; border-radius: 8px; font-size: 15px; background: #eef2fa; color: var(--navy); border: 1px solid #c9d3e8; }
.rep[hidden] { display: none; }
.rep.none { background: #fff7e0; border-color: #e8c766; color: var(--ink); }
.rep b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.cons .prod { font-size: 16px; padding: 14px 0; }
#party-box[hidden] { display: none; }
.cap { margin: 0 0 10px; font-weight: 700; color: var(--navy); }
.fixrow { margin-bottom: 12px; }
.fixrow .fl { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.fixrow .fx { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #d6e9da; border-radius: 8px; background: #f1faf3; }
.fixrow .fv { flex: 1; font-size: 17px; color: var(--ink); }
.chg { font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid #cfc9b8; background: #fff; color: var(--navy); cursor: pointer; }
.fixrow .fx[hidden], .fixrow .ed[hidden] { display: none; }
.fixrow .ed input { margin-top: 0; }
/* driver by mobile */
.drvnote { margin: -4px 0 10px; font-size: 14px; font-weight: 600; color: var(--navy); }
.drvnote.err { color: var(--bad); }
.drvnote[hidden] { display: none; }
input[readonly] { background: #f1faf3; }
/* loading form waits for a reporting */
form.norep .needrep { display: none; }
.rep .go { display: block; margin-top: 10px; text-align: center; font-weight: 700; padding: 12px; border-radius: 10px; background: var(--navy); color: #fff; text-decoration: none; }
.rep .again { display: block; width: 100%; margin-top: 8px; font: inherit; font-weight: 600; padding: 10px; border-radius: 10px; border: 1px solid #cfc9b8; background: #fff; color: var(--ink); cursor: pointer; }
.golo { margin: 0 0 12px; }
/* trip status card (reporting page) and step buttons */
.trip .tl { margin: 0 0 8px; display: flex; flex-direction: column; }
.trip .tl b { color: var(--ok); font-size: 15px; }
.trip .tl span { color: var(--ink); font-size: 15px; }
.trip .tl.sub b { color: var(--muted); font-weight: 600; font-size: 13px; }
.steps { display: flex; gap: 10px; margin-top: 12px; }
.stepbtn { flex: 1; display: block; text-align: center; font: inherit; font-size: 18px; font-weight: 700; padding: 15px 8px; border-radius: 12px; border: 0; background: #1fa855; color: #fff; text-decoration: none; cursor: pointer; }
.stepbtn.lite2 { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.linkbtn { display: block; width: 100%; margin-top: 12px; font: inherit; font-size: 15px; font-weight: 600; padding: 10px; border-radius: 10px; border: 1px dashed #b9b3a2; background: #fbfaf7; color: var(--navy); cursor: pointer; }
.dvp { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.dvp .send { margin-top: 6px; }
.backlink { display: inline-block; margin: 0 0 10px; font-weight: 600; color: var(--navy); text-decoration: none; }
.backlink::before { content: "← "; }
.vno { margin: 0 0 8px; font-size: 22px; font-weight: 800; letter-spacing: .5px; color: var(--navy); }
/* driver mobile check before the next steps */
.gatebox { margin: 12px 0 4px; padding: 12px; border-radius: 10px; background: #f4efe0; }
.gatebox .gate { margin-bottom: 4px; color: var(--navy); font-weight: 600; }
.gatebox .drvnote { margin: 4px 0 0; }
.gatebox .pick { margin: 8px 0 0; }
/* challan photo (photo.js, new way) */
.cam { margin: 14px 0 4px; padding: 12px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; }
.cam.bad { border-color: var(--bad); background: #fff5f5; }
.cambtn { width: 100%; font: inherit; font-size: 18px; font-weight: 700; padding: 18px 12px; border: 0; border-radius: 12px; background: var(--navy); color: #fff; cursor: pointer; }
.cambtn.done { background: #e8f5ec; color: var(--ok); border: 2px solid var(--ok); font-size: 16px; padding: 12px; }
.cambtn:disabled { opacity: .4; }
.camprev { display: block; width: 100%; max-height: 320px; object-fit: contain; margin-top: 10px; border-radius: 8px; background: #f3f3f3; }
.camnote { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.camnote.err { color: var(--bad); font-weight: 600; }
.camskip { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.camskip input { width: 20px; height: 20px; }
.cam.skipped .camprev { display: none; }
.trialtag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; }
