@font-face { font-family: Roboto; src: url(assets/Roboto.ttf) format('truetype'); font-weight: 100 900; font-display: swap; }
:root { --navy:#0F1729; --red:#D92128; --blue:#21469D; --grey:#5F6670; --line:#d6dce4; --bg:#F3F5F8; --chip:#E8EDF3; --green:#1E7B45; --amber:#B86E00;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: #1d2330; font: 16px/1.4 Roboto, -apple-system, 'Segoe UI', Arial, sans-serif; -webkit-text-size-adjust: 100%; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 12px 8px; background: var(--navy); color: #fff; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; flex: 1; min-width: 0; }
.brand img { height: 26px; background: #fff; border-radius: 4px; padding: 2px 4px; }
.brand small { font-weight: 400; opacity: .7; font-size: 12px; }
.net { font-size: 12px; padding: 3px 8px; border-radius: 12px; white-space: nowrap; }
.net.on { background: rgba(255,255,255,.12); } .net.off { background: var(--red); }
.auth-user { font-size: 13px; white-space: nowrap; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
.topbtn { color: #fff !important; border-color: rgba(255,255,255,.4) !important; }
.stepnav { position: sticky; top: calc(46px + var(--safe-t)); z-index: 15; display: flex; gap: 4px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 6px 8px; scrollbar-width: none; overscroll-behavior: contain; }
.stepnav:empty { display: none; }
.stepnav a { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 18px; color: var(--navy); text-decoration: none; font-size: 14px; white-space: nowrap; }
.stepnav a i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; font-size: 12px; }
.stepnav a.on { background: var(--navy); color: #fff; } .stepnav a.on i { background: var(--red); color: #fff; }
.dot { min-width: 18px; height: 18px; border-radius: 9px; font-size: 11px; display: grid; place-items: center; color: #fff; padding: 0 4px; }
.dot.red { background: var(--red); } .dot.amber { background: var(--amber); }
main { max-width: 980px; margin: 0 auto; padding: 12px 12px calc(90px + var(--safe-b)); }
.card { background: #fff; border-radius: 12px; padding: 14px 14px 10px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(15,23,41,.08); }
.card h2 { margin: 0 0 10px; font-size: 18px; color: var(--red); }
.card h3 { font-size: 15px; margin: 12px 0 6px; } h3.red { color: var(--red); } h3.amber { color: var(--amber); }
.hero { padding: 8px 2px 14px; } .hero h1 { margin: 6px 0; color: var(--navy); font-size: 26px; } .hero p { color: var(--grey); margin: 0 0 14px; }
.muted { color: var(--grey); } .small { font-size: 13px; } .warn { color: var(--red); } .good { color: var(--green); font-weight: 600; }
.grid { display: grid; grid-template-columns: 1fr; gap: 10px 14px; }
@media (min-width: 700px) { .grid { grid-template-columns: 1fr 1fr; } .fld.wide { grid-column: 1 / -1; } }
.fld { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; font-size: 14px; font-weight: 600; color: var(--navy); }
.fld small { font-weight: 400; color: var(--grey); }
.req { color: var(--red); }
input, select, textarea { font: inherit; font-size: 16px; font-weight: 400; color: #1d2330; width: 100%; padding: 10px 11px; border: 1px solid #b9c2ce; border-radius: 8px; background: #fff; min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; flex: 0 0 22px; accent-color: var(--navy); margin: 0; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 8px 0; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; min-height: 44px; padding: 8px 14px; border: 1px solid #b9c2ce; background: #fff; border-radius: 8px; font: inherit; font-size: 15px; color: var(--navy); cursor: pointer; }
.seg button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn { font: inherit; font-size: 15px; min-height: 44px; padding: 9px 16px; border-radius: 8px; border: 1px solid #b9c2ce; background: #fff; color: var(--navy); cursor: pointer; }
.btn.small { min-height: 34px; padding: 5px 10px; font-size: 13px; } .btn.big { font-size: 17px; min-height: 52px; padding: 12px 20px; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn.ghost { background: transparent; } .btn:disabled { opacity: .45; cursor: not-allowed; }
.footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #fff; border-top: 1px solid var(--line); padding: 8px 12px calc(8px + var(--safe-b)); }
.footer:empty { display: none; } .sid { font-size: 12px; color: var(--grey); text-align: center; }
.srow { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.srow small { display: block; color: var(--grey); font-size: 13px; }
.pill { font-size: 12px; padding: 3px 9px; border-radius: 12px; white-space: nowrap; color: #fff; } .pill.grey { background: var(--grey); } .pill.amber { background: var(--amber); } .pill.green { background: var(--green); }
.linked { background: var(--chip); border-left: 4px solid var(--blue); padding: 10px 12px; border-radius: 6px; font-size: 15px; margin: 6px 0; }
.results { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.res { text-align: left; font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; } .res small { display: block; color: var(--grey); font-weight: 400; }
.subcard { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.common { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .common > span { width: 100%; font-weight: 600; font-size: 14px; color: var(--navy); }
.chip { font: inherit; font-size: 14px; padding: 8px 12px; min-height: 40px; border-radius: 20px; border: 1px solid #b9c2ce; background: #fff; color: var(--navy); cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.esmcard { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.esmhead { display: flex; justify-content: space-between; gap: 8px; } .esmhead small { display: block; color: var(--grey); font-size: 12px; }
.locrow { display: flex; gap: 6px; margin-bottom: 6px; }
details.more summary, details.cat summary { cursor: pointer; padding: 8px 0; font-weight: 600; color: var(--blue); font-size: 14px; }
details.cat { border-top: 1px solid var(--line); } details.cat summary small { color: var(--grey); font-weight: 400; }
.esmrow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; font-size: 15px; border-radius: 6px; cursor: pointer; } .esmrow:hover { background: var(--bg); }
#esmSearch { margin-bottom: 8px; }
.photos { margin: 8px 0; } .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.thumb { padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--chip); cursor: pointer; } .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.addphoto { aspect-ratio: 1; border: 2px dashed #9aa6b5; border-radius: 8px; display: grid; place-items: center; text-align: center; font-size: 13px; color: var(--blue); font-weight: 600; cursor: pointer; padding: 4px; }
.addphoto input { display: none; } .pcount { color: var(--grey); font-size: 12px; }
.issues { list-style: none; padding: 0; margin: 0; } .issues li { padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; font-size: 14px; }
.issues li.err { background: #FDECEA; } .issues li.wrn { background: #FFF4E0; } .issues li.ok { background: #E7F4EC; }
.issues li a { color: inherit; font-weight: 600; } .issues li input { margin-top: 6px; min-height: 38px; font-size: 15px; }
.declare { border-top: 1px solid var(--line); margin-top: 10px; } .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .actions .primary { flex: 1 1 260px; }
.status.synced { border-left: 5px solid var(--green); } .status.queued, .status.confirmed { border-left: 5px solid var(--amber); }
.locked .addphoto { display: none; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + var(--safe-b)); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; font-size: 14px; max-width: 90vw; }
.viewer { position: fixed; inset: 0; background: rgba(15,23,41,.85); z-index: 60; display: grid; place-items: center; padding: 12px; }
.vbox { background: #fff; border-radius: 12px; max-width: 900px; width: 100%; overflow: hidden; } .vbox img { width: 100%; max-height: 70vh; object-fit: contain; background: #000; display: block; }
.vbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; } .vbar input { flex: 1 1 200px; }
[hidden] { display: none !important; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) {
  .brand span { font-size: 15px; } .brand small { display: none; }
  .net { font-size: 0; width: 12px; height: 12px; padding: 0; border-radius: 50%; background: #3fbf6f; } .net.off { background: var(--red); }
  .auth-user { max-width: 26vw; font-size: 12px; }
}
@media (max-width: 420px) { .brand span { display: none; } }

.scalebox { background: #eef2f8; border: 1px solid #c5d0e0; border-left: 5px solid var(--navy); border-radius: 10px; padding: 12px 12px 8px; margin: 0 0 16px; }
.scalebox h3 { margin: 0 0 4px; font-size: 16px; color: var(--navy); }
.scalebox .fld span { font-size: 15px; }
@media (min-width: 700px) { .scalegrid { grid-template-columns: 1fr 1fr 1fr; } }
.quicklist { display: flex; flex-direction: column; gap: 0; margin: 8px 0 4px; }
.quicklist h3 { margin: 0 0 8px; font-size: 16px; color: var(--navy); }
.tick { display: flex; gap: 12px; align-items: flex-start; padding: 10px 8px; border-top: 1px solid var(--line); font-size: 15px; cursor: pointer; min-height: 44px; }
.tick:first-of-type { border-top: 0; }
.tick:hover { background: var(--bg); }
.tick.on { background: #eef2f8; }
.tick span { display: flex; flex-direction: column; gap: 1px; font-weight: 600; color: var(--navy); }
.tick small { font-weight: 400; color: var(--grey); font-size: 12px; }

.done { text-align: center; padding: 32px 18px 24px; }
.done h1 { color: var(--navy); font-size: 28px; margin: 8px 0 10px; }
.done .sidbig { font-size: 22px; font-weight: 700; color: var(--blue); margin: 0 0 14px; letter-spacing: .02em; }
.done .tickmark { font-size: 52px; line-height: 1; color: var(--green); }
.done.wait .tickmark { color: var(--amber); }
.done.bad .tickmark { color: var(--red); }
.done .actions { justify-content: center; margin-top: 18px; }
.done #btnHome { min-width: 160px; }
