/* SARV RMC inward app — phone first: big buttons, high contrast for outdoors, actions within thumb reach. */
:root {
  --bg: #f4f2ee; --card: #ffffff; --ink: #1d2024; --muted: #5d636b; --line: #d9d5cc;
  --dark: #23272e; --yellow: #f5b400; --green: #1f8a4c; --red: #c0392b; --amber: #b86e00; --blue: #1f5fa8;
  --warn-bg: #fff4d6; --bad-bg: #fde4e1; --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif; }
body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
a { color: inherit; }
h1 { font-size: 20px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h2 { font-size: 17px; margin: 22px 0 8px; color: var(--muted); }
h3 { margin: 0 0 10px; font-size: 19px; }
.center { text-align: center; } .muted { color: var(--muted); } .big { font-size: 20px; } .lead { font-size: 18px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--dark); color: #fff; }
.top .back { background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; padding: 0 8px 4px 0; cursor: pointer; }
.net { font-size: 13px; padding: 3px 9px; border-radius: 99px; background: #2f6f45; }
.net.off { background: var(--red); }
.qbar { display: block; padding: 10px 16px; background: var(--warn-bg); text-decoration: none; font-weight: 600; }
.qbar.bad { background: var(--bad-bg); color: var(--red); }
main { padding: 14px 16px; max-width: 640px; margin: 0 auto; }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; text-align: center; padding: 16px 2px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); }
.tabs a.on { color: var(--ink); box-shadow: inset 0 3px 0 var(--yellow); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 16px; border-radius: var(--radius);
  border: 2px solid var(--dark); background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--dark); color: #fff; }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.warnb { background: var(--amber); border-color: var(--amber); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 15px; }
.btn.big { width: 100%; min-height: 56px; font-size: 18px; margin: 6px 0; }
.btn.huge { width: 100%; min-height: 68px; font-size: 21px; margin: 6px 0 10px; }
.btn:disabled { opacity: .5; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.seg { display: flex; gap: 8px; } .seg .btn { flex: 1; }
.qcbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.qcbtns .btn { min-height: 64px; margin: 0; }
.menu .btn { justify-content: flex-start; }

.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0; text-decoration: none; position: relative; }
.card.locked { background: #f0efec; }
.truck .row1, .head .row1 { display: flex; justify-content: space-between; gap: 8px; font-size: 18px; }
.vno { font-weight: 700; letter-spacing: .5px; }
.row2 { margin-top: 2px; }
.row3 { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
.stage { font-weight: 600; color: var(--blue); }
.locked .stage { color: var(--muted); }
.since, .wait { color: var(--amber); font-weight: 600; white-space: nowrap; }
.no { font-size: 13px; color: var(--muted); margin-top: 4px; }
.pending { margin-top: 6px; display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--warn-bg); font-weight: 600; font-size: 14px; }
.card.read { border: 2px dashed var(--amber); }
.card.read.ready { border-color: var(--green); }
.card .btns { display: flex; gap: 8px; margin-top: 8px; }
.money { color: var(--green); font-weight: 600; margin-top: 4px; }
.person.inactive { opacity: .6; }
.qitem.failed { border-color: var(--red); }
.big-num { display: flex; justify-content: space-around; text-align: center; }
.big-num b { display: block; font-size: 30px; } .big-num span { color: var(--muted); }

.warn { background: var(--warn-bg); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-weight: 600; }
.warn.bad { background: var(--bad-bg); color: var(--red); }
.note { background: #eef4fb; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.actions { margin: 12px 0; }

.form label, .filters label { display: block; margin: 10px 0; font-weight: 600; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 12px; font: inherit; font-size: 18px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--dark); }
small { display: block; font-weight: 400; color: var(--muted); margin-top: 3px; font-size: 14px; }
fieldset { border: 2px solid var(--line); border-radius: 10px; margin: 10px 0; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 8px 0; }
label.check input { width: 26px; height: 26px; margin: 0; }
.filters select { font-size: 15px; padding: 10px 6px; }
.datepick { display: block; font-weight: 600; }
.login { max-width: 420px; margin: 20px auto; }
.langs { display: flex; gap: 8px; justify-content: flex-end; }
.pin { font-size: 40px; font-weight: 700; letter-spacing: 8px; text-align: center; margin: 10px 0; }

.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: #e9e6df center / cover no-repeat; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 0; overflow: hidden; cursor: pointer; font: inherit; }
.thumb span { background: rgba(0,0,0,.6); color: #fff; font-size: 13px; padding: 3px; }
.thumb small { padding: 4px; }
.big-photo { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 12px; }
.big-photo img { max-width: 100%; max-height: 85vh; object-fit: contain; }
.big-photo .btn { color: #fff; border-color: #fff; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--line); }
.timeline li { padding: 6px 0 6px 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 12px; width: 13px; height: 13px; border-radius: 50%; background: var(--dark); }
.timeline li.pending::before { background: var(--amber); }
.timeline span { color: var(--muted); font-size: 15px; margin-right: 6px; }
ul.plain { padding-left: 20px; } ul.plain li { margin: 4px 0; }
.answer { font-size: 18px; white-space: pre-wrap; }

.dialog-wrap { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
.dialog { background: #fff; width: 100%; max-width: 640px; border-radius: 16px 16px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; }
.dialog-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.dialog-buttons .btn { width: 100%; min-height: 56px; font-size: 18px; }
.dialog-input.need { border-color: var(--red); }

.toast { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 40; background: var(--dark); color: #fff; padding: 14px 16px;
  border-radius: 12px; font-weight: 600; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; text-align: center; }
.toast.show { opacity: 1; transform: none; }
.toast.bad { background: var(--red); }
