:root {
  --navy: #1f3a5f; --navy-2: #2c5282; --ink: #1a202c; --muted: #6b7280; --line: #e2e8f0;
  --bg: #f4f6f9; --card: #fff; --green: #2f855a; --red: #c53030; --amber: #b7791f;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--navy-2); }
button, input, select, textarea { font: inherit; color: inherit; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--navy); color: #fff; }
.topbar .brand { color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; }
.topbar nav { display: flex; gap: 4px; margin-left: auto; }
.topbar nav a { color: #cbd5e0; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.topbar nav a.active { background: rgba(255,255,255,.15); color: #fff; }

main { max-width: 980px; margin: 0 auto; padding: 16px 12px 110px; }
h1 { font-size: 22px; margin: 4px 0 14px; }
h2 { font-size: 17px; margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: #cbd5e0; }
.btn.primary { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn.danger { color: var(--red); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }

/* list */
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; }
.toolbar input { flex: 1; }
.insp-list { display: grid; gap: 10px; }
.insp { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-decoration: none; color: inherit; }
.insp:hover { border-color: #cbd5e0; }
.insp .thumb { width: 84px; height: 62px; border-radius: 6px; background: #e2e8f0 center/cover no-repeat; flex: none; }
.insp .meta { flex: 1; min-width: 0; }
.insp .addr { font-weight: 600; }
.insp .sub { color: var(--muted); font-size: 13px; }
.insp .total { font-weight: 700; text-align: right; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #edf2f7; color: #4a5568; }
.badge.Complete { background: #c6f6d5; color: #22543d; }
.badge.Sent { background: #bee3f8; color: #2a4365; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

/* inputs */
input[type=text], input[type=number], input[type=password], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff;
}
textarea { resize: vertical; min-height: 40px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #90cdf4; border-color: #90cdf4; }
label.f { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
label.f > input, label.f > select { margin-top: 3px; font-size: 15px; color: var(--ink); font-weight: 400; }

/* editor */
.ed-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ed-head h1 { margin: 0; flex: 1; min-width: 200px; }
.prop { display: grid; grid-template-columns: 220px 1fr; gap: 14px; }
.cover { width: 100%; aspect-ratio: 4/3; border: 2px dashed #cbd5e0; border-radius: 8px; background: #f7fafc center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; font-size: 13px; text-align: center; }
.cover.has { border-style: solid; border-color: var(--line); color: transparent; }
.fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fields .wide { grid-column: span 2; }

.room { padding: 0; overflow: hidden; }
.room-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #f7fafc; border-bottom: 1px solid var(--line); }
.room-head h2 { flex: 1; }
.room-total { font-weight: 700; }
.item { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.item:last-of-type { border-bottom: 0; }
.item-grid { display: grid; grid-template-columns: 1fr 80px 110px 110px 34px; gap: 8px; align-items: start; }
.item-grid .lbl { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.item-grid .subt { padding: 8px 0; font-weight: 700; text-align: right; }
.cb { display: flex; align-items: center; justify-content: center; gap: 4px; height: 38px; }
.cb input { width: 18px; height: 18px; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.ph { position: relative; width: 84px; height: 64px; border-radius: 6px; background: #e2e8f0 center/cover no-repeat; cursor: zoom-in; }
.ph button { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 13px; line-height: 22px; padding: 0; cursor: pointer; }
.add-photo { width: 84px; height: 64px; border: 2px dashed #cbd5e0; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); font-size: 12px; cursor: pointer; background: #fff; }
.room-foot { padding: 10px 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.add-room { display: flex; gap: 8px; }
.add-room select { flex: 1; }

.totalbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.totalbar .in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.totalbar .gt { font-size: 18px; font-weight: 800; }
.saving { font-size: 12px; color: var(--muted); }

/* price book */
.pb-room h2 { margin-bottom: 8px; }
.pb-row { display: grid; grid-template-columns: 1fr 110px 34px; gap: 8px; margin-bottom: 6px; }
.pb-add { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #edf2f7; border-radius: 99px; padding: 3px 4px 3px 10px; font-size: 13px; }
.chip button { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 15px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.55); display: flex; align-items: flex-start; justify-content: center; padding: 40px 10px; overflow: auto; }
.modal-card { background: #fff; border-radius: 12px; width: 100%; max-width: 620px; padding: 16px; }
.modal-card.img { max-width: 1000px; padding: 6px; }
.modal-card.img img { width: 100%; display: block; border-radius: 8px; }
.pick-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; }
.pick { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick:hover { background: #f7fafc; }
.pick .d { flex: 1; }
.pick .r { font-size: 12px; color: var(--muted); }
.pick .p { font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: #1a202c; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 60; font-size: 14px; }

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 28px; border-radius: 12px; border: 1px solid var(--line); width: 300px; display: grid; gap: 12px; }
.login-card h1 { margin: 0; text-align: center; color: var(--navy); }
.err { color: var(--red); margin: 0; min-height: 1em; text-align: center; }

@media (max-width: 760px) {
  .topbar nav a { padding: 6px 7px; font-size: 13px; }
  .topbar .brand { display: none; }
  .topbar nav { margin-left: 0; }
  .prop { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr 1fr; }
  .fields .wide { grid-column: span 2; }
  .item-grid { grid-template-columns: 1fr 1fr 1fr 34px; }
  .item-grid .desc { grid-column: 1 / -1; }
  .item-grid .subt { text-align: left; }
  .totalbar .btn.small { padding: 5px 8px; }
  .cb-sum { font-size: 12px; }
  .pb-add { grid-template-columns: 1fr 100px auto; }
}

[hidden] { display: none !important; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-row .meta { flex: 1; min-width: 0; }
.user-row .sub { color: var(--muted); font-size: 13px; }
.user-row.off { opacity: .6; }
input[readonly] { background: #f7fafc; }

input[type=email] { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.add-photo { width: 110px; height: 76px; border: 2px dashed #90cdf4; background: #ebf8ff; color: var(--navy-2); font-weight: 600; gap: 2px; }
.add-photo .cam { font-size: 20px; }
.add-photo:hover { background: #bee3f8; }
.ph { width: 110px; height: 76px; }
.photos-head { margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--ink); }
.photos { margin-top: 6px; }
.item.drop { outline: 3px dashed #63b3ed; outline-offset: -3px; background: #ebf8ff; }
.item.flash { animation: flash 2.2s ease; }
@keyframes flash { 0%, 40% { background: #fefcbf; } 100% { background: transparent; } }
.cb-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: #f7fafc; min-height: 40px; }
.cb-row.on { background: #fffaf0; border: 1px solid #fbd38d; }
.cb-check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.cb-check input { width: 20px; height: 20px; }
.cb-pct { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.cb-pct input { width: 80px; }
.cb-amt { font-size: 14px; color: var(--amber); }
.cb-sum { font-size: 13px; color: var(--amber); line-height: 1.5; }
.cb-sum b { color: var(--ink); }
.badge.Submitted { background: #feebc8; color: #7b341e; }
.badge.Approved { background: #c6f6d5; color: #22543d; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.chip-btn span { color: var(--muted); margin-left: 3px; }
.chip-btn.on { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.chip-btn.on span { color: #cbd5e0; }
.chip-btn.attn:not(.on) { border-color: #f6ad55; }
.status-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid var(--line); background: #fff; }
.status-banner .msg { flex: 1; min-width: 220px; font-size: 14px; }
.status-banner.Submitted { background: #fffaf0; border-color: #fbd38d; }
.status-banner.Approved { background: #f0fff4; border-color: #9ae6b4; }
.btn.approve { background: var(--green); border-color: var(--green); }
.locked textarea:disabled, .locked input:disabled { background: #f7fafc; color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; }
.ev { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.ev:last-child { border-bottom: 0; }
.ev-a { flex: none; min-width: 84px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.ev-a.approved { color: var(--green); } .ev-a.submitted { color: var(--amber); } .ev-a.sent-back { color: var(--red); }
.ev-note { color: var(--muted); font-size: 13px; margin-top: 2px; }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-opt { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 12px; cursor: pointer; display: grid; gap: 3px; }
.type-opt b { font-size: 15px; }
.type-opt span { font-size: 12px; color: var(--muted); }
.type-opt.on { border-color: var(--navy-2); background: #ebf4ff; }
.brand-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.brand-opt { text-align: center; border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 12px 10px; cursor: pointer; display: grid; gap: 4px; justify-items: center; }
.brand-opt .bl { height: 38px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.brand-opt b { font-size: 14px; }
.brand-opt span:last-child:not(.bl) { font-size: 12px; color: var(--muted); }
.brand-opt.on { border-color: var(--bc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc) 22%, transparent); background: color-mix(in srgb, var(--bc) 6%, #fff); }
.brand-tag { display: inline-block; font-size: 11px; font-weight: 600; color: #4a5568; background: #edf2f7; border-radius: 4px; padding: 1px 6px; vertical-align: 2px; }
.type-row { gap: 12px; flex-wrap: wrap; }
.brand-ed { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.brand-swatch { width: 150px; height: 48px; border-radius: 8px; display: flex; align-items: center; padding: 0 8px; }
.brand-swatch span { background: #fff; border-radius: 6px; height: 36px; padding: 3px 8px; display: flex; align-items: center; }
.brand-swatch img { max-height: 30px; max-width: 120px; }
.brand-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.type-tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--navy-2); background: #ebf4ff; border-radius: 4px; padding: 1px 6px; vertical-align: 2px; }
.type-row { display: flex; padding: 10px 14px; }
.tabs { display: flex; gap: 4px; margin: 4px 0 12px; border-bottom: 2px solid var(--line); }
.tab { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; font-size: 15px; }
.tab span { font-size: 12px; background: #edf2f7; color: #4a5568; border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.tab.on { color: var(--navy-2); border-bottom-color: var(--navy-2); }
.task { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.task-head h3 { flex: 1; margin: 0; font-size: 15px; }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cbd5e0; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; flex: none; }
.task.done .tick { background: var(--green); border-color: var(--green); }
.task.na h3 { color: var(--muted); text-decoration: line-through; }
.task.na textarea, .task.na .photos { opacity: .5; }
.na-toggle { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); cursor: pointer; }
.na-toggle input { width: 16px; height: 16px; }
.tpl-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.tpl-row input { flex: 1; }
.room-photos { padding: 10px 14px 12px; border-bottom: 1px solid var(--line); background: #fcfdfe; }
.room-photos .photos-head { margin-top: 0; }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
/* bottom bar */
.totals { min-width: 0; }
.gt-lbl { font-size: 12px; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; }
.gt-lbl .saving { font-size: 11px; }
.cb-sum { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; line-height: 1.3; }
.narrow-only { display: none !important; }
/* collapsible property details */
.prop-toggle { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 0 2px 8px; font-weight: 700; font-size: 15px; cursor: pointer; text-align: left; }
.prop-toggle .prop-sum { flex: 1; font-weight: 400; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-toggle .chev { transition: transform .2s; transform: rotate(-90deg); color: var(--muted); }
.prop-toggle.open .chev { transform: none; }
.prop.folded { display: none; }
/* sticky tabs so you can switch without scrolling up */
.tabs { position: sticky; top: 50px; z-index: 10; background: var(--bg); padding-top: 4px; }
@media (max-width: 760px) {
  .ed-head h1 { font-size: 19px; min-width: 0; }
  .wide-only { display: none !important; }
  .narrow-only { display: inline-flex !important; }
  .totalbar { padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .totalbar .gt { font-size: 17px; }
  .gt-lbl .saving { display: none; }
  .tabs { top: 46px; }
  .tab { padding: 10px 10px; font-size: 14px; }
  .status-banner { padding: 10px 12px; }
  .status-banner .msg { min-width: 0; }
}
.topbar nav a { white-space: nowrap; }
.tab { white-space: nowrap; }
.tabs { top: var(--topbar, 50px) !important; }
@media (max-width: 380px) {
  .topbar { padding-left: 8px; padding-right: 8px; }
  .topbar nav a { padding: 6px 5px; font-size: 12.5px; }
  .tab { padding: 10px 6px; font-size: 13px; }
  .tab span { padding: 1px 5px; }
}
/* outbox / sync */
.ph.pending { opacity: .75; }
.pend-badge { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; border-radius: 4px; padding: 1px 4px; }
.saving.ok { color: var(--green); }
.saving.busy { color: var(--navy-2); }
.saving.wait { color: var(--amber); font-weight: 600; }
.sync-pill { position: fixed; top: calc(var(--topbar, 50px) + 8px); left: 50%; transform: translateX(-50%); z-index: 30; border: 0; border-radius: 99px; padding: 6px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.15); cursor: pointer; }
.sync-pill.busy { background: #ebf8ff; color: var(--navy-2); }
.sync-pill.wait { background: #fefcbf; color: #744210; }
@media (max-width: 760px) { .gt-lbl .saving { display: inline; } .gt-lbl .saving.ok { display: none; } }
.totals { overflow: hidden; }
.gt-lbl { overflow: hidden; text-overflow: ellipsis; }
/* in-app camera */
body.cam-open { overflow: hidden; }
.cam-ui { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; color: #fff; }
.cam-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.cam-title { flex: 1; text-align: center; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 18px; cursor: pointer; }
.cam-view { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; background: #000; }
.cam-video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.cam-zoom-label { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); color: #ffd60a; font-weight: 700; font-size: 15px; padding: 4px 10px; border-radius: 99px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.cam-zoom-label.show { opacity: 1; }
.cam-zooms { display: flex; justify-content: center; gap: 10px; padding: 8px 0 0; }
.cam-z { min-width: 46px; height: 34px; border-radius: 17px; border: 0; background: rgba(255,255,255,.18); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.cam-z.on { background: #fff; color: #000; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: camflash .25s ease-out; }
@keyframes camflash { 0% { opacity: .8; } 100% { opacity: 0; } }
.cam-strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; min-height: 64px; }
.cam-thumb { flex: none; width: 56px; height: 56px; border-radius: 6px; background: #222 center/cover no-repeat; border: 2px solid #fff; }
.cam-bottom { display: flex; align-items: center; justify-content: space-between; padding: 8px 24px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.cam-side { min-width: 84px; height: 44px; border-radius: 22px; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.cam-done { background: #fff; color: #000; }
/* shutter floats on the right edge at thumb height (one-handed use), over the preview */
.cam-shutter { position: absolute; z-index: 3; right: max(16px, env(safe-area-inset-right)); top: 62%; transform: translateY(-50%); width: 80px; height: 80px; border-radius: 50%; border: 4px solid #fff; background: rgba(0,0,0,.25); padding: 4px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.45); -webkit-tap-highlight-color: transparent; }
@media (orientation: landscape) { .cam-shutter { top: 50%; } }
.cam-shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .1s; }
.cam-shutter:active span { transform: scale(.88); }
/* photo viewer */
.viewer { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.97); display: flex; align-items: center; justify-content: center; cursor: zoom-out; animation: vin .15s ease-out; }
.viewer.out { opacity: 0; transition: opacity .15s; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .1s; }
.viewer-x { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #000; font-size: 22px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.4); z-index: 1; }
@keyframes vin { from { opacity: 0; } to { opacity: 1; } }
/* carousel */
.viewer { overflow: hidden; }
.viewer-track { position: absolute; inset: 0; display: flex; will-change: transform; }
.vslide { flex: none; width: 100vw; height: 100%; display: flex; align-items: center; justify-content: center; padding: 64px 0 76px; }
.vslide img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .1s; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 10px; background: rgba(255,255,255,.18); color: #fff; font-size: 40px; line-height: 1; cursor: pointer; z-index: 1; }
.viewer-nav.prev { left: 10px; } .viewer-nav.next { right: 10px; }
.viewer-nav:disabled { opacity: .2; cursor: default; }
.viewer-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); pointer-events: none; }
.vc-text { flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-count { font-size: 14px; font-weight: 700; opacity: .85; }
@media (pointer: coarse) { .viewer-nav { display: none; } }
.viewer { touch-action: none; overscroll-behavior: contain; }
html.viewer-open, html.viewer-open body { overscroll-behavior: none; overflow: hidden; }
.cam-focus { position: absolute; width: 74px; height: 74px; margin: -37px 0 0 -37px; border: 2px solid #ffd60a; border-radius: 4px; opacity: 0; pointer-events: none; z-index: 2; }
.cam-focus.go { animation: camfocus 1.1s ease-out; }
@keyframes camfocus { 0% { opacity: 1; transform: scale(1.35); } 25% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }
.rv-card { padding: 12px 14px; }
.rv-prop { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.rv-st { margin-top: 8px; font-size: 13px; }
.rv-st.ok { color: var(--green); font-weight: 600; }
.rv-st.busy { color: var(--navy-2); }
.rv-st.bad { color: var(--red); }
.rv-card code { font-size: 12px; background: #edf2f7; padding: 0 4px; border-radius: 3px; }
.pick-go { flex: none; align-self: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--navy-2); border-radius: 6px; padding: 5px 10px; }
.who { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.who-name { color: #cbd5e0; font-size: 13px; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.logout { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 6px; padding: 5px 10px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.logout:hover { background: rgba(255,255,255,.12); }
@media (max-width: 760px) {
  .who { margin-left: auto; gap: 6px; }
  .who-name { display: none; }
  .logout { padding: 4px 8px; font-size: 12px; }
  .topbar { gap: 8px; }
}
@media (max-width: 760px) {
  .topbar nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .who { margin-left: 0; flex: none; }
}
@media (max-width: 380px) {
  .logout { font-size: 0; padding: 4px 8px; }
  .logout::after { content: 'Sign out'; font-size: 11px; }
  .topbar nav a { padding: 6px 4px; font-size: 12px; }
}

/* ---------- lockboxes ---------- */
.lb-row { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.lb-row:hover { border-color: #cbd5e0; }
.lb-row.missing { border-color: #feb2b2; background: #fff5f5; }
.lb-row.retired { opacity: .65; }
.lb-row .meta { flex: 1; min-width: 0; }
.lb-row .addr { font-weight: 600; }
.lb-row .sub { color: var(--muted); font-size: 13px; }
.lb-row .sub b { color: var(--ink); font-weight: 600; }
.lb-serial { font-size: 12px; font-weight: 400; }
.lb-icon { width: 38px; height: 38px; flex: none; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff; background: #4a5568; }
.lb-icon.sero { background: #2b6cb0; }
.lb-right { flex: none; text-align: right; }
.lb-code { font: 700 17px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 3px; border: 1px solid var(--line); background: #f7fafc; border-radius: 8px; padding: 8px 10px; min-width: 72px; cursor: pointer; color: var(--ink); }
.lb-code.shown { background: #fefcbf; border-color: #ecc94b; }
.lb-code-none { font-size: 12px; }
.badge.lb-in_use { background: #c6f6d5; color: #22543d; }
.badge.lb-available { background: #bee3f8; color: #2a4365; }
.badge.lb-missing { background: #fed7d7; color: #822727; }
.badge.lb-retired { background: #e2e8f0; color: #4a5568; }
.chip-btn.small { padding: 3px 10px; font-size: 12px; }
.lb-facts { display: grid; gap: 6px; margin: 12px 0; }
.lb-facts > div { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lb-facts .muted { width: 92px; flex: none; font-size: 13px; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-hist { display: grid; gap: 8px; max-height: 34vh; overflow: auto; font-size: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.lb-card-h { font-size: 12px; font-weight: 600; }
.lb-mini { display: flex; gap: 10px; align-items: center; padding: 8px 0 2px; border-top: 1px solid var(--line); margin-top: 8px; cursor: pointer; }
.lp-rv:empty { display: none; }
.lp-rv { font-size: 13px; display: flex; align-items: center; gap: 6px; }
@media (max-width: 760px) { .lb-actions .btn { flex: 1 1 45%; } }
/* five menu items: let the menu scroll sideways on phones instead of pushing items off-screen */
@media (max-width: 760px) {
  .topbar { gap: 8px; }
  .topbar nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar .who-name { display: none; }
}
.tt-card .tt-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.tt-card .tt-stats b { color: var(--ink); }
.tt-miss { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.tt-miss-h { font-size: 13px; font-weight: 600; color: var(--amber); margin-bottom: 4px; }
.tt-miss-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.tt-shows { display: grid; gap: 6px; font-size: 14px; }
.tt-show.off { opacity: .55; text-decoration: line-through; }
.tt-h-compact { font-size: 12px; font-weight: 600; color: var(--amber); margin: 10px 0 4px; }
.lb-facts .lb-val { flex: 1; min-width: 0; }
.lb-facts > div { flex-wrap: nowrap; }
/* Tenant Turner-style colors: green = active listing, red = remove, gray = unassigned */
.lb-row { border-left-width: 6px; }
.lb-row.c-green { border-left-color: #8fc73e; }
.lb-row.c-red { border-left-color: #c60f13; background: #fff5f5; }
.lb-row.c-gray { border-left-color: #888; }
.lb-row.c-green .lb-icon { background: #8fc73e; }
.lb-row.c-red .lb-icon { background: #c60f13; }
.lb-row.c-gray .lb-icon { background: #888; }
.badge.lbc-green { background: #e6f4d4; color: #3d6b10; }
.badge.lbc-red { background: #c60f13; color: #fff; }
.badge.lbc-gray { background: #e5e5e5; color: #555; }
.chip-btn.chip-red.attn:not(.on) { border-color: #c60f13; color: #c60f13; }
.chip-btn.chip-red.on { background: #c60f13; border-color: #c60f13; }
.lb-alert { margin-top: 10px; background: #fff5f5; border: 1px solid #feb2b2; color: #822727; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.lb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #cbd5e0; margin-right: 6px; vertical-align: 0; }
.lb-dot.d-green { background: #8fc73e; } .lb-dot.d-red { background: #c60f13; } .lb-dot.d-gray { background: #888; }
.area-tag { display: inline-block; font-size: 11px; font-weight: 600; color: #6b46c1; background: #f3ebff; border-radius: 4px; padding: 1px 6px; vertical-align: 2px; }
.chip-btn.chip-area.on { background: #6b46c1; border-color: #6b46c1; }
.lb-last { margin-top: 2px; } .lb-last b { color: var(--ink); font-weight: 600; }
/* ---------- lockbox block view ---------- */
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.lb-grid .empty { grid-column: 1 / -1; }
.lb-tile { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .08s, box-shadow .08s; }
.lb-tile:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-1px); }
.lb-tile-head { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; color: #fff; background: #4a5568; }
.lb-tile.c-green .lb-tile-head { background: #8fc73e; }
.lb-tile.c-red .lb-tile-head { background: #c60f13; }
.lb-tile.c-gray .lb-tile-head { background: #888; }
.lb-tile.c-none.in_use .lb-tile-head { background: var(--navy-2); }
.lb-tile.missing .lb-tile-head { background: #dd6b20; }
.lb-tile.retired { opacity: .6; }
.lb-tile.c-red { border-color: #f5b5b6; }
.lb-tile-kind { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.lb-tile-name { font-size: 17px; font-weight: 800; letter-spacing: .01em; line-height: 1.2; word-break: break-word; }
.lb-tile-body { flex: 1; padding: 10px 12px 6px; display: grid; gap: 5px; align-content: start; }
.lb-tile-addr { font-weight: 700; font-size: 14px; line-height: 1.25; }
.lb-tile-none { color: var(--muted); font-weight: 600; }
.lb-tile-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.lb-tile-tags .area-tag { vertical-align: 0; }
.lb-tile-meta { font-size: 12px; color: var(--muted); line-height: 1.3; }
.lb-tile-last { font-size: 12px; color: var(--ink); background: #fffbea; border-radius: 6px; padding: 3px 6px; line-height: 1.3; }
.lb-tile-foot { padding: 8px 12px 12px; }
.lb-tile-foot .lb-tile-btn { width: 100%; }
.lb-tile-foot .lb-code { width: 100%; }
@media (min-width: 700px) { .lb-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; } }
/* ---------- video inspections ---------- */
.vid-card { border-color: #d6bcfa; }
.vid-st { margin-top: 10px; font-size: 14px; }
.vid-st.busy { color: #553c9a; }
.vid-st.ok { color: var(--green); font-size: 13px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid #d6bcfa; border-top-color: #553c9a; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -1px; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.vid-pending { margin-top: 10px; background: #faf5ff; border: 1px solid #d6bcfa; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #44337a; }
.vid-tips { background: #f7fafc; border-radius: 8px; padding: 10px 12px; margin: 12px 0; font-size: 14px; }
.vid-tips ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.vid-pick { width: 100%; padding: 12px; font-size: 16px; }
.vid-bar { height: 10px; background: #edf2f7; border-radius: 99px; overflow: hidden; }
#vid-bar-in { height: 100%; width: 0; background: #6b46c1; transition: width .2s; }
.ai-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; font-size: 12px; }
.ai-lbl { font-weight: 700; border-radius: 99px; padding: 2px 9px; }
.ai-tag.voice .ai-lbl { background: #e6fffa; color: #234e52; }
.ai-tag.ai .ai-lbl { background: #faf5ff; color: #553c9a; }
.ai-note { color: var(--muted); flex: 1 1 200px; }
.ai-keep-wrap { display: inline-flex; gap: 6px; margin-left: auto; }
.item.ai-pending { border: 2px dashed #b794f4; border-radius: 10px; padding: 8px; background: #fcfaff; }
.btn.vid-start { border-color: #b794f4; color: #553c9a; background: #faf5ff; font-weight: 600; }
@media (max-width: 520px) { #n-video, #n-go { flex: 1 1 100%; } }
/* ---------- in-app recorder ---------- */
body.rec-open { overflow: hidden; }
.rec-ov { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; display: flex; flex-direction: column; }
.rec-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rec-top { position: relative; display: flex; align-items: center; gap: 10px; padding: max(12px, env(safe-area-inset-top)) 14px 10px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.rec-x { background: rgba(0,0,0,.45); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.rec-time { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.5); border-radius: 99px; padding: 5px 12px; font: 600 16px/1 ui-monospace, Menlo, monospace; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #f56565; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.rec-up { margin-left: auto; font-size: 12px; background: rgba(0,0,0,.45); border-radius: 99px; padding: 4px 10px; }
.rec-up:empty { display: none; }
.rec-up.warn { background: rgba(183,121,31,.85); }
.rec-tip { position: relative; margin: 0 14px; font-size: 13px; background: rgba(0,0,0,.4); border-radius: 10px; padding: 8px 10px; max-width: 520px; }
.rec-ov.recording .rec-tip { opacity: .75; }
.rec-bottom { position: relative; margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0 max(22px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.rec-btn { width: 78px; height: 78px; border-radius: 50%; border: 5px solid #fff; background: transparent; position: relative; cursor: pointer; }
.rec-btn::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #e53e3e; transition: all .2s; }
.rec-ov.recording .rec-btn::after { inset: 20px; border-radius: 6px; }
.rec-btn:disabled { opacity: .5; }
.rec-hint { font-size: 13px; text-shadow: 0 1px 3px #000; }
.vid-btns { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
@media (max-width: 520px) { .vid-card .row { flex-direction: column; align-items: stretch; } .vid-btns { align-items: stretch; } }
.lookup-msg{margin-left:10px;font-size:13px}#lookup-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px}#lookup-row[hidden]{display:none}

/* plan / free trial */
.plan-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; background: #eef5ff; border-color: #cfe0fb; }
.plan-banner.urgent { background: #fff4ed; border-color: #f9c9a8; }
.plan-price { font-size: 14px; }
.plan-price b { font-size: 22px; }
.pay-card input { width: 100%; }
