/* © 2026 Techverse Smart Solutions LLC. All rights reserved. TSS Site Survey — proprietary software of Techverse Smart Solutions LLC. */
:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #16213a;
  --muted: #6b7280;
  --line: #e3e7ee;
  --navy: #16234a;
  --navy-2: #2f3d8f;
  --accent: #5b5fe0;
  --accent-2: #3fc4c0;
  --ok: #1f9d55;
  --warn: #b8930f;
  --danger: #d64545;
  --info: #4b50c8;
  --chip: #eef1f6;
  --chip-active: #16234a;
  --icon: #16234a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1522; --card: #182033; --text: #eef2f8; --muted: #9aa5b8; --line: #27324a;
    --chip: #232d44; --chip-active: #3fc4c0; --icon: #a9b8ff; --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0f1522; --card: #182033; --text: #eef2f8; --muted: #9aa5b8; --line: #27324a;
    --chip: #232d44; --chip-active: #3fc4c0; --icon: #a9b8ff; --shadow: 0 1px 2px rgba(0,0,0,.4);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.4; }
body { min-height: 100vh; overscroll-behavior-y: none; }
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--info); }
[hidden] { display: none !important; }

/* App bar */
.appbar { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; padding: calc(var(--safe-top) + 8px) 12px 8px; display: flex; align-items: center; gap: 8px; min-height: 56px; }
.appbar .logo { width: 32px; height: 32px; flex-shrink: 0; background: #fff; border-radius: 9px; padding: 3px; box-sizing: border-box; }
.appbar .title { flex: 1; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .sub { display: block; font-weight: 400; font-size: 12px; opacity: .8; }
.appbar button { background: transparent; border: 0; color: #fff; font-size: 16px; padding: 8px 10px; border-radius: 10px; min-width: 44px; min-height: 44px; }
.appbar button:active { background: rgba(255,255,255,.15); }
.offline-pill { font-size: 11px; background: rgba(255,255,255,.15); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.offline-pill.off { background: var(--accent); }
.appbar { border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, var(--accent-2), var(--accent)) 1; }
.brand-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 0 0; }

main#view { padding: 14px 14px calc(96px + var(--safe-bottom)); max-width: 760px; margin: 0 auto; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.card h2 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row .grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }

/* Buttons */
.btn, .btn-primary, .btn-ghost, .btn-danger, .btn-accent { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 12px 16px; min-height: 48px; border: 1px solid var(--line); background: var(--card); font-weight: 600; text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-accent { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--info); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-block { width: 100%; }
.btn:active, .btn-primary:active, .btn-accent:active { filter: brightness(.92); }
.btn[disabled], .btn-primary[disabled], .btn-accent[disabled] { opacity: .5; pointer-events: none; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }

.fab-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 14px calc(10px + var(--safe-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 15; }
.fab-bar .inner { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; }
.fab-bar .btn-primary, .fab-bar .btn-accent { flex: 1; box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* Lists */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; min-height: 64px; border: 0; width: 100%; text-align: left; color: var(--text); }
.list-item .icon { font-size: 24px; width: 34px; text-align: center; flex-shrink: 0; color: var(--icon); display: inline-flex; align-items: center; justify-content: center; }
.empty .big .ico { color: var(--muted); }
.list-item .body { flex: 1; min-width: 0; }
.list-item .body b { display: block; font-size: 15px; }
.list-item .body span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .chev { color: var(--muted); font-size: 20px; }

.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; letter-spacing: .02em; }
.pill.done { background: #dcf5e6; color: #14703a; }
.pill.progress { background: #fff1d6; color: #8a5a00; }
.pill.skipped { background: #ececec; color: #555; }
.pill.na { background: #e8eefc; color: #2c4a9a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill.done { background: #1d3b2a; color: #7fdba0; }
  :root:not([data-theme="light"]) .pill.progress { background: #3f3115; color: #f5c56b; }
  :root:not([data-theme="light"]) .pill.skipped { background: #2a3040; color: #b5bdcc; }
  :root:not([data-theme="light"]) .pill.na { background: #1f2a4a; color: #9db4f5; }
}
:root[data-theme="dark"] .pill.done { background: #1d3b2a; color: #7fdba0; }
:root[data-theme="dark"] .pill.progress { background: #3f3115; color: #f5c56b; }
:root[data-theme="dark"] .pill.skipped { background: #2a3040; color: #b5bdcc; }
:root[data-theme="dark"] .pill.na { background: #1f2a4a; color: #9db4f5; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.field .hint { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.field input[type=text], .field input[type=number], .field input[type=date], .field input[type=email], .field input[type=tel], .field select, .field textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); min-height: 46px; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.req::after { content: ' *'; color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.chip { border: 1px solid var(--line); background: var(--chip); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; min-height: 36px; color: var(--text); }
.chip.active { background: var(--chip-active); color: #fff; border-color: var(--chip-active); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.active { color: #111; } }
:root[data-theme="dark"] .chip.active { color: #111; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: var(--card); padding: 12px; font-weight: 600; min-height: 46px; }
.seg button.active { background: var(--navy); color: #fff; }
.state-note { font-size: 13px; color: var(--warn); font-weight: 600; margin-top: 4px; }

.callout { border-left: 4px solid var(--accent-2); background: rgba(63,196,192,.10); padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }
.callout.safety { border-color: var(--danger); background: rgba(214,69,69,.08); }
.callout.ok { border-color: var(--ok); background: rgba(31,157,85,.08); }

/* Photo slots */
.slot { border-top: 1px solid var(--line); padding: 10px 0; }
.slot:first-of-type { border-top: 0; }
.slot .slot-head { display: flex; align-items: center; gap: 8px; }
.slot .slot-head b { flex: 1; font-size: 14px; }
.slot .count { font-size: 12px; color: var(--muted); }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 20px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn.cam { background: var(--accent); border-color: var(--accent); color: #fff; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 2px; -webkit-overflow-scrolling: touch; }
.thumb { position: relative; flex: 0 0 auto; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; background: var(--chip); border: 0; padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .tag { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 6px; }
.thumb .anno { position: absolute; right: 4px; top: 4px; background: var(--accent); color: #fff; font-size: 10px; padding: 2px 5px; border-radius: 6px; }

/* Photo grid on detail */
.photo-big { width: 100%; border-radius: 12px; background: #000; display: block; max-height: 60vh; object-fit: contain; }

/* Modal sheet */
.sheet-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.5); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 760px; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + var(--safe-bottom)); max-height: 92vh; overflow: auto; }
.sheet h3 { margin: 0 0 10px; font-size: 17px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 12px; }
.sheet .actions > * { flex: 1; }
.preview-img { width: 100%; max-height: 50vh; object-fit: contain; background: #000; border-radius: 12px; }

/* Full-screen overlays (annotation, pdf viewer) */
.anno-root, .pdf-root { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #0b0f18; color: #fff; z-index: 60; display: flex; flex-direction: column; }
.anno-top, .pdf-top { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-top) + 6px) 8px 6px; background: #121a2b; }
.anno-title, .pdf-title { flex: 1; text-align: center; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anno-top .btn-ghost, .pdf-top .btn-ghost { color: #fff; }
.anno-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.anno-canvas { max-width: 100%; max-height: 100%; touch-action: none; }
.anno-hint { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); padding: 6px 12px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.anno-textbox { position: absolute; bottom: 12px; left: 12px; right: 12px; display: flex; gap: 8px; }
.anno-textbox input { flex: 1; padding: 12px; border-radius: 10px; border: 0; }
.anno-tools { display: flex; overflow-x: auto; gap: 4px; padding: 6px 8px; background: #121a2b; }
.anno-tool { flex: 1 0 64px; background: transparent; border: 1px solid transparent; color: #fff; border-radius: 10px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; min-height: 54px; }
.anno-tool span { font-size: 20px; line-height: 1; }
.anno-tool small { font-size: 11px; margin-top: 4px; }
.anno-tool.active { background: var(--accent); }
.anno-bottom { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px calc(8px + var(--safe-bottom)); background: #121a2b; gap: 8px; }
.anno-colors { display: flex; gap: 8px; }
.anno-color { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; }
.anno-color.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.anno-actions { display: flex; gap: 4px; }
.anno-actions .btn-ghost { color: #fff; min-height: 40px; padding: 6px 10px; }

.pdf-scroll { flex: 1; overflow: auto; padding: 8px; -webkit-overflow-scrolling: touch; }
.pdf-scroll canvas { display: block; margin: 0 auto 10px; max-width: 100%; height: auto; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.pdf-bottom { display: flex; gap: 8px; padding: 8px 10px calc(10px + var(--safe-bottom)); background: #121a2b; }
.pdf-bottom > * { flex: 1; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(110px + var(--safe-bottom)); transform: translateX(-50%); background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 80; box-shadow: 0 4px 16px rgba(0,0,0,.3); max-width: 90vw; text-align: center; }

/* Review */
.review-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.review-row:first-child { border-top: 0; }
.review-row .mark { width: 28px; text-align: center; font-size: 18px; }
.review-row .name { flex: 1; font-weight: 600; }

.progress { height: 8px; background: var(--chip); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--ok); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr; } }

.home-hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--radius); padding: 22px 20px; margin-bottom: 14px; display: flex; align-items: flex-start; gap: 16px; }
.home-hero img { width: 72px; height: 72px; flex-shrink: 0; background: #fff; border-radius: 16px; padding: 6px; }
.home-hero .brand { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; margin-bottom: 4px; }
.home-hero h1 { margin: 0 0 6px; font-size: 21px; line-height: 1.25; }
.home-hero p { margin: 0 0 12px; opacity: .88; font-size: 14px; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty .big { font-size: 40px; }
.example { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--muted); }

/* Fallbacks for browsers without flex "gap" (Safari < 14.1, older Android WebView) — class set by the bootstrap script */
.no-flexgap .row > * + *, .no-flexgap .sheet .actions > * + *, .no-flexgap .fab-bar .inner > * + *, .no-flexgap .pdf-bottom > * + *, .no-flexgap .anno-actions > * + *, .no-flexgap .anno-colors > * + *, .no-flexgap .slot-head > * + *, .no-flexgap .anno-textbox > * + *, .no-flexgap .appbar > * + * { margin-left: 8px; }
.no-flexgap .thumbs > * + * { margin-left: 8px; }
.no-flexgap .list > * + * { margin-top: 10px; }
.no-flexgap .chips > * { margin: 0 6px 6px 0; }
.no-flexgap .list-item > * + *, .no-flexgap .review-row > * + * { margin-left: 10px; }
.no-flexgap .anno-tools > * + * { margin-left: 4px; }
.grid2 { grid-gap: 10px; }
/* Unsupported-browser notice (rendered by the ES5 bootstrap) */
.unsupported { margin: 20px; padding: 16px; border-radius: 12px; background: #fff; color: #16213a; border-left: 4px solid #d64545; font-family: -apple-system, Helvetica, Arial, sans-serif; }

/* Techverse CRM promo */
.crm-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent-2); border-radius: var(--radius); padding: 14px; margin: 12px 0; box-shadow: var(--shadow); }
.crm-card h2 { margin: 0 0 4px; font-size: 15px; }
.crm-card p { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
.crm-card .btn-primary { text-decoration: none; }

.btn-wa { background: #25D366; color: #fff; border-color: #25D366; }

.check { display:flex; align-items:flex-start; gap:10px; font-size:14px; padding:10px 0; }
.check input { width:22px; height:22px; margin:2px 0 0; flex-shrink:0; accent-color: var(--accent); }
.legal-note { background: rgba(63,196,192,.10); border-left: 4px solid var(--accent-2); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; margin: 0 0 12px; }

/* compass */
.compass-row { display: flex; align-items: center; gap: 8px; }
.no-flexgap .compass-row > * + * { margin-left: 8px; }
.compass-row input { flex: 1; min-width: 0; }
.compass-live { flex: 0 0 auto; line-height: 0; }
.compass-svg { display: inline-block; vertical-align: middle; }
.photo-wrap { position: relative; }
.photo-compass { position: absolute; top: 10px; right: 10px; line-height: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.compass-banner { border-left-color: var(--accent); background: rgba(22,35,74,.06); }
.compass-banner .btn { margin: 0 4px; }

/* roof tilt camera sighting */
.tilt-root { background: #000; }
.tilt-top { display: flex; align-items: center; justify-content: space-between; padding: calc(8px + var(--safe-top, 0px)) 10px 8px; gap: 8px; }
.tilt-top .btn-ghost { color: #fff; }
.tilt-mode { display: flex; gap: 6px; }
.tilt-mode .chip { background: rgba(255,255,255,.14); color: #fff; border-color: transparent; }
.tilt-mode .chip.active { background: var(--accent-2); color: #0b0f18; }
.tilt-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #111; }
.tilt-stage video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.tilt-root.nocam .tilt-stage video, .tilt-root.surface .tilt-stage video { display: none; }
.tilt-root.nocam .tilt-stage, .tilt-root.surface .tilt-stage { background: radial-gradient(circle at 50% 45%, #1e2a4a, #0b0f18 70%); }
.tilt-guide { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.tilt-line { position: absolute; left: 6%; right: 6%; top: 50%; height: 4px; margin-top: -2px; background: #ffd23f; box-shadow: 0 0 8px rgba(0,0,0,.6); border-radius: 2px; }
.tilt-horizon { position: absolute; left: 15%; right: 15%; top: 50%; height: 0; border-top: 2px dashed rgba(255,255,255,.7); transform-origin: 50% 50%; }
.tilt-root.surface .tilt-line, .tilt-root.surface .tilt-horizon { display: none; }
.tilt-readout { position: absolute; left: 0; right: 0; top: 14px; text-align: center; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.tilt-readout .deg { font-size: 54px; font-weight: 800; line-height: 1; }
.tilt-readout .sub { font-size: 14px; opacity: .9; margin-top: 4px; }
.tilt-help { padding: 10px 16px; font-size: 14px; color: #dfe4f0; }
.tilt-help b { color: #ffd23f; }
.tilt-bottom { padding: 6px 16px calc(12px + var(--safe-bottom)); }

/* ---- home (v1.8) ------------------------------------------------------ */
.ico { flex-shrink: 0; vertical-align: -4px; }
main#view.wide { max-width: 1120px; }
.home { display: grid; grid-template-columns: 1fr; gap: 14px; }
.home-side .side-card, .home-side .crm-card { margin: 0 0 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 10px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head .count { display: inline-block; background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; margin-left: 4px; }
.section-head .home-new { display: none; }
.survey-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; border: 1px solid transparent; width: 100%; text-align: left; color: var(--text); }
.survey-card:hover { border-color: var(--line); }
.survey-card .sicon { width: 40px; height: 40px; border-radius: 12px; background: var(--chip); color: var(--icon); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.survey-card .body { flex: 1; min-width: 0; }
.survey-card .body b { display: block; font-size: 15px; }
.survey-card .body > span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.survey-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.survey-card .chev { color: var(--muted); font-size: 20px; }
.home-hero .steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.home-hero .steps li { display: flex; align-items: center; gap: 10px; }
.home-hero .steps li span { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.home-hero .home-new { flex: 1 1 100%; }
.hero-link { display: inline-flex; align-items: center; gap: 6px; color: #fff; opacity: .9; font-weight: 600; font-size: 14px; text-decoration: none; }
.hero-link:hover { opacity: 1; text-decoration: underline; }
.tool-row { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.tool { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-align: left; color: var(--text); text-decoration: none; width: 100%; }
.tool .ico { color: var(--accent); }
.tool b { display: block; font-size: 14px; }
.tool span { display: block; color: var(--muted); font-size: 12.5px; }
.stack { display: grid; gap: 8px; }
.btn-sm-row { justify-content: flex-start; min-height: 44px; padding: 8px 12px; font-size: 14px; text-decoration: none; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--chip); color: var(--text); text-decoration: none; min-width: 0; }
.pill-link.wa { background: #e6f8ee; color: #137a3c; }
.side-card h2, .crm-card h2 { font-size: 15px; }
.brand-footer a { color: var(--muted); }
@media (min-width: 900px) {
  .home { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .home-side { position: sticky; top: 74px; }
  .section-head .home-new { display: inline-flex; }
  .home-fab { display: none; }
  main#view.wide { padding-bottom: 40px; }
  .tool-row { grid-template-columns: 1fr 1fr; }
  .home-hero { padding: 28px 26px; }
  .home-hero h1 { font-size: 24px; }
  .home-hero .home-new { flex: 0 0 auto; }
}
:root[data-theme="dark"] .pill-link.wa { background: #163a27; color: #7fdba0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill-link.wa { background: #163a27; color: #7fdba0; } }

/* install banner + iOS guide */
.install-banner { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.install-banner .ib-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.14); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.install-banner .grow { flex: 1; min-width: 0; }
.install-banner b { display: block; font-size: 14px; }
.install-banner span { display: block; font-size: 12.5px; opacity: .85; }
.install-banner .btn-primary { background: #fff; color: var(--navy); border-color: #fff; flex-shrink: 0; }
.install-banner .ib-close { background: transparent; border: 0; color: #fff; opacity: .7; font-size: 16px; padding: 6px; }
.install-steps { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 10px; }
.install-steps li { display: flex; align-items: center; gap: 12px; background: var(--chip); border-radius: 12px; padding: 10px 12px; }
.install-steps .n { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.install-steps .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--card); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.install-steps b { display: block; font-size: 14px; }
.install-steps div > span { display: block; color: var(--muted); font-size: 12.5px; }
@media (max-width: 480px) { .install-banner { flex-wrap: wrap; } .install-banner .grow { flex-basis: calc(100% - 100px); } .install-banner .btn-primary { flex: 1; } }

/* report branding preview (Settings) */
.brand-preview { background: #fff; color: #16213a; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 6px 0 12px; box-shadow: var(--shadow); }
.bp-head { display: flex; align-items: center; gap: 10px; }
.bp-head img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); padding: 2px; flex-shrink: 0; }
.bp-head b { display: block; font-size: 14px; text-transform: uppercase; letter-spacing: .02em; }
.bp-head > div { flex: 1; min-width: 0; }
.bp-head .muted { display: block; }
.bp-tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #e8eefc; color: #2c4a9a; white-space: nowrap; }
.bp-body { display: grid; gap: 6px; margin: 12px 0; }
.bp-body span { display: block; height: 6px; border-radius: 3px; background: #eef1f6; }
.bp-foot { font-size: 10.5px; color: #6b7280; border-top: 1px solid #e3e7ee; padding-top: 6px; }
