:root {
  --ink: #1b2a26; --soft: #586863; --line: #d5dfda; --bg: #f5f8f6; --card: #ffffff;
  --brand: #0b6e4f; --on-brand: #ffffff; --ok: #0b6e4f; --bad: #b3261e; --wait: #7a5600;
}
/* Colours: "Automatic" follows the phone or computer; a person can also choose Light or Dark (side menu › Colours; theme.js sets data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --ink: #e6efeb; --soft: #a3b3ad; --line: #2e3d38; --bg: #121a17; --card: #1a2521; --brand: #0b6e4f; --ok: #5fd0a6; --bad: #ff8a80; --wait: #f0c35a; color-scheme: dark; }
}
:root[data-theme=dark] { --ink: #e6efeb; --soft: #a3b3ad; --line: #2e3d38; --bg: #121a17; --card: #1a2521; --brand: #0b6e4f; --ok: #5fd0a6; --bad: #ff8a80; --wait: #f0c35a; color-scheme: dark; }
:root[data-theme=light] { color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; color: var(--ink); background: var(--bg); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); background: var(--brand); color: var(--on-brand); }
.brand { font-weight: 700; font-size: 18px; }
.pill { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .2); white-space: nowrap; }
.pill.off { background: #fff; color: var(--bad); }
main { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; }
h1 { font-size: 22px; margin: 0 0 4px; }
.lead { margin: 0 0 16px; color: var(--soft); }
.checks { list-style: none; margin: 0 0 16px; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.checks li { display: flex; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.state { flex: 0 0 68px; font-size: 13px; font-weight: 700; padding-top: 2px; }
.state.ok { color: var(--ok); } .state.bad { color: var(--bad); } .state.wait { color: var(--wait); }
.what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.what small { display: block; color: var(--soft); }
button { font: inherit; font-weight: 600; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--brand); color: var(--on-brand); cursor: pointer; }
button:focus-visible { outline: 3px solid var(--wait); outline-offset: 2px; }
.foot { margin: 16px 0 0; font-size: 13px; color: var(--soft); }

/* ----- sign-in and home ----- */
.bar-right { display: flex; align-items: center; gap: 10px; }
button.link { min-height: 32px; padding: 4px 10px; background: transparent; border: 1px solid rgba(255, 255, 255, .6); font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0 0 16px; }
.card h2 { font-size: 18px; margin: 0 0 4px; }
.card .lead { margin-bottom: 12px; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
label small { display: block; font-weight: 400; color: var(--soft); }
input[type=text], input[type=email], input[type=password] { width: 100%; min-height: 44px; font: inherit; padding: 9px 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
input:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
button.plain { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
button[disabled] { opacity: .6; cursor: default; }
.msg { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); }
.msg.bad { border-color: var(--bad); color: var(--bad); }
.msg.ok { border-color: var(--ok); }
.people { list-style: none; margin: 12px 0 0; padding: 0; }
.people li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.people .who { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.people .who small { display: block; color: var(--soft); }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); margin-left: 6px; white-space: nowrap; }
.code { font: 700 24px/1.2 ui-monospace, Consolas, "Courier New", monospace; letter-spacing: 2px; margin: 6px 0; }
details { margin: 0 0 16px; }
summary { cursor: pointer; font-weight: 600; padding: 8px 0; }

/* ----- admin tools ----- */
input[type=number], input[type=date], input[type=search], select { width: 100%; min-height: 44px; font: inherit; padding: 9px 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); flex: 0 0 auto; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.tabs button { flex: 0 0 auto; min-height: 40px; padding: 8px 14px; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 99px; font-size: 15px; }
.tabs button[aria-selected=true] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
@media (min-width: 700px) { .tabs { flex-wrap: wrap; overflow-x: visible; } }   /* 0.16.2: ten tabs – none hidden off the edge on a laptop */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
.people li.off .who { opacity: .6; }
.chip.off { border-color: var(--bad); color: var(--bad); }
.chip.ok { border-color: var(--ok); color: var(--ok); }
.chip.bad { border-color: var(--bad); background: var(--bad); color: #fff; }   /* 0.20.5: a list file attached but lost */
#formList li small.bad { color: var(--bad); font-weight: 600; }   /* 0.20.5: why a form cannot be kept */
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.bulkbar label { margin: 0; font-weight: 400; display: flex; align-items: center; gap: 8px; }
.rows { list-style: none; margin: 12px 0 0; padding: 0; }
.rows li { padding: 9px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.rows li small { display: block; color: var(--soft); }
table.codes { width: 100%; border-collapse: collapse; margin: 8px 0; }
table.codes th, table.codes td { text-align: left; padding: 6px 8px 6px 0; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
table.codes td.c { font: 700 16px/1.3 ui-monospace, Consolas, "Courier New", monospace; white-space: nowrap; }
.checkline { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-weight: 400; }
dialog.box { width: min(92vw, 460px); border: 1px solid var(--line); border-radius: 12px; padding: 18px; color: var(--ink); background: var(--card); }
dialog.box::backdrop { background: rgba(0, 0, 0, .45); }
dialog.box h2 { font-size: 18px; margin: 0 0 8px; }
dialog.box p { margin: 0 0 8px; }
@media print {
  body * { visibility: hidden; }
  .printable, .printable * { visibility: visible; }
  .printable { position: absolute; left: 0; top: 0; width: 100%; border: 0; }
  .printable .actions { display: none; }
}
a.btnlink { display: inline-block; min-height: 36px; padding: 6px 12px; font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.card h2 + .lead { margin-top: 0; }
.card form + h2, .card div + h2 { margin-top: 20px; }

/* forms */
h3 { margin: 18px 0 6px; font-size: 17px; }
input[type=file] { width: 100%; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; }
.report { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.report p { margin: 0 0 6px; }
.tally { display: flex; flex-wrap: wrap; gap: 6px; }
details.lvl { margin-top: 8px; }
details.lvl summary { font-weight: 700; cursor: pointer; padding: 6px 0; }
details.lvl.fix summary { color: var(--bad); }
.rows.qs li { padding: 7px 0; }
.rows.qs li.grp { font-weight: 700; background: rgba(127, 127, 127, .08); padding-right: 8px; }
.rows.qs li.grp small { font-weight: 400; }
.rows.qs li span { display: block; }
.rows.qs li.in0.grp { padding-left: 8px; }
.rows.qs li.in1 { padding-left: 16px; } .rows.qs li.in2 { padding-left: 32px; } .rows.qs li.in3 { padding-left: 48px; } .rows.qs li.in4 { padding-left: 64px; }

/* filling a form */
.fillbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.savedmark { font-size: 13px; color: var(--soft); }
.savedmark.bad { color: var(--bad); font-weight: 700; }
.fillnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.fillnav select { flex: 1 1 160px; min-width: 0; }
.qpage { margin: 14px 0 4px; padding-bottom: 6px; border-bottom: 2px solid var(--brand); }
.qgroup { margin: 18px 0 0; font-size: 16px; }
.q { margin: 16px 0 0; }
.q.bad { border-left: 3px solid var(--bad); padding-left: 10px; }
.qhead { display: block; font-weight: 600; margin: 0 0 4px; }
.qstar { color: var(--bad); font-weight: 700; }
.qhint { display: block; color: var(--soft); margin: 0 0 6px; }
.q.note { padding: 10px 12px; border-radius: 8px; background: rgba(127, 127, 127, .08); }
.q.note .qlabel { font-weight: 400; }
.qlater { margin: 4px 0 0; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; color: var(--soft); font-size: 14px; }
.qerr { margin: 6px 0 0; color: var(--bad); font-weight: 600; font-size: 14px; }
.choices { display: grid; gap: 6px; }
.choice { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; }
.choice span { overflow-wrap: anywhere; }
.qother { margin-top: 8px; }
input.ro, textarea.ro { background: rgba(127, 127, 127, .12); color: var(--soft); }
.problems { margin: 8px 0 0; padding-left: 18px; }
.problems li { margin: 4px 0; }
#fill button.link { background: none; border: 0; padding: 0; min-height: 0; color: inherit; text-decoration: underline; font: inherit; font-weight: 600; cursor: pointer; }
#fill button.qclear { margin-top: 6px; font-size: 13px; font-weight: 400; color: var(--soft); }
.fillfoot { justify-content: space-between; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
[hidden] { display: none !important; }
#fill input[type=text], #fill input[type=time], #fill input[type=month], #fill input[type=datetime-local], #fill input[type=date], #fill textarea, #fill select { width: 100%; min-height: 44px; font: inherit; padding: 9px 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-sizing: border-box; }
#fill textarea { min-height: 88px; resize: vertical; }

/* repeats: rows as blocks, as a table (one line per row) or as a grid (one column per choice) */
.rep { margin: 16px 0 0; }
.repstatus { margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; background: rgba(122, 86, 0, .12); color: var(--wait); font-weight: 600; font-size: 14px; }
.reprow { margin: 12px 0 0; padding: 4px 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.rephead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; }
#fill button.repremove { font-size: 13px; font-weight: 400; color: var(--bad); }
.repadd { margin-top: 12px; }
.repscroll { position: relative; margin: 10px 0 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.reptable { border-collapse: collapse; width: 100%; font-size: 14px; }
.reptable th, .reptable td { padding: 6px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; vertical-align: top; }
.reptable tr:last-child > * { border-bottom: 0; }
.reptable tr > *:last-child { border-right: 0; }
.reptable thead th { background: rgba(127, 127, 127, .1); font-weight: 600; white-space: normal; min-width: 96px; }
.reptable .num { min-width: 0; width: 34px; text-align: center; color: var(--soft); }
.reptable td { min-width: 96px; }
.reptable th.gq { position: sticky; left: 0; z-index: 1; min-width: 130px; max-width: 200px; background: var(--card); font-weight: 600; }
.reptable thead th.gq { background: var(--card); }
.reptable .gband th.gq { background: var(--line); font-weight: 700; border-right: 0; }
.reptable .gband td { background: var(--line); }
.reptable th.gq { box-shadow: 1px 0 0 var(--line); }
.reptable .qhint { display: block; font-weight: 400; }
.q.cell { margin: 0; }
.q.cell.bad { border-left: 0; padding-left: 0; }
.q.cell.bad input, .q.cell.bad select, .q.cell.bad textarea { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.q.cell > .qhead, .q.cell > .qhint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.q.cell.note > .qlabel { font-weight: 400; }
.q.cell.note { padding: 0; background: none; }
.q.cell .qerr { margin-top: 4px; font-size: 12px; font-weight: 400; }
.q.cell .qlater { margin: 0; padding: 4px 6px; font-size: 12px; }
.q.cell .choice { padding: 4px 6px; border: 0; }
#fill .q.cell input[type=text], #fill .q.cell input[type=date], #fill .q.cell input[type=time], #fill .q.cell input[type=month], #fill .q.cell input[type=datetime-local], #fill .q.cell select, #fill .q.cell textarea { min-height: 38px; padding: 6px 8px; font-size: 15px; }

/* ----- layout: side menu beside the page (wide screens) or behind the ☰ button (phones) ----- */
:root { --nav: #16324f; --nav2: #1f4e79; --navtint: rgba(31, 78, 121, .12); --side: 280px; }
.bar { background: var(--nav); }
.bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
#menuBtn { min-height: 36px; padding: 2px 10px; font-size: 20px; line-height: 1; }
.pill { background: rgba(95, 208, 166, .25); }
main { max-width: 960px; }
main > form.card, main > .card.narrow, main > details.trouble { max-width: 560px; margin-left: auto; margin-right: auto; }
main > .foot { max-width: 560px; margin-left: auto; margin-right: auto; }
.pagetitle { font-size: 22px; margin: 0 0 14px; }
#side { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: var(--side); max-width: 86vw; overflow-y: auto; background: var(--card); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .18s ease; padding-bottom: 24px; }
body.menu-open #side { transform: none; box-shadow: 0 0 24px rgba(0, 0, 0, .3); }
#backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(0, 0, 0, .4); }
.sidehead { display: flex; flex-direction: column; gap: 2px; padding: 18px 16px 16px; padding-top: calc(18px + env(safe-area-inset-top)); background: var(--nav2); color: #fff; overflow-wrap: anywhere; }
.sidebrand { font-size: 18px; margin-bottom: 6px; }
.sidehead small { opacity: .85; }
.navhead { margin: 14px 0 0; padding: 8px 16px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); border-bottom: 1px solid var(--line); }
.navlist, .navforms { list-style: none; margin: 0; padding: 0; }
button.navitem { display: block; width: 100%; min-height: 44px; padding: 10px 16px; border-radius: 0; background: transparent; color: var(--ink); text-align: left; font-weight: 500; overflow-wrap: anywhere; }
button.navitem:hover { background: rgba(127, 127, 127, .1); }
button.navitem[aria-current=page] { background: var(--navtint); font-weight: 700; box-shadow: inset 4px 0 0 var(--nav2); }
.navfold { margin: 0; }
.navfold summary { padding: 10px 16px; font-weight: 700; }
.navforms button.navitem { padding-left: 30px; font-size: 15px; min-height: 40px; }
@media (min-width: 900px) {
  body.signed:not(.side-hidden) #side { transform: none; box-shadow: none; }
  body.signed:not(.side-hidden) #page { margin-left: var(--side); }
  body.signed:not(.side-hidden) .bar .brand { display: none; }
  body.signed #backdrop { display: none; }
}
@media (prefers-reduced-motion: reduce) { #side { transition: none; } }

/* home: tiles and form cards */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 16px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.tlabel { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); }
.tvalue { font-size: 24px; line-height: 1.3; }
.tile small { color: var(--soft); }
#tileNet .tvalue { color: var(--ok); } #tileNet.off .tvalue { color: var(--bad); }
.meter { height: 6px; margin: 4px 0; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--ok); width: 0; }
.meter .w1 { width: 10%; } .meter .w2 { width: 20%; } .meter .w3 { width: 30%; } .meter .w4 { width: 40%; } .meter .w5 { width: 50%; } .meter .w6 { width: 60%; } .meter .w7 { width: 70%; } .meter .w8 { width: 80%; background: var(--wait); } .meter .w9 { width: 90%; background: var(--bad); } .meter .w10 { width: 100%; background: var(--bad); }
.rows.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rows.cards li { padding: 14px 16px; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 10px; }
.rows.cards li strong { display: block; font-size: 17px; }
.rows.cards .actions { margin-top: 10px; }
#fill { max-width: 760px; margin-left: auto; margin-right: auto; }
#fill:has(.reptable) { max-width: none; }
.bar .brand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#signOut { white-space: nowrap; flex: 0 0 auto; }
.bar-right { flex: 0 0 auto; }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr 1fr; } .tiles .tile:first-child { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; } .tvalue { font-size: 20px; } .bar .brand { font-size: 16px; } }

/* list files: search box above a long menu */
#fill input.qfind { width: 100%; min-height: 38px; margin: 0 0 6px; padding: 6px 10px; font: inherit; font-size: 15px; color: var(--ink); background: var(--card); border: 1px dashed var(--line); border-radius: 8px; }
.qfound { display: block; margin: -2px 0 6px; color: var(--soft); font-size: 13px; }
.q.cell input.qfind { min-height: 32px; font-size: 13px; }

/* side menu: colours */
.sidetheme { margin: 18px 16px 0; }
.sidetheme label { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.sidetheme select { min-height: 40px; }

/* device tools: order, slider, location, photos and files, code scanner; looks of choice lists */
.ranklist { list-style: decimal; margin: 0; padding: 0 0 0 26px; }
.ranklist li { padding: 4px 0; }
.ranklist li span { display: inline-block; min-width: 45%; margin-right: 8px; overflow-wrap: anywhere; vertical-align: middle; }
.ranklist li button { min-height: 36px; padding: 4px 12px; margin-left: 4px; }
.rankkeep { margin-top: 6px; }
.range { display: flex; align-items: center; gap: 10px; }
.range input[type=range] { flex: 1 1 auto; min-width: 0; min-height: 44px; accent-color: var(--brand); }
.range input.unset { opacity: .45; }
.rangeend { color: var(--soft); font-size: 14px; }
.rangeval { flex: 0 0 auto; min-width: 44px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: center; font-weight: 700; }
.gps, .media { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.gpsval { margin: 0; font-weight: 600; }
.mediaprev { display: flex; flex-direction: column; gap: 4px; }
.photo { max-width: 100%; max-height: 260px; border: 1px solid var(--line); border-radius: 8px; }
#fill input[type=file] { max-width: 100%; font: inherit; font-size: 14px; color: var(--ink); }
.scan { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.scan input { flex: 1 1 180px; }
.scanvideo { display: block; width: 100%; max-height: 50vh; margin: 8px 0; border-radius: 8px; background: #000; }
.choices.likert { display: flex; flex-wrap: wrap; gap: 6px; }
.choices.likert .choice { flex: 1 1 0; min-width: 64px; flex-direction: column; align-items: center; text-align: center; margin: 0; }
.choices.cols2, .choices.cols3, .choices.cols4, .choices.colspack { display: grid; gap: 6px; }
.choices.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .choices.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .choices.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choices.colspack { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.choices.cols2 .choice, .choices.cols3 .choice, .choices.cols4 .choice, .choices.colspack .choice { margin: 0; }
.q.cell .photo { max-height: 80px; }

/* ---- section bar (as in the earlier app): stays at the top while the form scrolls ---- */
.secnav { position: sticky; top: 0; z-index: 15; background: var(--card); padding: 8px 0 8px; margin: 6px 0 6px; border-bottom: 1px solid var(--line); }
.secnav .sum { font-size: 13px; color: var(--soft); margin-bottom: 6px; }
.secnav .sum.pend { color: var(--bad); }
.secnav .secbar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.secnav .chip { flex: 0 0 auto; margin: 0; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 16px; padding: 7px 12px; min-height: 36px; font-size: 13px; font-weight: 400; cursor: pointer; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.secnav .chip.done { border-color: #9fd3b8; background: #e3f4ec; color: #1b2a26; }
.secnav .chip.bad { border-color: #efb1aa; background: #fbe9e7; color: #b3261e; }
.secnav .chip.pend { border-color: #e7a29a; background: #fff3f0; color: #b3261e; white-space: normal; line-height: 1.25; text-align: left; }
.secnav .chip.pend .pst { display: block; font-weight: 700; font-size: 12px; }
.secnav .chip.on { outline: 2px solid var(--brand); outline-offset: 1px; }
.qsec { scroll-margin-top: 110px; }
.qsec[hidden] { display: none; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin: 18px 0 0; }
.pager[hidden] { display: none; }
.pager .pg { font-size: 14px; color: var(--soft); }
.fillfoot { justify-content: flex-end; }

/* ---- GPS question (as in the earlier app) ---- */
.geo { width: 100%; }
.gpsbox { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 15px; line-height: 1.5; margin-bottom: 8px; background: var(--card); }
.gpsbox.seek { background: #eaf2fb; border-color: #9bbbe0; color: #1b2a26; }
.gpsbox.ok { background: #e3f4ec; border-color: #9fd3b8; color: #1b2a26; }
.gpsbox.warn { background: #fff6dd; border-color: #e6c66b; color: #1b2a26; }
.gpsbox.fail { background: #fbe9e7; border-color: #efb1aa; color: #1b2a26; }
.gpsbox .big { font-size: 22px; font-weight: 700; }
.gpsbox .note { font-size: 13px; color: #45534f; }
.gpsbox a { color: #0b5394; }
.gpsbox .gpsval { font-weight: 700; }
.meter { height: 8px; background: #d5dfda; border-radius: 4px; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--brand); }
.geomap { height: 240px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; overflow: hidden; background: #e8eef3; }
.geomap[hidden] { display: none; }
.mapoff { padding: 14px; font-size: 13px; color: #45534f; }
.geoplace { font-size: 14px; margin-bottom: 8px; }
.geoplace[hidden] { display: none; }
.geobtns { margin: 0; flex-wrap: wrap; }
.geobtns .pri { background: var(--brand); color: var(--on-brand); }
.geobtns .del { background: transparent; color: var(--bad); border: 1px solid var(--line); }
.geobtns button:not(.pri):not(.del) { background: transparent; color: var(--ink); border: 1px solid var(--line); }
/* 0.14.0: a box inside a card (add a Google helper, the APP_SECRET_KEY note); a long key that wraps */
.subcard { border: 1px solid var(--line, #d0d7de); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.code.small { font-size: 15px; letter-spacing: 0; overflow-wrap: anywhere; user-select: all; }
#helperList li, #devices li, #edDevices li { flex-wrap: wrap; }
.sidever { margin: 8px 16px 16px; font-size: 13px; color: var(--soft); }
/* 0.14.2: tabs inside Admin › Settings, a little smaller than the main tabs */
.subtabs { margin: 0 0 12px; }
.subtabs button { font-size: 14px; padding: 6px 12px; }
#routeList li.off .who strong { color: var(--soft); }
/* 0.15.0: designations shown under their organisation; the person's organisation line in People */
#olOrgs li.sub { padding-left: 24px; }
#people small.prof { display: block; }
textarea#bulkProfiles, textarea#acPeople { width: 100%; font: inherit; }
/* 0.15.1: admin lists as tables (Parth, 15 Nov 2026; the earlier app showed them as tables).
   Rows stay list items; on a wide screen the cells line up under a heading row; on a phone each row is a small card. */
.tbl { list-style: none; margin: 0; padding: 0; }
.tbl > li { border-top: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }
.tbl .cell small { display: block; color: var(--soft); }
.tbl .cell.acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tbl .cell .checkline { margin: 0; }
.tbl .rowout:empty { display: none; }
.thead { display: none; }
.people.tbl > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.tbl > li > .cell { flex: 1 1 100%; }
.tbl > li > .cell.pick, .tbl > li > .cell.acts { flex: 0 0 auto; }
.tbl > li > .cell[data-l]:not([data-l=""]):not([data-l="Name"]):not([data-l="Person"]):not([data-l="Account"]):not([data-l="What happened"])::before { content: attr(data-l) ": "; color: var(--soft); font-size: 13px; }
.tbl > li.off > .cell:not(.acts):not(.pick) { opacity: .65; }
@media (max-width: 699px) { .tbl > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; } .tbl .rowout { flex: 1 1 100%; } }
@media (min-width: 700px) {
  .thead { display: grid; gap: 4px 12px; padding: 6px 0; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--soft); border-bottom: 2px solid var(--line); }
  .thead.th-mydev { display: none; }
  .tbl:not(.tb-mydev) > li { display: grid; gap: 4px 12px; align-items: center; }
  .tbl:not(.tb-mydev) > li > .cell::before { content: none !important; }
  .tbl:not(.tb-mydev) > li:first-child { border-top: 0; }
  .tbl > li > .rowout { grid-column: 1 / -1; }
  .tb-mydev > li { display: flex; flex-wrap: wrap; gap: 4px 12px; }
  .th-people, .tb-people > li { grid-template-columns: 28px minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr) 80px 230px; }   /* 0.20.1: wider names, narrower organisation */
  .th-codes, .tb-codes > li { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr); }
  .th-devices, .tb-devices > li { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 100px; }
  .th-log, .tb-log > li { grid-template-columns: 150px minmax(0, 3.6fr) minmax(0, 1fr); }   /* 0.20.2 (S14): room for "What happened" */
  .th-forms, .tb-forms > li { grid-template-columns: minmax(0, 1fr) 120px max-content; }
  .th-lists, .tb-lists > li { grid-template-columns: 100px minmax(0, 2fr) 70px 190px; }
  .th-routes, .tb-routes > li { grid-template-columns: 28px minmax(0, 2.6fr) 80px 100px 250px 90px; }
  .tbl .cell.num { text-align: left; }
  .tb-log .cell.when { color: var(--soft); font-size: 14px; }
}
.eye { margin-top: 6px; }
/* 0.15.5: "Trouble signing in?" under the sign-in card */
details.trouble { margin-top: 0; }
details.trouble > summary { cursor: pointer; font-weight: 600; }
details.trouble p { margin: 10px 0; }
/* 0.16.0: refused entries and the read-only view of a sent entry */
.refusedbox { margin-bottom: 10px; }
.copytools { margin: 0 0 10px; padding: 8px 10px; border: 1px dashed var(--line, #ccc); border-radius: 8px; }
.copytools .note { margin: 0 0 6px; }
.copytools .msg { margin: 8px 0 0; }
#entryList .why { margin: 4px 0; color: var(--bad); font-size: 14px; }
dl.answers { margin: 8px 0; }
dl.answers dt { font-size: 13px; color: var(--soft); margin-top: 8px; }
dl.answers dd { margin: 2px 0 0; overflow-wrap: anywhere; }
@media (min-width: 700px) {
  .th-enforms, .tb-enforms > li { grid-template-columns: minmax(0, 2fr) 90px minmax(0, 1fr) 140px; }
  .th-rsforms, .tb-rsforms > li { grid-template-columns: minmax(0, 2fr) 90px; }
  .th-rsout, .tb-rsout > li { grid-template-columns: minmax(0, 1.4fr) 180px minmax(0, 2fr); }
  .th-entries, .tb-entries > li { grid-template-columns: 34px minmax(0, 1.6fr) minmax(0, 1.2fr) 110px minmax(0, 1fr) 130px 80px; }
  .th-deleted, .tb-deleted > li { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.4fr) 150px; }
}
dl.answers dd.empty { color: var(--soft); }
dl.answers dd.auto { color: var(--soft); font-style: italic; }
/* 0.17.0: a form's own My entries (earlier app: Form › My entries) */
.mehead .actions { margin: 0 0 12px; }
.mesearch input { width: 100%; }
.mechips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 4px; }
.mechip { min-height: 36px; padding: 4px 12px; font-size: 14px; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 99px; }
.mechip.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.mechips select { width: auto; min-height: 36px; margin-left: auto; }
.megroup .ghead { margin: 16px 0 0; font-size: 15px; color: var(--soft); }
.megroup .ghead small { font-weight: 400; }
.rec .rtitle { display: block; padding: 0; min-height: 0; background: none; border: 0; color: var(--ink); font-size: 16px; font-weight: 700; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.rec .pills { margin: 4px 0; }
.rec .pills .chip { margin: 0 6px 0 0; }
.rec .sum { color: var(--ink); }
.rec .why { margin: 4px 0; color: var(--bad); font-size: 14px; }
.chip.fix { border-color: var(--bad); color: var(--bad); }
.chip.wait, .chip.pend { border-color: var(--wait); color: var(--wait); }
.chip.draft { color: var(--soft); }
#meView h3.vsec { margin: 14px 0 4px; font-size: 15px; }
#meView details.vsec { margin-top: 12px; }
/* 0.17.1: date of entry and pages */
.medates { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 8px 0 0; font-size: 14px; }
.medates > span { font-weight: 600; color: var(--soft); }
.medates input[type=date] { width: auto; min-height: 36px; }
.mepager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 14px 0 0; font-size: 14px; color: var(--soft); }

/* 0.17.2: changing and deleting sent entries */
.undobar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; display: flex; gap: 12px; align-items: center; max-width: calc(100% - 32px);
  padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--bg, #fff); box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }
.undobar span { overflow-wrap: anywhere; }
.undobar button { flex: none; background: transparent; color: inherit; border: 1px solid currentColor; min-height: 36px; padding: 4px 14px; }
.selbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; }
.rec input.pick, .tbl input.pick { width: 22px; height: 22px; margin: 0 8px 0 0; vertical-align: middle; }
.rec.picked { outline: 2px solid var(--brand); outline-offset: -2px; }
.reasons { display: grid; gap: 4px; margin: 6px 0; }
.reasons input[type=text] { margin-top: 4px; width: 100%; }
.msg.editing { margin: 6px 0 10px; }
button.del, .meDel { color: var(--bad); }
button.small.del:not(.plain) { background: var(--bad); color: var(--card); border-color: var(--bad); }
.medl { margin: 0 0 10px; align-items: center; }
.dlbox { margin: 10px 0; }
/* 0.17.4: "New entry" | "My entries" tabs on a form (earlier app); To sync grouped by form */
.formtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.ftab { min-height: 44px; font-weight: 600; background: var(--card); color: var(--brand); border: 1px solid var(--line); border-radius: 8px; }
.ftab.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.formgroup + .formgroup { margin-top: 18px; }
.formgroup .ghead { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.formgroup .ghead h3 { margin: 0; font-size: 17px; }
.formgroup .ghead button { margin-left: auto; }
/* 0.17.5: Admin › Entries filters and pages */
.enfilters { margin: 10px 0; }
.enfilters .enrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 12px; margin: 8px 0; }
.enfilters .enrow label { margin: 0 0 4px; }
.enfilters .enrow select { width: 100%; }
details.oldrule { margin: 6px 0 10px; }
details.oldrule > summary { cursor: pointer; font-weight: 600; }
/* 0.17.6: "A new version of the app is available" (earlier app's update bar) */
.updbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; box-shadow: 0 -2px 10px rgba(0, 0, 0, .15); display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; padding: 10px 16px;
  background: #fff4d6; color: #3d2e00; border-top: 1px solid #e8c766; }
.updbar button { flex: none; }
body:has(#updBar) .undobar { bottom: 76px; }
body:has(#updBar) #view { padding-bottom: 80px; }
/* 0.18.0: My entries › Table and Map (earlier app §20) */
.meviews { display: flex; gap: 6px; margin: 4px 0 10px; }
.metable { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; max-width: 100%; }
.metable table { border-collapse: collapse; width: 100%; font-size: 14px; }
.metable th, .metable td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.metable td.num, .metable th.num { text-align: right; }
.metable thead th { position: sticky; top: 0; background: var(--card); }
.metable td.first, .metable thead th:first-child, .metable tfoot th { position: sticky; left: 0; background: var(--card); font-weight: 600; }
.metable tbody tr { cursor: pointer; }
.metable tbody tr:hover td, .metable tbody tr:focus td { background: var(--bg); }
.metable tfoot tr.total th, .metable tfoot tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.thsort { background: none; border: 0; padding: 0; min-height: 0; color: var(--ink); font-weight: 700; cursor: pointer; }
.memap { height: 440px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.memap.off { height: auto; padding: 10px; overflow: visible; }
.mechip.legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid #fff; }
.mechip.legend:not(.on) { opacity: .55; text-decoration: line-through; }
.pincard { min-width: 180px; }
.pincard .actions { margin-top: 6px; }
details.lsbox { margin: 12px 0; }
details.lsbox > summary { cursor: pointer; font-weight: 600; }
.tickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 12px; margin: 4px 0 10px; }
.mechip.legend.on { background: var(--card); color: var(--ink); border-color: var(--brand); border-width: 2px; }
/* 0.18.1: column widths by dragging (earlier app v9.22) */
th.cw { position: relative; }
.colgrip { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: col-resize; touch-action: none; z-index: 2; }
.colgrip:hover, .colgrip.on { background: var(--brand); opacity: .35; }
@media (pointer: coarse) { .colgrip { width: 18px; } }
.colreset { display: block; margin: 4px 0 0; font-size: 13px; }
/* 0.18.1: table filters, many rows, map tools */
.metable thead tr.filters th { top: 34px; padding: 4px 6px; }
.metable thead tr.filters input, .metable thead tr.filters select { min-height: 30px; padding: 2px 6px; font-size: 13px; width: 100%; min-width: 70px; }
.metable.tall { max-height: 70vh; overflow: auto; }
.metable table.fixedrows tbody tr:not(.spacer) td { height: 38px; padding-top: 0; padding-bottom: 0; }
.metable tr.spacer td { border: 0; }
.tablebar { align-items: center; margin: 0 0 6px; }
.maptools { margin: 0 0 6px; }
/* headings stay above the rows while scrolling (the first column stays above the others) */
.metable thead th { z-index: 3; }
.metable thead th:first-child { z-index: 4; }
.metable td.first, .metable tfoot th { z-index: 1; }
.metable tfoot td, .metable tfoot th { position: sticky; bottom: 0; background: var(--card); }
.metable tfoot th { left: 0; z-index: 2; }
.metable thead tr:first-child th { height: 38px; box-sizing: border-box; }
.metable thead tr.filters th { top: 37px; }
.tb-entries.nopick .pickcell { visibility: hidden; }
#edAccess { margin: 10px 0; }
/* 0.20.0: Dashboard (copied from the earlier app's) */
#dTop .enrow, #dashArea .enrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 12px; margin: 0 0 8px; }
#dTop .enrow label { margin: 0 0 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.kpi .k, .kpi .s { font-size: 12px; color: var(--soft); }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 2px; }
.kpi .v.warn, td.warnc { color: var(--wait); }
td.good { color: var(--ok); } td.badc { color: var(--bad); }
svg.bars { width: 100%; height: 170px; display: block; }
svg.bars .b { fill: var(--brand); }
svg.bars g:hover .b { opacity: .8; }
svg.bars .hit { fill: transparent; }
svg.bars .axis { stroke: var(--line); stroke-width: 1; }
svg.bars text { font-size: 10px; fill: var(--soft); }
svg.bars text.top { font-weight: 700; fill: var(--ink); }
.tscroll { overflow-x: auto; }
table.dtab { border-collapse: collapse; width: 100%; font-size: 14px; }
table.dtab th, table.dtab td { text-align: left; padding: 6px 10px 6px 0; border-top: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
table.dtab th { font-size: 12px; color: var(--soft); }
.dmap { height: 380px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); margin-top: 8px; }
.dlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.dlegend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dot.gps { background: #0b6e4f; } .dot.low { background: #d08a00; } .dot.manual { background: #b3261e; }
ul.silent { margin: 4px 0 0 18px; padding: 0; font-size: 14px; }
#tmTabs { margin-bottom: 12px; }

/* 0.20.1 (Parth, 16 Nov 2026: "The box to paste data is very small"): every paste / text box is as wide as its card and several lines tall */
textarea { display: block; width: 100%; min-height: 9em; font: inherit; font-size: 15px; line-height: 1.45; padding: 9px 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
textarea#supPaste, textarea#bulkProfiles, textarea#pickList, textarea#acPeople, textarea#manyPaste, textarea#idNames { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; tab-size: 18; }

/* 0.20.1 (Parth: "When I click it, it should come to the right, not below"): the side menu shows the 2 forms used last; "All forms"
   opens a panel to the right of the menu (on a phone the panel covers the menu, with "‹ Menu" to go back) */
.navrecent { margin: 2px 16px 0; font-size: 12px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .04em; }
.navlabel { padding: 10px 16px 2px; font-weight: 700; }
button.navall { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
button.navall[aria-expanded=true] { background: var(--navtint); }
#formsFly { position: fixed; z-index: 32; top: 0; bottom: 0; left: 0; width: var(--side); max-width: 86vw; overflow-y: auto; background: var(--card); border-right: 1px solid var(--line); box-shadow: 0 0 24px rgba(0, 0, 0, .3); padding-bottom: 24px; }
#formsFly .flyhead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); background: var(--nav2); color: #fff; }
#formsFly .flyhead strong { flex: 1; }
#formsFly .flyhead button { min-height: 36px; padding: 4px 12px; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
#formsFly .flysearch { padding: 10px 12px 4px; }
#formsFly ul { list-style: none; margin: 0; padding: 4px 0; }
#formsFly button.navitem { padding-left: 16px; }
#formsFly .flynone { padding: 10px 16px; color: var(--soft); }
@media (min-width: 900px) {
  #formsFly { left: var(--side); width: 340px; max-width: calc(100vw - var(--side)); box-shadow: 8px 0 24px rgba(0, 0, 0, .18); }
  #formsFly .backmenu { display: none; }
}

/* 0.20.1 (Parth: "a few more" colour themes): each theme sets the same colour names; "Bright sun" is for reading outdoors */
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 8px; }
.swatches button { min-height: 0; padding: 4px 0 2px; background: transparent; color: var(--ink); border: 2px solid transparent; border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 1.2; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.swatches button[aria-pressed=true] { border-color: var(--brand); }
.swatches i { display: block; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); }
.sw-auto i { background: linear-gradient(135deg, #f5f8f6 50%, #121a17 50%); }
.sw-light i { background: linear-gradient(135deg, #1f4e79 50%, #0b6e4f 50%); }
.sw-dark i { background: linear-gradient(135deg, #121a17 50%, #5fd0a6 50%); }
.sw-ocean i { background: linear-gradient(135deg, #0b3d62 50%, #0277bd 50%); }
.sw-sunrise i { background: linear-gradient(135deg, #7a2e0e 50%, #e8710a 50%); }
.sw-forest i { background: linear-gradient(135deg, #1e3a1a 50%, #4c7a2b 50%); }
.sw-lotus i { background: linear-gradient(135deg, #4a1f5c 50%, #b0417a 50%); }
.sw-sun i { background: linear-gradient(135deg, #000 50%, #ffd400 50%); }
:root[data-theme=ocean] { --brand: #0277bd; --ok: #0b6e4f; --bg: #f2f7fb; --line: #cfdde8; --nav: #0b3d62; --nav2: #0d5687; --navtint: rgba(2, 119, 189, .12); color-scheme: light; }
:root[data-theme=sunrise] { --brand: #c2410c; --bg: #fdf7f2; --line: #ecd9c8; --ink: #2b1d14; --soft: #6e5848; --nav: #7a2e0e; --nav2: #9a3b12; --navtint: rgba(194, 65, 12, .12); color-scheme: light; }
:root[data-theme=forest] { --brand: #3f6f22; --ok: #2f6a1a; --bg: #f4f7f0; --line: #d6e0cc; --ink: #1d2a16; --soft: #56644c; --nav: #1e3a1a; --nav2: #2d5226; --navtint: rgba(63, 111, 34, .14); color-scheme: light; }
:root[data-theme=lotus] { --brand: #a3336d; --bg: #fbf5f8; --line: #ead3df; --ink: #2a1622; --soft: #6c5361; --nav: #4a1f5c; --nav2: #63297a; --navtint: rgba(163, 51, 109, .12); color-scheme: light; }
:root[data-theme=sun] { --ink: #000; --soft: #1a1a1a; --line: #000; --bg: #fff; --card: #fff; --brand: #000; --on-brand: #ffd400; --ok: #005c2e; --bad: #a30000; --wait: #5c4300; --nav: #000; --nav2: #000; --navtint: #ffd400; color-scheme: light; }
:root[data-theme=sun] body { font-weight: 500; }
:root[data-theme=sun] .card, :root[data-theme=sun] input, :root[data-theme=sun] select, :root[data-theme=sun] textarea, :root[data-theme=sun] button.plain { border-width: 2px; }
:root[data-theme=sun] .sidehead, :root[data-theme=sun] .bar { color: #ffd400; }
.medlbox { margin: 4px 0 8px; }
.medlbox summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 6px 0; }

/* 0.20.2 (screen review S12): admin tabs in four labelled groups, wrapping – nothing hidden off the edge of a phone */
.tabs.admtabs { flex-wrap: wrap; overflow-x: visible; gap: 6px 14px; align-items: center; }
.admtabs .tabgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admtabs .tabgl { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); margin-right: 2px; }
@media (max-width: 699px) { .admtabs .tabgroup { width: 100%; } .admtabs .tabgl { width: 58px; } .admtabs button { min-height: 36px; padding: 6px 11px; font-size: 14px; } }
.tb-forms .acts { justify-content: flex-start; }
details.subfold { margin: 12px 0 0; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 8px; }

/* 0.20.2 (screen review S10): on a phone the three boxes are one compact strip, so the forms come into sight */
#tileWaiting #sendNow { margin-top: 8px; align-self: flex-start; }
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 12px; }
  .tiles .tile:first-child { grid-column: auto; flex-direction: column; align-items: stretch; gap: 0; }
  .tile { padding: 8px 10px; }
  .tile .tlabel { font-size: 10px; }
  .tiles .tvalue { font-size: 16px; }
  .tile small { font-size: 11px; line-height: 1.3; }
  .tile .meter { display: none; }
  #tileWaiting #sendNow { min-height: 34px; padding: 4px 8px; font-size: 13px; }
}
button.armed, button.plain.armed { border-color: var(--bad); color: var(--bad); }
/* 0.20.2 (earlier app: "the section bar slides away while you scroll down and comes back when you scroll up a little") */
.secnav { transition: transform .2s ease; }
body.hidenav .secnav { transform: translateY(calc(-100% - 12px)); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .secnav { transition: none; } }
/* 0.20.2 (S15): the tabs of a form are readable in Dark */
:root[data-theme=dark] .ftab:not(.on) { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .ftab:not(.on) { color: var(--ink); } }
@media (max-width: 699px) {
  .admtabs .tabgroup { position: relative; padding-left: 64px; }
  .admtabs .tabgl { position: absolute; left: 0; top: 11px; width: 58px; }
  textarea#supPaste, textarea#bulkProfiles, textarea#pickList, textarea#acPeople, textarea#manyPaste, textarea#idNames { tab-size: 4; }
}
.tb-forms > li > .acts { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.tb-forms .acts button { white-space: normal; text-align: left; }

/* 0.20.4 (Parth, 16 Nov 2026: "the status … or any other except 'sent' should be in red"): every status but Sent is red; the counts of
   entries not sent, needing fixing or with data pending are red too (the marks 📝 ⏳ ⚠ still tell them apart) */
.chip.draft, .chip.wait, .chip.fix, .chip.pend { border-color: var(--bad); color: var(--bad); }
.mechip.bad:not(.on) { border-color: var(--bad); color: var(--bad); }
.mechip.bad.on { background: var(--bad); border-color: var(--bad); color: #fff; }
#tileWaiting.has .tvalue { color: var(--bad); }

/* 0.20.4 (iPhone check): Safari on an iPhone zooms the page into any box whose letters are smaller than 16 px – keep them 16 px there.
   (-webkit-touch-callout exists only in Safari on iPhones and iPads.) */
@supports (-webkit-touch-callout: none) {
  input, select, textarea, #fill .q.cell input, #fill .q.cell select, #fill .q.cell textarea, .metable thead tr.filters input, .metable thead tr.filters select { font-size: 16px !important; }
}
.iosnote { border-color: var(--wait); }
.iosnote .actions { margin-top: 8px; }
