/* Perfect Start Field - made for 10" rugged tablets: big targets, strong contrast, works with gloves. */
:root {
  --bg: #f2f0f4;
  --surface: #ffffff;
  --surface-2: #f8f6f9;
  --border: #dcd6e0;
  --border-strong: #bfb7c7;
  --text: #17141b;
  --text-2: #3d3745;
  --muted: #676070;
  --primary: #7a1f78;
  --primary-hover: #63185f;
  --primary-soft: #f5e8f4;
  --primary-ring: rgba(122, 31, 120, 0.3);
  --green: #16663d; --green-soft: #dff1e6;
  --amber: #875400; --amber-soft: #fff0cc;
  --red: #b3261e; --red-soft: #fdeae8;
  --blue: #1d5aa0; --blue-soft: #e5eefa;
  --gray-soft: #ebe8ee;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(25, 10, 35, 0.07), 0 2px 6px rgba(25, 10, 35, 0.05);
  --shadow-lg: 0 20px 60px rgba(25, 10, 35, 0.28);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "SamsungOne", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { font: 17px/1.45 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; overscroll-behavior-y: contain; }
body.noscroll { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
button { font: inherit; color: inherit; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.lead { font-size: 18px; color: var(--text-2); }
.hidden { display: none !important; }
.pad { padding: 16px; }
.pad-y { padding: 12px 0; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.hint { font-weight: 400; color: var(--muted); font-size: 14.5px; }

/* ------------------------------------------------------------ top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left)); background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(40, 0, 40, 0.25); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 19px; white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 9px; background: #fff; }
.brand b { font-weight: 750; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.who { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.12); border: 0; color: #fff; border-radius: 12px; padding: 6px 12px; min-height: 48px; cursor: pointer; max-width: 260px; }
.who span { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { opacity: 0.8; font-size: 13px; white-space: nowrap; }
.pill { display: flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; min-height: 44px; padding: 0 16px; font-weight: 700; font-size: 15.5px; cursor: pointer; white-space: nowrap; max-width: 44vw; overflow: hidden; }
.pill span { overflow: hidden; text-overflow: ellipsis; }
.pill.green { background: #dff5e8; color: #0f5230; }
.pill.blue { background: #e1ecfb; color: #174a86; }
.pill.amber { background: #ffecbd; color: #6b4200; }
.pill.red { background: #ffe1de; color: #8c1d16; }
.pill.gray { background: #ecebee; color: #4a4552; }
.pill.spin .ic { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; min-width: 52px; min-height: 52px; border-radius: 14px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:active { background: var(--gray-soft); }
.icon-btn.light { color: #fff; }
.icon-btn.light:active { background: rgba(255, 255, 255, 0.16); }
.update-bar { position: sticky; top: 64px; z-index: 19; display: flex; align-items: center; gap: 12px; background: #fff7db; color: #5e3d00; padding: 10px 16px; border-bottom: 1px solid #f1d9a0; font-weight: 600; }
.update-bar .btn { margin-left: auto; }

/* ------------------------------------------------------------ page */
.page { max-width: 1000px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) 120px max(16px, env(safe-area-inset-left)); }
.page-h { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; }
.page-h .ph-t { flex: 1; min-width: 0; }
.page-h h1 { font-size: 25px; line-height: 1.2; overflow-wrap: anywhere; }
.page-h .ph-s { color: var(--muted); font-size: 15px; margin-top: 2px; }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 52px; padding: 0 12px 0 4px; border-radius: 12px; color: var(--primary); font-weight: 650; }
.back:active { background: var(--primary-soft); }
.sec { margin-top: 22px; }
.sec + .btn.block { margin-top: 22px; }
.sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sec-h h2 { font-size: 20px; }
.sec-h .btn { margin-left: auto; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 650; font-size: 17px; cursor: pointer; text-align: center; user-select: none; }
.btn:active { background: var(--surface-2); transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, .pick:focus-visible, input:focus-visible, textarea:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:active { background: var(--primary-hover); }
.btn.danger { color: var(--red); border-color: #e7b3ae; }
.btn.danger:active { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:active { background: var(--gray-soft); }
.btn.sm { min-height: 44px; padding: 0 13px; font-size: 15.5px; }
.btn.big { min-height: 60px; font-size: 18px; }
.btn.huge { min-height: 72px; font-size: 21px; border-radius: 18px; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn + .btn.block, .btn.block + .btn.block { margin-top: 10px; }

/* ------------------------------------------------------------ cards, lists */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; }
.card-h h2 { font-size: 19px; }
.card-h .muted { margin-left: auto; font-size: 15px; }
.card-b { padding: 14px 18px 18px; }
.empty-card { background: var(--surface); border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 20px; color: var(--muted); font-size: 16.5px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.job-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; color: var(--text); box-shadow: var(--shadow); min-height: 96px; }
.job-card:active, .scope-row:active, .sent-row:active, .finding:active { background: var(--surface-2); }
.jc-thumb { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; flex: none; background: var(--gray-soft); display: grid; place-items: center; color: var(--muted); }
.jc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.jc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jc-t { font-weight: 750; font-size: 19px; overflow-wrap: anywhere; }
.jc-s { color: var(--text-2); }
.jc-m { color: var(--muted); font-size: 14.5px; }
.jc-go { color: var(--muted); }
.chip-s { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 3px 10px; margin-top: 4px; }
.chip-s.blue { background: var(--blue-soft); color: var(--blue); }
.scope-row, .sent-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; color: var(--text); min-height: 72px; box-shadow: var(--shadow); }
.sr-ic { color: var(--primary); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--primary-soft); flex: none; }
.sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-t { font-weight: 700; overflow-wrap: anywhere; }
.sr-s { color: var(--muted); font-size: 14.5px; }
.ok-dot { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft); color: var(--green); flex: none; }
.badge { font-size: 13.5px; font-weight: 800; border-radius: 999px; padding: 3px 10px; letter-spacing: 0.02em; }
.badge.new { background: var(--primary); color: #fff; }

.banner { display: flex; align-items: flex-start; gap: 12px; border-radius: var(--radius); padding: 14px 16px; margin-top: 12px; border: 1px solid transparent; }
.banner > div { flex: 1; }
.banner .btn { flex: none; align-self: center; }
.banner.ok { background: var(--green-soft); color: #0f4a2b; border-color: #bfe2cd; }
.banner.blue { background: var(--blue-soft); color: #173f6d; border-color: #c7daf2; }
.banner.amber { background: var(--amber-soft); color: #5e3d00; border-color: #f1d9a0; }
.banner.red { background: var(--red-soft); color: #7a1a14; border-color: #f3c3bf; }
.banner.scope { background: var(--primary-soft); color: #4b1249; border-color: #e7c9e5; align-items: center; }

/* ------------------------------------------------------------ forms */
.form > * + * { margin-top: 16px; }
.f { display: flex; flex-direction: column; gap: 7px; font-weight: 650; color: var(--text-2); font-size: 16px; }
input, textarea { font: 18px var(--font); color: var(--text); background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px; min-height: 56px; width: 100%; }
textarea { resize: vertical; line-height: 1.4; min-height: 96px; }
input[readonly], textarea[readonly] { background: var(--surface-2); color: var(--text-2); }
input::placeholder, textarea::placeholder { color: #9a93a3; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; min-height: 60px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong); background: var(--surface); cursor: pointer; }
.pick:active { background: var(--surface-2); }
.pick .pk-t { font-size: 19px; font-weight: 750; color: var(--text); }
.pick .pk-s { font-size: 15px; color: var(--muted); font-weight: 500; }
.pick .pk-s.warn { color: var(--amber); font-weight: 650; }
.pick.empty { border-style: dashed; border-color: var(--primary); }
.pick.empty .pk-t { color: var(--primary); }
.pick[disabled] { background: var(--surface-2); cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 52px; padding: 8px 16px; border-radius: 13px; border: 1.5px solid var(--border-strong); background: var(--surface); font-weight: 650; font-size: 16.5px; cursor: pointer; text-align: left; line-height: 1.25; }
.chip:active { background: var(--surface-2); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.sm { min-height: 46px; font-size: 15.5px; padding: 6px 13px; }
.chip.dashed { border-style: dashed; color: var(--primary); }
.chip[disabled] { opacity: 0.6; cursor: default; }
.chip.on[disabled] { opacity: 1; }
.chips.sugg { margin-top: 10px; }
.chips.units .chip { min-width: 64px; justify-content: center; }
.gps { color: var(--green); font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.switch { display: flex; gap: 14px; align-items: flex-start; font-weight: 650; cursor: pointer; }
.switch input { width: 28px; height: 28px; min-height: 0; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.switch small { display: block; font-weight: 400; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.kv { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kv > span { color: var(--muted); min-width: 170px; }
.kv .btn { margin-left: auto; }

/* quantity */
.qty-row { display: flex; align-items: center; gap: 10px; }
.qty-row input { max-width: 160px; text-align: center; font-size: 26px; font-weight: 750; min-height: 68px; }
.qbtn { width: 68px; height: 68px; border-radius: 16px; border: 1.5px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--primary); }
.qbtn:active { background: var(--primary-soft); }
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 9px; }
.step { min-height: 60px; border-radius: 13px; border: 1.5px solid var(--border-strong); background: var(--surface); font-size: 21px; font-weight: 750; cursor: pointer; }
.step.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-count { font-size: 17px; }

/* ------------------------------------------------------------ findings */
.findings { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.finding { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; color: var(--text); background: var(--surface-2); min-height: 76px; }
.fn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; flex: none; }
.fm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ft { font-weight: 750; font-size: 18px; overflow-wrap: anywhere; }
.fs { color: var(--text-2); overflow-wrap: anywhere; }
.fx { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fthumbs { display: flex; gap: 6px; margin-top: 4px; align-items: center; }
.fthumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.fthumbs .more { font-weight: 700; color: var(--muted); padding-left: 4px; }
.totals { border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; background: #fcfbfd; }
.totals .tt { font-weight: 750; margin-bottom: 4px; }
.totals .tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 5px 0; border-top: 1px solid var(--border); }
.totals .tr:first-of-type { border-top: 0; }

/* ------------------------------------------------------------ photos */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 0; padding: 0; background: var(--gray-soft); cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .up { position: absolute; right: 6px; bottom: 6px; background: rgba(255, 255, 255, 0.92); color: var(--green); border-radius: 8px; display: grid; place-items: center; width: 28px; height: 28px; }
.thumb .cap-dot { position: absolute; left: 8px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid #fff; }
.photo-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.photo-btns .btn { flex: 1 1 180px; }
.viewer { position: fixed; inset: 0; z-index: 60; background: #0d0b10; display: flex; flex-direction: column; }
.v-top { display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: #fff; }
.v-name { opacity: 0.7; font-size: 15px; }
.v-img { flex: 1; min-height: 0; display: grid; place-items: center; }
.v-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.v-bar { display: flex; gap: 10px; padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)); background: #1b1820; flex-wrap: wrap; }
.v-cap { flex: 1 1 300px; }
.v-cap-ro { flex: 1; color: #fff; align-self: center; }

/* ------------------------------------------------------------ camera */
.cam { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam.snap .cam-flash { animation: camflash 0.28s ease-out; }
@keyframes camflash { 0% { opacity: 0.85; } 100% { opacity: 0; } }
.cam-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: linear-gradient(rgba(0, 0, 0, 0.6), transparent); }
.cam-label { flex: 1; font-weight: 700; font-size: 18px; text-shadow: 0 1px 3px #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-x { width: 60px; height: 60px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.45); color: #fff; display: grid; place-items: center; }
.cam-msg { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(560px, 90vw); background: rgba(20, 16, 24, 0.92); border-radius: 16px; padding: 20px; font-size: 18px; line-height: 1.5; }
.cam-bar { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px 24px max(22px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); }
.cam-done { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 60px; padding: 0 20px; border-radius: 16px; border: 0; background: rgba(255, 255, 255, 0.92); color: #000; font-weight: 750; font-size: 18px; }
.cam-n { background: var(--primary); color: #fff; border-radius: 999px; min-width: 30px; padding: 2px 8px; font-size: 15px; }
.cam-shutter { width: 96px; height: 96px; border-radius: 50%; border: 6px solid #fff; background: transparent; display: grid; place-items: center; padding: 0; }
.cam-shutter span { width: 72px; height: 72px; border-radius: 50%; background: #fff; transition: transform 0.08s; }
.cam-shutter:active span { transform: scale(0.88); }
.cam-shutter[disabled] { opacity: 0.45; }
.cam-torch { justify-self: end; width: 68px; height: 68px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.5); color: #fff; display: grid; place-items: center; }
.cam-torch.on { background: #ffd54a; color: #000; }
.cam-strip { position: absolute; left: 16px; bottom: 150px; display: flex; flex-direction: column-reverse; gap: 8px; }
.cam-strip img { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.cam-zoom { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; background: rgba(0, 0, 0, 0.45); border-radius: 16px; padding: 12px 8px; font-weight: 700; }
.cam-zoom input { writing-mode: vertical-lr; direction: rtl; width: 40px; height: 240px; min-height: 0; padding: 0; accent-color: #fff; }

/* ------------------------------------------------------------ sheets */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(20, 10, 26, 0); display: flex; align-items: flex-end; justify-content: center; transition: background 0.18s; }
.sheet-wrap.in { background: rgba(20, 10, 26, 0.45); }
.sheet-wrap.out { background: rgba(20, 10, 26, 0); }
.sheet { background: var(--surface); width: min(760px, 100%); max-height: 88vh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transform: translateY(40px); opacity: 0; transition: transform 0.18s, opacity 0.18s; padding-bottom: env(safe-area-inset-bottom); }
.sheet-wrap.in .sheet { transform: none; opacity: 1; }
.sheet-wrap.out .sheet { transform: translateY(40px); opacity: 0; }
.sheet.full { height: 88vh; }
@media (min-width: 700px) and (min-height: 700px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { border-radius: 22px; max-height: 84vh; }
  .sheet.full { height: 84vh; }
}
.sheet-h { display: flex; align-items: center; gap: 8px; padding: 14px 12px 6px 22px; }
.sheet-h h2 { flex: 1; font-size: 22px; }
.sheet-b { padding: 6px 22px 18px; overflow: auto; flex: 1; }
.sheet-f { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.sheet-f .btn { flex: 1 1 140px; }
.search-box { position: sticky; top: 0; background: var(--surface); padding-bottom: 10px; z-index: 1; }
.search-box .ic { position: absolute; left: 16px; top: 17px; color: var(--muted); }
.search-box input { padding-left: 50px; }
.choose-list { display: flex; flex-direction: column; }
.choose-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-height: 64px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: transparent; cursor: pointer; }
.choose-row:active, .choose-row.on { background: var(--primary-soft); }
.choose-row .t { font-weight: 700; font-size: 18px; }
.choose-row .s { color: var(--muted); font-size: 15px; }
.choose-row.extra { flex-direction: row; align-items: center; gap: 10px; color: var(--primary); }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 16px; border-radius: 13px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 650; font-size: 17px; text-align: left; cursor: pointer; }
.menu-row.danger { color: var(--red); }

/* ------------------------------------------------------------ bottom action bar */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 12px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: rgba(242, 240, 244, 0.94); backdrop-filter: blur(6px); border-top: 1px solid var(--border); }
.actionbar > .btn { max-width: 968px; margin: 0 auto; }
.actionbar.two { display: flex; gap: 12px; justify-content: center; }
.actionbar.two .btn { flex: 1; max-width: 480px; }

/* ------------------------------------------------------------ scopes & documents */
.scope-actions { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.chips.files { margin: 10px 0; }
.doc { margin-top: 12px; }
.pdf { display: flex; flex-direction: column; gap: 12px; }
.pdf-page { background: #fff; border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; width: 100%; }
.pdf-page canvas { display: block; width: 100%; height: auto; }
.doc-img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); background: #fff; }
.doc-text { white-space: pre-wrap; background: #fff; padding: 18px; border-radius: 10px; box-shadow: var(--shadow); font: 16px/1.5 ui-monospace, Menlo, Consolas, monospace; }
.doc-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }

/* ------------------------------------------------------------ setup */
.setup-page { max-width: 720px; text-align: left; }
.setup-logo { display: block; width: 200px; margin: 18px auto 10px; }
.setup-page h1 { text-align: center; font-size: 30px; margin-bottom: 8px; }
.setup-page .lead { text-align: center; }
.steps-list { margin: 0 0 18px; padding-left: 26px; font-size: 18px; line-height: 1.5; }
.steps-list li + li { margin-top: 10px; }
.install-card { background: var(--primary-soft); border-color: #e7c9e5; }

/* ------------------------------------------------------------ toasts */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 110px; z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: center; width: min(640px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: flex-start; background: #231c2a; color: #fff; padding: 14px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 16.5px; transition: opacity 0.3s, transform 0.3s; }
.toast.error { background: #7a1a14; }
.toast.info { background: #1d3f68; }
.toast.out { opacity: 0; transform: translateY(8px); }

@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .who small { display: none; }
  .pill { max-width: 52vw; }
  .kv > span { min-width: 0; }
}
