/* no double-tap zoom anywhere (tapping the same key twice fast must not zoom the screen); pinch zoom still works */
:where(html, body, *) { touch-action: manipulation; }
:root {
  --navy: #0F2A4A; --blue: #2B7DB3; --bg: #EEF3F8; --soft: #E1EEF8; --card: #fff; --text: #1F2A37; --muted: #5B6778; --line: #D5DEE8;
  --danger: #B42318; --ok: #1E7F4F; --radius: 14px; --tap: 44px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
h1, h2, .btn, .nav-item, b { font-family: 'Montserrat', system-ui, sans-serif; }
h1 { font-size: 1.25rem; margin: 0; } h2 { font-size: 1.05rem; margin: 0 0 .6rem; color: var(--navy); }
a { color: var(--blue); }
.muted { color: var(--muted); } .small { font-size: .85rem; }

/* Layout: bottom tabs on phones, left sidebar on PCs */
#shell { min-height: 100vh; }
main#app { max-width: 1180px; margin: 0 auto; padding: 0 16px 24px; }
body.signed-in main#app { padding-bottom: calc(88px + var(--safe-b)); }
.nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(6, 1fr); background: #fff;
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b); box-shadow: 0 -2px 10px rgba(15,42,74,.06); }
.nav-brand { display: none; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; text-decoration: none; color: var(--muted); font-size: .75rem; font-weight: 700; }
.nav-item .ni { font-size: 1.3rem; line-height: 1; }
.nav-item[aria-current="page"] { color: var(--navy); box-shadow: inset 0 3px 0 var(--blue); }
@media (min-width: 900px) {
  body.signed-in #shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
  .nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: stretch; border-top: 0; border-right: 1px solid var(--line); padding: 16px 12px; gap: 4px; box-shadow: none; }
  .nav-brand { display: block; padding: 4px 8px 18px; } .nav-brand img { width: 160px; height: auto; display: block; }
  .nav-item { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: .95rem; min-height: 44px; }
  .nav-item[aria-current="page"] { background: var(--soft); box-shadow: none; }
  body.signed-in main#app { padding: 0 28px 32px; width: 100%; }
}

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; margin: 0 -16px 14px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: var(--navy); color: #fff; min-height: 60px; }
@media (min-width: 900px) { .topbar { margin: 0 -28px 18px; padding: 14px 28px; } }
.topbar h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; gap: 8px; }
.topbar .btn.ghost { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); border-radius: 10px; border: 0;
  background: rgba(255,255,255,.12); color: #fff; font-size: 1.5rem; text-decoration: none; cursor: pointer; }
.icon-btn.plain { background: var(--bg); color: var(--navy); font-size: 1rem; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 16px; border-radius: 12px; border: 2px solid transparent;
  font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; width: 100%; }
.btn.small { min-height: var(--tap); padding: 6px 12px; width: auto; font-size: .88rem; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.secondary { background: var(--blue); color: #fff; }
.btn.ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--danger); border-color: #f1c3bf; margin-top: 4px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0 0 0 8px; font: inherit; color: var(--blue); cursor: pointer; min-height: 0; }
.danger-link { color: var(--danger); }
.field { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
/* 16px text in every box: smaller makes iPhone Safari zoom in and leave the page wider than the screen */
input, select, textarea { display: block; width: 100%; max-width: 100%; min-width: 0; margin-top: 5px; min-height: var(--tap); padding: 10px 12px; font: inherit; font-size: 16px; font-weight: 400; color: var(--text);
  border: 2px solid var(--line); border-radius: 10px; background: #fff; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.form-grid > * { min-width: 0; }
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; text-align: left; } /* iPhone date boxes otherwise ignore the width */
html, body { overflow-x: hidden; overflow-x: clip; max-width: 100%; } /* clip keeps sticky panels working */
.form-grid .field { grid-column: 1 / -1; } .form-grid .field.half { grid-column: span 1; } .form-grid .full { grid-column: 1 / -1; }
.error-text { color: var(--danger); font-weight: 600; font-size: .9rem; margin: 4px 0 10px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Cards & lists */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 3px rgba(15,42,74,.08); margin-bottom: 14px; }
.section-h { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 10px; }
.section-h h2 { margin: 0; }
.list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.row-card { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; min-height: 60px; background: #fff; border-radius: 12px;
  border: 1px solid var(--line); text-decoration: none; color: inherit; }
.row-card:hover { border-color: var(--blue); }
.rc-main { min-width: 0; } .rc-main .muted { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.rc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.pill { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--navy); color: #fff; white-space: nowrap; }
.pill.soft { background: var(--soft); color: var(--blue); }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.empty.small { padding: 12px; }
.loading { padding: 30px; text-align: center; color: var(--muted); }
.searchbar { margin-bottom: 10px; } .searchbar input { margin: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.chip { flex: 0 0 auto; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font: 600 .85rem 'Open Sans', sans-serif; color: var(--navy); cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Status colors */
.status { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--navy); white-space: nowrap; }
.st-lead { background: #E8EEF6; color: #334E6E; }
.st-inspection-scheduled { background: #FFF3D6; color: #8A5A00; }
.st-estimate-sent { background: #E3ECFF; color: #2347A8; }
.st-sold { background: #DDF3E7; color: var(--ok); }
.st-scheduled { background: #E6F4F1; color: #0F6B5C; }
.st-in-progress { background: #F3E8FF; color: #6B2FA8; }
.st-complete { background: #DFF5DF; color: #24702A; }
.st-lost { background: #F6E1DF; color: var(--danger); }
.status-select { font-weight: 700; }

/* Contact / job pages */
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 18px; }
.col-main, .col-side { min-width: 0; }
@media (min-width: 1000px) { .cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.qbtn { flex: 1 1 70px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; padding: 8px; border-radius: 12px; background: var(--bg);
  text-decoration: none; color: var(--navy); font-size: 1.2rem; }
.qbtn span { font: 700 .75rem 'Montserrat', sans-serif; }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; margin: 8px 0 0; }
.facts dt { color: var(--muted); font-size: .85rem; } .facts dd { margin: 0; overflow-wrap: anywhere; }
.prop-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.prop-actions { display: flex; gap: 6px; }
.card.soon { border: 2px dashed var(--line); box-shadow: none; background: transparent; }
.note-add textarea { margin: 0 0 8px; }
.note-add { margin-bottom: 10px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0; border-top: 1px solid var(--line); }
.timeline li.sys .tl-body { color: var(--muted); font-style: italic; font-size: .9rem; }

/* Sheets & dialogs */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15,42,74,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; background: #fff; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); }
@media (min-width: 700px) { .backdrop { align-items: center; } .sheet { border-radius: 18px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; }
.dialog { background: #fff; border-radius: 16px; padding: 20px; margin: 16px; max-width: 420px; width: 100%; align-self: center; }
.toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; font-weight: 600; max-width: 90vw; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* Sign in */
.auth { max-width: 420px; margin: 0 auto; padding: calc(40px + env(safe-area-inset-top, 0px)) 4px 40px; }
.auth-logo { width: 220px; display: block; margin: 0 auto 18px; }
.auth h1 { text-align: center; margin-bottom: 10px; color: var(--navy); }

/* Appointment colors (by type) */
.k-inspection { --k: #2B7DB3; --kbg: #E3F0FA; }
.k-estimate { --k: #D9730D; --kbg: #FDEEDC; }
.k-install { --k: #1E7F4F; --kbg: #DDF3E7; }
.k-followup { --k: #7A3FB8; --kbg: #F1E6FB; }
.k-other { --k: #5B6778; --kbg: #EDF0F4; }
.kind-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--k, #5B6778); flex: 0 0 auto; }
.danger-text { color: var(--danger) !important; }

/* Appointments on a job */
.appts { display: flex; flex-direction: column; gap: 10px; }
.appt { border-left: 5px solid var(--k); background: var(--kbg); border-radius: 10px; padding: 10px 12px; }
.appt.done, .appt.canceled { opacity: .6; }
.appt.canceled b { text-decoration: line-through; }
.appt-main { display: flex; gap: 10px; align-items: flex-start; } .appt-main .kind-dot { margin-top: 6px; }
.appt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.appt-actions .btn { background: #fff; }

/* Calendar */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-nav { display: flex; gap: 6px; } .cal-nav .btn { min-width: 44px; }
.cal-title { flex: 1; margin: 0; min-width: 160px; }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.seg-b { min-height: 40px; min-width: 64px; display: flex; align-items: center; justify-content: center; padding: 0 12px; text-decoration: none; color: var(--navy); font: 700 .85rem 'Montserrat', sans-serif; }
.seg-b.on { background: var(--navy); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; font-size: .82rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }

.ev { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--k); background: var(--kbg); color: var(--text);
  border-radius: 6px; padding: 4px 6px; font: 600 .8rem 'Open Sans', sans-serif; cursor: pointer; min-height: 26px; }
.ev:hover { filter: brightness(.97); outline: 2px solid var(--k); }
.ev .ev-time { color: var(--k); font-weight: 700; }
.ev .ev-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.ev .ev-sub { flex-basis: 100%; color: var(--muted); font-weight: 400; font-size: .78rem; }
.ev.done { opacity: .55; } .ev.done .ev-text { text-decoration: line-through; }

.month { background: #fff; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,42,74,.08); overflow: hidden; }
.dow, .mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dow div { padding: 8px 6px; font: 700 .75rem 'Montserrat', sans-serif; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
.mday { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mday:nth-child(7n) { border-right: 0; }
.mday.out { background: #F8FAFC; } .mday.out .mnum { color: #A3AEBC; }
.mnum { align-self: flex-end; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 30px; border-radius: 50%; text-decoration: none; color: var(--navy); font: 700 .85rem 'Montserrat', sans-serif; }
.mday.today .mnum { background: var(--navy); color: #fff; }
.mevents { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.more { font-size: .75rem; font-weight: 700; color: var(--blue); text-decoration: none; padding-left: 4px; }
.mdots { display: none; gap: 3px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 699px) {
  /* phones: month shows colored dots; tap the date to see the day */
  .mday { min-height: 58px; padding: 2px; }
  .mevents { display: none; } .mdots { display: flex; }
  .mnum { align-self: center; min-width: 40px; min-height: 40px; }
}
.week { display: grid; gap: 10px; }
@media (min-width: 900px) { .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; background: #fff; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,42,74,.08); overflow: hidden; }
  .wday { border-right: 1px solid var(--line); min-height: 360px; } .wday:last-child { border-right: 0; } }
.wday { background: #fff; border-radius: 12px; padding: 8px; }
@media (min-width: 900px) { .wday { border-radius: 0; } }
.wday.today { background: #F4F9FE; }
.wh { display: flex; align-items: center; gap: 6px; min-height: 40px; text-decoration: none; color: var(--navy); }
.wday.today .wh b { color: var(--blue); }
.wevents { display: flex; flex-direction: column; gap: 6px; }
.dayview { display: flex; flex-direction: column; gap: 10px; }
.dayview h3 { margin: 4px 0; font-size: 1rem; }
.dayview .ev, .wevents .ev { font-size: .9rem; padding: 8px 10px; min-height: 44px; }

/* Event preview */
.dialog.preview { position: relative; overflow: hidden; padding-top: 26px; }
.pv-band { position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--k); }
.pv-actions { display: grid; gap: 8px; margin-top: 14px; }

/* Board: all columns side by side; scroll sideways */
.board-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-bottom: 6px; }
@media (max-width: 640px) { .board-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .board-tools input[type=search] { grid-column: 1 / -1; } }
.board-tools input, .board-tools select { margin: 0; }
.board-tools select { width: auto; max-width: 46vw; }
.board-hint { margin: 2px 0 8px; }
.board { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  height: calc(100dvh - 60px - 150px - 64px - var(--safe-b)); min-height: 380px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; cursor: grab; }
.board::-webkit-scrollbar { height: 12px; } .board::-webkit-scrollbar-thumb { background: #B9C6D6; border-radius: 6px; } .board::-webkit-scrollbar-track { background: #E2E9F1; border-radius: 6px; }
@media (min-width: 900px) { .board { margin: 0 -28px; padding-left: 28px; padding-right: 28px; height: calc(100vh - 68px - 150px); } }
.bcol { flex: 0 0 76vw; max-width: 320px; display: flex; flex-direction: column; background: #E4EBF3; border-radius: 14px; scroll-snap-align: start; min-height: 0; transition: background .15s, box-shadow .15s; }
@media (min-width: 700px) { .bcol { flex-basis: 262px; } }
.bcol.drop { background: #D3E3F4; box-shadow: inset 0 0 0 3px var(--blue); }
.bcol-h { display: flex; align-items: center; gap: 8px; padding: 10px 10px 6px; }
.bcount { font: 700 .8rem 'Montserrat', sans-serif; color: var(--muted); }
.bsum { margin-left: auto; font-weight: 700; }
.bcards { flex: 1; overflow-y: auto; padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.bempty { color: #8A97A8; font-size: .85rem; text-align: center; padding: 18px 0; border: 2px dashed #C9D4E1; border-radius: 10px; }
.bcard { display: block; background: #fff; border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--text); box-shadow: 0 1px 2px rgba(15,42,74,.12);
  cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; border: 1px solid transparent; }
.bcard:hover { border-color: var(--blue); }
.bcard.dragging { opacity: .35; }
.bcard.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; box-shadow: 0 12px 28px rgba(15,42,74,.3); cursor: grabbing; }
.bc-top { display: flex; justify-content: space-between; gap: 8px; color: var(--navy); }
.bc-val { font-weight: 700; color: var(--ok); font-size: .9rem; }
.bc-name { font-weight: 700; font-family: 'Montserrat', sans-serif; margin: 2px 0; }
.bc-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-appt { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 8px; border-radius: 8px; background: var(--kbg); color: var(--k); font-size: .8rem; font-weight: 700; }

body.wide main#app { max-width: none; }

/* Photos & documents */
.files-card { transition: box-shadow .15s, outline-color .15s; outline: 2px dashed transparent; outline-offset: -6px; }
.files-card.drop-on { outline-color: var(--blue); background: var(--soft); }
.files-card h2 .count { font-size: .8rem; color: var(--muted); font-weight: 700; margin-left: 4px; }
.files-note { margin: -4px 0 8px; }
.file-btn { cursor: pointer; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
@media (min-width: 700px) { .pgrid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; } }
.pthumb { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--soft); cursor: pointer; min-width: 0; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pthumb .noprev { display: flex; align-items: center; justify-content: center; height: 100%; font-weight: 700; color: var(--muted); font-size: .8rem; }
.pthumb .ptag { position: absolute; top: 4px; left: 4px; background: rgba(15,42,74,.85); color: #fff; font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.pthumb .pcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: .72rem; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pthumb:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.dlist { display: flex; flex-direction: column; gap: 4px; }
.drow { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); padding: 4px 0; min-width: 0; }
.drow:last-child { border-bottom: 0; }
.dmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 6px 0; }
.dicon { font-size: 1.5rem; flex: none; }
.dtext { min-width: 0; display: flex; flex-direction: column; }
.dtext b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); }
.dact { display: flex; gap: 4px; flex: none; }
.dact .icon-btn { text-decoration: none; }
.upl { margin-top: 10px; }
.upl-row { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
.upl .bar { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.upl .bar i { display: block; height: 100%; background: var(--blue); transition: width .15s; }
body.no-scroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 60; background: #060E19; display: flex; flex-direction: column; color: #fff; touch-action: pan-y; }
.v-top { display: flex; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; }
.v-count { font-weight: 700; font-family: 'Montserrat', sans-serif; padding-left: 6px; }
.v-act { display: flex; gap: 6px; }
.v-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 10px; border: 0; background: rgba(255,255,255,.12);
  color: #fff; font-size: 1.1rem; text-decoration: none; cursor: pointer; }
.v-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.v-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; user-select: none; -webkit-user-drag: none; }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 12px; background: rgba(255,255,255,.14);
  color: #fff; font-size: 2rem; cursor: pointer; }
.v-nav.prev { left: 8px; } .v-nav.next { right: 8px; }
.v-cap { padding: 10px 16px calc(14px + var(--safe-b)); text-align: center; font-size: .9rem; color: #D6E2EE; }

/* Measurements card on a job */
.m-rows { display: flex; flex-direction: column; margin-bottom: 6px; }
.m-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.m-row.m-total { border-bottom: 0; font-size: 1.05rem; color: var(--navy); }
.m-row b { white-space: nowrap; }

/* Call notes */
.note-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.timeline li.call .tl-body { border-left: 3px solid var(--blue); padding-left: 10px; }
.timeline li.call .tl-body::first-line { font-weight: 700; color: var(--navy); }
.call-hint { margin: 0 0 4px; }
.timeline .danger-link { display: inline-flex; align-items: center; min-height: 40px; min-width: 44px; padding: 0 8px; margin-left: 4px; }

/* Email */
.nav-item .ni { position: relative; }
.nbadge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #D92D20; color: #fff;
  font: 700 .68rem/18px 'Open Sans', sans-serif; text-align: center; }
.mlist { display: flex; flex-direction: column; }
.mlist.card { padding: 4px 8px; }
.mrow { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left;
  font: inherit; color: var(--text); cursor: pointer; min-width: 0; border-radius: 8px; }
.mrow:last-child { border-bottom: 0; }
.mrow:hover { background: var(--bg); }
.mdir { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; }
.mdir.in { background: #E8F3FF; color: var(--blue); } .mdir.out { background: #EAF7EF; color: var(--ok); }
.mrow.failed .mdir { background: #FEECEB; color: var(--danger); }
.mmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mtop { display: flex; justify-content: space-between; gap: 8px; }
.mtop b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow.unread .mtop b, .mrow.unread .msub { font-weight: 800; color: var(--navy); }
.mrow.unread .mdir.in { background: var(--blue); color: #fff; }
.msub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msnip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.ok { background: #EAF7EF; color: var(--ok); } .pill.bad { background: #FEECEB; color: var(--danger); }
.ok-text { color: var(--ok); }
.inbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.mail-sheet .mail-meta { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-wrap: anywhere; }
.mail-body { white-space: normal; overflow-wrap: anywhere; line-height: 1.55; }
.mail-quote { margin-top: 12px; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.mail-quote summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--blue); }
.mail-actions { margin-top: 16px; }
.file-pick { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 0; }
.file-pick legend { padding: 0 4px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; overflow-wrap: anywhere; }
.check input { width: 22px; height: 22px; flex: none; }
.sig-preview { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
button.qbtn { border: 0; font: inherit; color: var(--navy); cursor: pointer; }

/* Import */
.map-rows { display: flex; flex-direction: column; gap: 4px; }
.map-row > span { display: block; margin-bottom: 4px; }
.import-done { margin-top: 12px; }
.import-done ul { padding-left: 18px; margin: 6px 0; overflow-wrap: anywhere; }
.mrow { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mrow.pressing { background: var(--soft); }
.mlist.selecting .mrow { padding-left: 40px; position: relative; }
.mlist.selecting .mrow::before { content: ''; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.mlist.selecting .mrow.picked { background: #E8F3FF; }
.mlist.selecting .mrow.picked::before { background: var(--blue); border-color: var(--blue); box-shadow: inset 0 0 0 3px #fff; }
.sel-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; }
.sel-bar > span { flex: 1; min-width: 90px; }
.sel-bar .btn.ghost { background: rgba(255,255,255,.14); color: #fff; border-color: transparent; }
.inbox-btns { display: flex; gap: 8px; }
.inbox-tip { margin-top: 10px; }

/* ---------- Proposal editor ---------- */
.grow { flex: 1; min-width: 0; }
.pe-head .pe-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.pe-head-act { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pe-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 900px) { .pe-grid { grid-template-columns: 330px minmax(0, 1fr); align-items: start; } }
.pe-grid.one-page .pe-left { display: none; }
.pe-pages { display: flex; flex-direction: column; gap: 6px; }
.pe-pg { display: flex; align-items: center; gap: 6px; background: var(--card); border-radius: 12px; padding: 4px 6px 4px 4px; box-shadow: 0 1px 3px rgba(15,42,74,.08); border: 2px solid transparent; min-width: 0; }
.pe-pg.sel { border-color: var(--blue); }
.pe-pg.off { opacity: .55; }
.pe-pg-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; font: inherit; color: var(--text); padding: 8px 4px; cursor: pointer; min-height: 48px; }
.pe-pg-t { display: flex; flex-direction: column; min-width: 0; }
.pe-pg-t b, .pe-pg-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-ico { font-size: 1.25rem; width: 28px; text-align: center; flex: none; }
.pe-pg-act { display: flex; align-items: center; gap: 2px; flex: none; }
.pe-pg-act .icon-btn { min-width: 40px; }
.icon-btn:disabled { opacity: .3; }
.switch { position: relative; display: inline-flex; width: 52px; height: 44px; align-items: center; cursor: pointer; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { width: 44px; height: 26px; border-radius: 99px; background: #CBD5E1; position: relative; transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.pe-add { margin-top: 6px; }
.pe-back { margin-bottom: 8px; }
.pe-ed-head { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pe-ed-head .pe-ico { margin-bottom: 14px; }
.pe-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.pe-cover-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.pe-cover-pick img { width: 160px; height: 100px; object-fit: cover; border-radius: 10px; background: var(--soft); }
.pe-nophoto { width: 160px; height: 100px; border-radius: 10px; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.pe-insp { display: flex; flex-direction: column; gap: 14px; margin: 10px 0; }
.pe-insp-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
@media (min-width: 700px) { .pe-insp-item { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; } }
.pe-insp-photo { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--soft); cursor: pointer; display: block; width: 100%; }
.pe-insp-photo img { width: 100%; display: block; }
.pe-insp-photo .pp-mark { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-mk-badge { position: absolute; right: 8px; bottom: 8px; background: rgba(15,42,74,.85); color: #fff; font: 700 .8rem 'Montserrat', sans-serif; padding: 6px 10px; border-radius: 99px; }
.pe-insp-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pe-row-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pe-items { display: flex; flex-direction: column; gap: 12px; margin: 10px 0; }
.pe-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pe-item.optional { border-style: dashed; background: #FFFBEB; }
.pe-item-top { display: flex; align-items: center; gap: 10px; }
.pe-item-title { flex: 1; min-width: 0; font-weight: 700; }
.pe-line-total { white-space: nowrap; color: var(--navy); }
.pe-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pe-nums label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); font-weight: 600; gap: 2px; }
.small-check { min-height: 44px; font-size: .9rem; }
.pe-totals { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-radius: 12px; background: var(--navy); color: #fff; margin-top: 12px; font-family: 'Montserrat', sans-serif; }
.pe-totals b { font-size: 1.2rem; }
.pe-addlist { display: flex; flex-direction: column; gap: 6px; }
.pe-addopt { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); background: #fff; border-radius: 12px; text-align: left; font: inherit; cursor: pointer; min-height: 56px; }
.pe-addopt span:last-child { display: flex; flex-direction: column; }
.pe-addopt:hover { background: var(--bg); }
.pe-picker .pthumb.picked { outline: 4px solid var(--blue); outline-offset: -4px; }
.pthumb .pick-mark { display: none; position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; align-items: center; justify-content: center; }
.pthumb.picked .pick-mark { display: flex; }
.pe-itemlist { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; }
.pe-itemopt { flex: none; align-items: flex-start; border-bottom: 1px solid var(--line); padding: 8px 0; } /* flex:none: in a long scrolling list the rows must not squash into each other */
.pe-itemopt input { margin-top: 4px; }
.pe-itemopt > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pe-itemdesc { display: block; }
.pe-tpl-pages { display: flex; flex-direction: column; gap: 8px; }
.pe-tpl-page { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; }
.pe-tpl-page summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; flex-wrap: wrap; }
.pe-tpl-page[open] { padding-bottom: 12px; }
code { background: var(--soft); padding: 1px 5px; border-radius: 5px; font-size: .85em; }

/* ---------- Proposal pages (preview + customer page) ---------- */
.pp-preview { position: fixed; inset: 0; z-index: 50; background: #5B6778; overflow: auto; }
.pp-preview-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; background: var(--navy); color: #fff; }
.pp-preview-bar .btn { background: rgba(255,255,255,.15); color: #fff; }
.pp-doc { max-width: 860px; margin: 0 auto; padding: 16px 12px 60px; display: flex; flex-direction: column; gap: 16px; }
.pp-doc { container-type: inline-size; }
.pp-page { min-height: calc(100cqw * 11 / 8.5); } /* always a full letter-size sheet, however little is on it */
.pp-page { position: relative; background: #fff; color: #1F2A37; border-radius: 6px; padding: 34px 28px 40px; box-shadow: 0 4px 18px rgba(0,0,0,.18); overflow: hidden; font-size: .95rem; line-height: 1.5; }
.pp-page::before { content: ''; position: absolute; left: 0; top: 0; border-style: solid; border-width: 64px 64px 0 0; border-color: var(--navy) transparent transparent transparent; }
.pp-page::after { content: ''; position: absolute; right: 0; bottom: 0; border-style: solid; border-width: 0 0 70px 70px; border-color: transparent transparent var(--blue) transparent; }
.pp-page h2 { font: 800 1.6rem 'Montserrat', sans-serif; color: var(--blue); text-transform: uppercase; margin: 6px 0 16px; letter-spacing: .02em; }
.pp-page h3 { font: 800 1.05rem 'Montserrat', sans-serif; color: var(--navy); margin: 16px 0 6px; }
.pp-page h4 { margin: 0 0 4px; font-size: .98rem; }
.pp-sub { font: 700 1rem 'Montserrat', sans-serif; margin: 18px 0 8px; }
.pp-text p { margin: 0 0 10px; } .pp-text ul, .pp-text ol { margin: 0 0 10px; padding-left: 22px; }
.pp-muted, .pp-empty { color: #5B6778; }
.pp-cover { padding: 0; }
.pp-cover::before { display: none; }
.pp-cover-logos { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; }
.pp-cover-logos img { max-height: 70px; max-width: 42%; object-fit: contain; }
.pp-cover-logos .pp-logo-l { object-position: left center; }
.pp-cover-logos .pp-logo-r { object-position: right center; max-height: 66px; }
.pp-photo { position: relative; background: #EEF3F8; }
.pp-photo img { display: block; width: 100%; height: auto; }
.pp-photo .pp-mark { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pp-photo.hero { overflow: hidden; }
.pp-photo.missing { padding: 30px; text-align: center; color: #5B6778; }
.pp-cover-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 24px 28px 70px; background: #F2F5F9; }
@media (min-width: 640px) { .pp-cover-info { grid-template-columns: 1.1fr 1fr; } }
.pp-cover-left h1 { font: 500 1.6rem 'Montserrat', sans-serif; color: var(--navy); text-transform: uppercase; margin: 0; line-height: 1.15; }
.pp-date { color: #5B6778; font-size: .82rem; margin: 6px 0 12px; text-transform: uppercase; }
.pp-services, .pp-contact { font-size: .85rem; margin: 0 0 10px; }
.pp-cover-right { border-left: 3px solid var(--navy); padding-left: 14px; }
.pp-cover-right h2 { color: var(--navy); font-size: 1.25rem; margin: 0 0 4px; }
.pp-insp { display: flex; flex-direction: column; gap: 22px; }
.pp-insp-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
/* PC: photo on the left, text beside it - and once the text passes the bottom of the photo it uses the full width
   underneath (no tall skinny column pushing the next photo down) */
@media (min-width: 640px) {
  .pp-insp-item { display: flow-root; }
  .pp-insp .pp-insp-item > .pp-photo { float: left; width: 64%; margin: 0 18px 10px 0; }
  .pp-insp-item > .pp-insp-text { display: block; }
  .pp-insp-item .pp-insp-text h4 { margin-top: 0; }
}
.pp-insp-item .pp-photo { border-radius: 4px; overflow: hidden; }
.pp-tier { font-size: .75rem; vertical-align: middle; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--blue); }
.pp-items { display: flex; flex-direction: column; }
.pp-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 10px; border-bottom: 1px solid #E2E8F0; }
.pp-item:nth-child(odd) { background: #F6F8FB; }
@media (min-width: 640px) { .pp-item { grid-template-columns: minmax(0, 1fr) 330px; } }
.pp-item.optional { background: #FFFBEB; }
.pp-desc { color: #4B5563; font-size: .88rem; margin-top: 4px; }
.pp-item-nums { display: grid; grid-template-columns: 50px 60px 90px 100px; gap: 6px; justify-content: end; text-align: right; font-size: .9rem; align-self: start; }
.pp-opt-tag { font-size: .72rem; background: #FDE68A; color: #92400E; padding: 2px 8px; border-radius: 99px; font-weight: 700; }
.pp-opt-pick { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; color: var(--navy); cursor: pointer; }
.pp-opt-pick input { width: 22px; height: 22px; }
.pp-totals { margin: 16px 0 0 auto; max-width: 320px; display: flex; flex-direction: column; gap: 4px; }
.pp-totals div { display: flex; justify-content: space-between; gap: 16px; }
.pp-totals .grand { border-top: 2px solid var(--navy); padding-top: 6px; font-size: 1.1rem; }
.pp-sign-opts { display: flex; flex-direction: column; gap: 8px; }
.pp-sign-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border: 2px solid #E2E8F0; border-radius: 12px; min-height: 52px; cursor: pointer; }
.pp-sign-opt.on { border-color: var(--blue); background: #EFF6FF; }
.pp-sign-opt > span:not(.pp-box) { flex: 1; font-weight: 700; }
.pp-sign-opt .pp-box, .pp-upgrade .pp-box { flex: none; }
.pp-sign-opt input { width: 22px; height: 22px; }
.pp-box { width: 18px; height: 18px; border: 2px solid #1F2A37; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.pp-sign-who { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 14px 0; }
.pp-sign-who span { display: block; font-size: .8rem; color: #5B6778; }
.pp-deposit { display: flex; gap: 16px; justify-content: space-between; background: #F2F5F9; padding: 12px 14px; border-radius: 8px; font-size: .9rem; }
.pp-deposit p { margin: 0; flex: 1 1 auto; min-width: 0; }
.pp-deposit b { flex: none; align-self: center; white-space: nowrap; font-size: 1.1rem; }
.pp-deposit-amt { margin: 8px 0 16px; color: var(--navy); }
.pp-comments { width: 100%; }
.pp-comments-box { min-height: 70px; border: 1px solid #1F2A37; padding: 8px; max-width: 420px; white-space: pre-wrap; }
.pp-sigline { margin-top: 30px; }
.pp-sig { max-height: 80px; max-width: 280px; display: block; }
.pp-sig-blank { height: 50px; }
.pp-sig-row { display: flex; justify-content: space-between; border-top: 1px solid #1F2A37; padding-top: 6px; font-weight: 700; font-size: .9rem; }
.pp-pdf-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 12px; background: var(--soft); color: var(--navy); font-weight: 700; text-decoration: none; }

/* ---------- Photo markup editor ---------- */
.mk { position: fixed; inset: 0; z-index: 70; background: #0B1220; display: flex; flex-direction: column; color: #fff; }
.mk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; }
.mk-top .btn.ghost { background: rgba(255,255,255,.12); color: #fff; }
.mk-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px; }
.mk-wrap { position: relative; touch-action: none; }
.mk-wrap img, .mk-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.mk-wrap canvas { cursor: crosshair; }
.mk-tools { padding: 8px 8px calc(10px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; background: #111A2E; }
.mk-row { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.mk-tool { min-width: 52px; min-height: 52px; border-radius: 12px; border: 0; background: rgba(255,255,255,.1); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.15rem; cursor: pointer; }
.mk-tool small { font-size: .65rem; }
.mk-tool.on { background: var(--blue); }
.mk-color { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); cursor: pointer; }
.mk-color.on { border-color: #fff; box-shadow: 0 0 0 3px var(--blue); }
.mk-textbox { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); display: flex; gap: 8px; background: #fff; padding: 10px; border-radius: 12px; width: min(92vw, 420px); }
.mk-textbox input { flex: 1; color: #1F2A37; }
.pe-mode { border: 0; padding: 0; margin: 12px 0 4px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.pe-mode legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.pe-mode-opt { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; min-height: 56px; }
.pe-mode-opt.on { border-color: var(--blue); background: #EFF6FF; }
.pe-mode-opt input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.pe-mode-opt > span { display: flex; flex-direction: column; }
.pe-h3 { font: 700 1rem 'Montserrat', sans-serif; color: var(--navy); margin: 18px 0 2px; }
.pp-upgrades { display: flex; flex-direction: column; gap: 8px; }
.pp-upgrade { display: flex; gap: 12px; align-items: flex-start; border: 2px dashed #E2E8F0; border-radius: 12px; padding: 12px; cursor: pointer; }
.pp-upgrade.on { border-style: solid; border-color: var(--ok); background: #F0FDF4; }
.pp-upgrade input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.pp-up-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pp-upgrade > b { white-space: nowrap; }
.pp-sign-opt.static { cursor: default; }
.pp-sum { margin: 16px 0 0 auto; max-width: 340px; display: flex; flex-direction: column; gap: 4px; }
.pp-sum div { display: flex; justify-content: space-between; gap: 16px; }
.pp-sum .grand { border-top: 2px solid var(--navy); padding-top: 6px; font-size: 1.15rem; }
.pp-choose { display: block; width: 100%; margin-top: 14px; min-height: 52px; border-radius: 12px; border: 2px solid var(--blue); background: #fff; color: var(--blue); font: 800 1rem 'Montserrat', sans-serif; cursor: pointer; }
.pp-choose.on { background: var(--blue); color: #fff; }
.small { font-size: .85rem; }

/* straight quote vs multiple options */
.pe-quote-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pe-head-total { display: flex; flex-direction: column; }
.pe-head-total b { font-size: 1.35rem; color: var(--navy); }
.pe-multi { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; }
.pe-multi > span:first-child { display: flex; flex-direction: column; text-align: right; }
@media (max-width: 520px) { .pe-multi > span:first-child { text-align: left; } .pe-multi { width: 100%; justify-content: space-between; } }
/* live preview + View page: real PDF sheets */
@media (min-width: 1250px) {
  .pe-grid.with-live { grid-template-columns: 270px minmax(0, 1fr) minmax(0, 1fr); }
  .pe-live { position: sticky; top: 84px; max-height: calc(100vh - 96px); overflow: auto; background: #5B6778; border-radius: 14px; padding: 10px; }
}
.pe-live-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #fff; padding: 2px 4px 8px; }
.pe-live-h .muted { color: #E2E8F0; }
.pv-doc { display: flex; flex-direction: column; gap: 12px; min-height: 200px; }
.pv-sheet { display: block; width: 100%; height: auto; background: #fff; border-radius: 3px; box-shadow: 0 3px 14px rgba(0,0,0,.25); }
.pv-big { background: #5B6778; border-radius: 14px; padding: 12px; }
.pv-big .pv-doc { max-width: 860px; margin: 0 auto; }
.pv-cap { color: #E2E8F0; max-width: 860px; margin: 0 auto 10px; }
.pe-upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.sheet.drop-on { outline: 3px dashed var(--blue); outline-offset: -6px; }
.btn.nowrap { white-space: nowrap; }
/* signature on the warranty page */
.pp-owner-sig { display: block; height: 58px; width: auto; max-width: 240px; margin: 4px 0 -6px; }
/* included PDFs: every page shown full size */
.pp-page.pp-pdf { background: none; box-shadow: none; padding: 0; min-height: 0; border-radius: 0; overflow: visible; }
.pp-page.pp-pdf::before, .pp-page.pp-pdf::after { display: none; }
.pp-pdf-sheets { display: flex; flex-direction: column; gap: 16px; }
.pp-pdf-loading { background: #fff; border-radius: 6px; padding: 40px 24px; margin: 0; text-align: center; color: #475569; }
.pe-pdf-show { margin-top: 12px; background: #5B6778; border-radius: 12px; padding: 10px; }
/* ---------- customer's proposal page (/p/) ---------- */
body.cust { background: #5B6778; min-height: 100vh; }
.cust-top { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.15); }
.cust-logo { height: 34px; width: auto; }
.cust-top-t { margin-left: auto; font-weight: 700; color: var(--navy); }
#cust { padding: 0 0 calc(110px + var(--safe-b)); }
#cust .loading { color: #fff; }
.cust-banner { max-width: 836px; margin: 16px auto 0; background: #fff; border-radius: 10px; padding: 18px 20px; box-shadow: 0 4px 18px rgba(0,0,0,.18); }
@media (max-width: 860px) { .cust-banner { margin: 12px 12px 0; } }
.cust-banner h1 { font: 800 1.35rem 'Montserrat', sans-serif; color: var(--navy); margin: 0 0 6px; }
.cust-banner p { margin: 6px 0; }
.cust-banner.done { border-top: 6px solid var(--ok); }
.cust-banner .btn { margin-top: 8px; }
.cust-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.cust-preview { background: #FEF3C7; border-radius: 8px; padding: 8px 10px; font-size: .9rem; margin: 0 0 10px !important; }
.cust-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + var(--safe-b)); background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,.18); }
.cust-bar > div { display: flex; flex-direction: column; min-width: 0; }
.cust-bar b { font-size: 1.3rem; color: var(--navy); }
body.cust .toast { bottom: calc(90px + var(--safe-b)); }
.cust-sign { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.cust-pad-wrap { position: relative; border: 2px dashed #94A3B8; border-radius: 12px; background: #F8FAFC; }
.cust-pad { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.cust-pad-hint { position: absolute; left: 16px; bottom: 14px; color: #94A3B8; font: 700 1.1rem 'Montserrat', sans-serif; pointer-events: none; }
.cust-pad-clear { position: absolute; right: 6px; top: 6px; }
.cust-accept { min-height: 56px; font-size: 1.1rem; }
/* proposal sending / signed details in the editor */
.pe-send-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.pe-track { font-size: .9rem; color: var(--muted); }
.pe-signed { margin-top: 12px; padding: 12px; border-radius: 12px; background: #ECFDF5; border: 1px solid #A7F3D0; }
.pe-signed img { max-height: 54px; max-width: 220px; display: block; margin: 6px 0; background: #fff; border-radius: 6px; }
html.cust-html { background: #5B6778; }
.cust-bar > div { flex: 1; }
.cust-bar b { white-space: nowrap; }
.cust-bar .btn { flex: none; width: auto; padding-left: 18px; padding-right: 18px; }
.update-btn { position: fixed; left: 50%; transform: translateX(-50%); top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 70; background: var(--blue); color: #fff; border: 0; border-radius: 99px; padding: 12px 18px; font-weight: 700; min-height: 44px; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer; }
.pp-opt-pick.on { color: var(--ok); }
.pp-opt-tag.added { background: #D1FAE5; color: var(--ok); }
.pp-preview-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* customer signature: draw or type */
.cust-sig-how { display: flex; flex-direction: column; gap: 6px; }
.cust-sig-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cust-sig-tabs button { border: 2px solid var(--line); border-radius: 12px; background: #fff; min-height: 56px; padding: 8px 10px; font: 700 .98rem 'Open Sans', sans-serif; color: var(--navy); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.cust-sig-tabs button small { font-weight: 400; font-size: .8rem; color: var(--muted); }
.cust-sig-tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.cust-sig-tabs button.on small { color: #CBD5E1; }
.cust-typed { display: flex; flex-direction: column; gap: 8px; }
.cust-typed-show { min-height: 110px; display: flex; align-items: center; padding: 8px 16px; border: 2px dashed #94A3B8; border-radius: 12px; background: #F8FAFC; font: 3.4rem 'Great Vibes', cursive; color: #14203A; overflow: hidden; white-space: nowrap; }
.cust-sig-styles { display: flex; flex-wrap: wrap; gap: 8px; }
.cust-sig-styles button { flex: 1 1 150px; min-height: 52px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: #14203A; font-size: 1.7rem; cursor: pointer; padding: 2px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-sig-styles button.on { border-color: var(--blue); background: #EFF6FF; }
@media (max-width: 520px) { .cust-sig-styles button { flex-basis: 100%; } }

/* money badges on board cards + job rows */
.mbs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.row-card .mbs { flex-basis: 100%; margin-top: 2px; }
.mb { font-size: .74rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.mb.ok { background: #DCFCE7; color: #166534; }
.mb.warn { background: #FEF3C7; color: #92400E; }
.mb.info { background: #DBEAFE; color: #1E40AF; }
.mb.soft { background: #EEF2F7; color: #475569; }
.pill.warn { background: #FEF3C7; color: #92400E; }
@media (max-width: 520px) { .hide-sm { display: none; } }
/* payments */
.pay-list { display: flex; flex-direction: column; gap: 6px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pay-main { min-width: 0; }
.pe-dep { margin-top: 10px; padding-top: 10px; border-top: 1px solid #A7F3D0; display: flex; flex-direction: column; gap: 8px; }
.pe-dep-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* invoice editor */
.iv-grid { max-width: 900px; }
.iv-totals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.iv-tot { flex: 1 1 140px; display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.iv-tot span { font-size: .85rem; color: var(--muted); }
.iv-tot b { font-size: 1.25rem; color: var(--navy); }
.iv-tot.grand { background: var(--navy); }
.iv-tot.grand span, .iv-tot.grand b { color: #fff; }
.iv-tot.grand.paid { background: var(--ok); }
.iv-send-sum { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
/* invoice page */
.inv-page { font-size: .95rem; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 10px 0 20px; }
.inv-logo { height: 56px; width: auto; max-width: 55%; object-fit: contain; }
.inv-title { text-align: right; }
.inv-title h2 { margin: 0 !important; }
.inv-title div { font-weight: 800; color: var(--navy); }
.inv-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.inv-meta span { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; color: #64748B; margin-top: 4px; }
.inv-meta b { display: block; color: #1F2A37; }
.inv-items { border-top: 2px solid var(--navy); }
.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, auto) minmax(90px, auto) minmax(100px, auto); gap: 8px; padding: 9px 4px; border-bottom: 1px solid #E2E8F0; }
.inv-row > span:not(:first-child) { text-align: right; white-space: nowrap; }
.inv-row small { display: block; color: #64748B; margin-top: 2px; }
.inv-th { font-weight: 800; font-size: .8rem; text-transform: uppercase; color: #475569; background: #F1F5F9; }
@media (max-width: 560px) { .inv-row { grid-template-columns: minmax(0, 1fr) minmax(90px, auto); } .inv-row > span:nth-child(2), .inv-row > span:nth-child(3) { display: none; } }
.inv-totals { margin: 16px 0 0 auto; max-width: 360px; display: flex; flex-direction: column; gap: 6px; }
.inv-totals > div { display: flex; justify-content: space-between; gap: 10px; }
.inv-paid { color: #166534; font-size: .9rem; }
.inv-totals .grand { background: var(--navy); color: #fff; border-radius: 8px; padding: 10px 12px; font-size: 1.1rem; }
.inv-paid-stamp { margin: 16px 0 0; color: #166534; font: 800 1.4rem 'Montserrat', sans-serif; letter-spacing: .08em; }
.inv-notes { margin-top: 18px; padding: 10px 12px; background: #F8FAFC; border-radius: 8px; color: #475569; }
.inv-thanks { margin-top: 18px; font-weight: 700; color: var(--navy); }

/* framed photos (fixed shape, zoom/pan picks what shows) */
.pp-photo.pp-framed { position: relative; overflow: hidden; width: 100%; }
.pp-crop { position: absolute; }
.pp-crop img { display: block; width: 100% !important; height: 100% !important; max-width: none; }
.pp-crop .pp-mark { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-insp-pic { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pe-cover-frame { width: 240px; border-radius: 10px; overflow: hidden; }
.ce-stage { display: flex; align-items: center; justify-content: center; }
.ce-frame { position: relative; overflow: hidden; touch-action: none; cursor: grab; box-shadow: 0 0 0 2px #fff, 0 0 0 9999px rgba(0,0,0,.55); background: #222; }
.ce-frame:active { cursor: grabbing; }
.ce-in { position: absolute; }
.ce-in img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.ce-in .pp-mark { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ce-tools { background: #0F172A; color: #fff; padding: 10px 14px calc(12px + var(--safe-b)); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ce-zoom { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 520px; }
.ce-zoom input[type=range] { flex: 1; min-height: 44px; margin: 0; padding: 0; border: 0; background: none; }
.ce-help { margin: 0; font-size: .85rem; color: #CBD5E1; text-align: center; max-width: 520px; }
.ce-stage { overflow: hidden; }
/* team & logins */
.team-row { align-items: center; }
.team-row.off { opacity: .6; }
.team-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.team-act select { width: auto; margin: 0; }
.team-roles { margin-top: 12px; }
.team-roles summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.role-pick, .crew-pick { border: 0; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.role-pick legend, .crew-pick legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.role-opt:has(input:checked) { border-color: var(--blue); background: #EFF6FF; }
.role-opt input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.role-opt > span { display: flex; flex-direction: column; }

/* Google review requests */
.rv-stars { color: #F5B301; letter-spacing: 1px; font-size: .95em; margin-right: 4px; }
.rv-card { border-left: 4px solid #F5B301; }
.rv-card p { margin: 6px 0; }
.rv-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.rv-btns .btn { width: auto; }
.rv-banner { display: flex; gap: 10px; align-items: flex-start; background: #FFF8E1; border: 1px solid #F3D98B; border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
.rv-banner .rv-stars { font-size: 1.4rem; line-height: 1; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rv-chip { background: #fff; border: 1px solid #F0D27A; border-radius: 999px; padding: 4px 10px; font-size: .82rem; font-weight: 700; text-decoration: none; color: var(--navy); }
.rv-sheet { max-width: 1100px; }
.rv-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .rv-grid { grid-template-columns: minmax(300px, 380px) 1fr; align-items: start; } .rv-prev { position: sticky; top: 0; } }
.rv-warn { background: #FFF4E5; border: 1px solid #F5C77E; color: #7A4B00; border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.rv-when { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 6px 0 4px; }
.rv-when legend { font-weight: 700; padding: 0 4px; }
.rv-radio { display: flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 600; }
.rv-radio input { width: 20px; height: 20px; }
.rv-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.rv-quick .btn { width: auto; }
.rv-quick .btn.on { background: var(--navy); color: #fff; }
.rv-frame-wrap { background: #EEF2F7; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rv-inbox { padding: 6px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.rv-frame { display: block; width: 100%; height: 760px; border: 0; background: #EEF2F7; }
.rv-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.rv-toggle input { width: 22px; height: 22px; }
.rv-help { margin: -4px 0 12px; } .rv-help summary { cursor: pointer; color: var(--blue); min-height: 36px; display: flex; align-items: center; }
.rv-help ol { padding-left: 20px; margin: 4px 0; } .rv-help li { margin: 4px 0; }
.rv-badge-row { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.rv-badge-row p { margin: 4px 0; }
.rv-badge-img { display: block; max-width: 200px; max-height: 90px; margin: 8px 0; }

/* calendar: add from a day, reschedule, drag */
.mtop { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.madd { min-width: 30px; min-height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--blue); font-size: 1.1rem; font-weight: 700; cursor: pointer; opacity: 0; }
.mday:hover .madd, .madd:focus-visible { opacity: 1; background: var(--soft); }
.mday { cursor: pointer; }
.mday.drop, .wday.drop { background: #D3E3F4 !important; box-shadow: inset 0 0 0 2px var(--blue); }
.ev.dragging { opacity: .45; }
.ev[draggable="true"] { cursor: grab; }
.wtop { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.madd-w { width: auto; }
@media (max-width: 899px) { .madd { display: none; } }
.ca-dayadd { display: flex; flex-wrap: wrap; gap: 8px; }
.ca-dayadd .btn { width: auto; flex: 1 1 220px; }
.ca-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.ca-row { display: flex; gap: 8px; align-items: center; } .ca-row .ev { flex: 1; min-height: 44px; } .ca-row .btn { width: auto; flex: none; }
.ca-h { margin: 14px 0 8px; font-size: 1rem; }
.ca-actions { display: flex; flex-direction: column; gap: 10px; }
.ca-big { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; min-height: 64px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); font: inherit; cursor: pointer; }
.ca-big:hover { border-color: var(--blue); background: #F7FAFD; }
.ca-big > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.ca-ico { font-size: 1.6rem; }
.ca-results { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 50vh; overflow: auto; }
.ca-pick { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--text); cursor: pointer; }
.ca-pick:hover { border-color: var(--blue); }
.ca-jobs { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px 10px; margin: 0 0 10px; min-width: 0; }
.ca-jobs legend { font-weight: 700; padding: 0 4px; }
.ca-jobs .status { margin-left: 4px; }
.ca-scroll { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; }
.ca-job { flex: none; display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; min-height: 48px; }
.ca-job input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.ca-job > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ca-job:has(input:checked) { border-color: var(--navy); background: #F4F7FB; }
.form-grid.tight { margin: 0; }

/* calendar: "Show on calendar" checklist (sidebar on a PC, fold-out on a phone) */
.cal-wrap { display: flex; flex-direction: column; gap: 12px; }
.cal-main { min-width: 0; flex: 1; }
@media (min-width: 900px) { .cal-wrap { flex-direction: row; align-items: flex-start; } .cal-filter { flex: 0 0 250px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; } }
.cf { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 10px; }
.cf > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.cf > summary::-webkit-details-marker { display: none; }
.cf > summary::after { content: '▾'; color: var(--muted); } .cf[open] > summary::after { content: '▴'; }
.cf > summary .muted { margin-left: auto; }
.cf-reset { width: 100%; margin: 2px 0 6px; }
.cf-group { border-top: 1px solid var(--line); padding: 6px 0 4px; }
.cf-h { display: flex; align-items: center; gap: 4px; min-height: 40px; font-size: .85rem; }
.cf-h b { flex: 1; }
.cf-h .link { padding: 0 6px; min-height: 40px; min-width: 44px; font-size: .82rem; }
.cf-row { display: flex; align-items: center; gap: 4px; }
.cf-check { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; font-size: .9rem; min-width: 0; }
.cf-check input { width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; flex: none; accent-color: var(--navy); }
.cf-label { flex: 1; min-width: 0; line-height: 1.25; }
.cf-n { color: var(--muted); font-size: .78rem; min-width: 18px; text-align: right; }
.cf-sw.status { padding: 0; width: 12px; height: 12px; border-radius: 4px; flex: none; border: 1px solid rgba(0,0,0,.12); }
.cf-only { border: 0; background: transparent; color: var(--blue); font: 600 .78rem inherit; min-height: 40px; min-width: 40px; padding: 0 4px; cursor: pointer; opacity: .0; }
.cf-row:hover .cf-only, .cf-only:focus-visible { opacity: 1; }
@media (pointer: coarse) { .cf-only { opacity: 1; } }
.cf-done { border-top: 1px solid var(--line); padding-top: 4px; }
@media (pointer: fine) { .cf-check { min-height: 34px; } .cf-only { min-height: 34px; } .cf-h, .cf-h .link { min-height: 34px; } }
.madd-w { min-height: 34px; min-width: 34px; padding: 0 8px; font-size: .8rem; }
@media (min-width: 900px) and (max-width: 1400px) { .madd-w .madd-t { display: none; } }

/* nav: any number of items; short label on the phone bar */
.nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.nl-short { display: inline; } .nl-long { display: none; }
@media (min-width: 900px) { .nav { grid-auto-flow: row; } .nl-short { display: none; } .nl-long { display: inline; } }
@media (max-width: 420px) { .nav-item { font-size: .7rem; } }

/* completed jobs */
.done-sum { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.done-sum > div { flex: 1 1 140px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; }
.done-sum b { font: 800 1.35rem 'Montserrat', sans-serif; color: var(--navy); }
.done-month { margin: 18px 0 8px; font-size: .95rem; color: var(--muted); }
.done-card { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; text-decoration: none; color: var(--text); }
.done-card:hover { border-color: var(--blue); }
.dc-main { flex: 1; min-width: 0; }
.dc-top { display: flex; justify-content: space-between; gap: 8px; }
.dc-badges { display: flex; flex-wrap: wrap; gap: 0 6px; }
.dc-badges .mbs { margin-top: 6px; }
.dc-when { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; min-width: 70px; }
.board-tools .seg { flex-wrap: wrap; } .board-tools .seg-b { border: 0; background: #fff; cursor: pointer; }
.board-tools .seg-b.on { background: var(--navy); color: #fff; }

/* settings: storage bars */
.st-row { margin: 10px 0 14px; }
.st-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.st-bar { height: 14px; border-radius: 999px; background: #E6ECF3; overflow: hidden; }
.st-bar i { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .4s; }
.st-bar i.warm { background: #E3A008; } .st-bar i.hot { background: var(--danger); }
@media (max-width: 699px) { .board-tools .seg { width: 100%; flex-wrap: nowrap; } .board-tools .seg-b { flex: 1 1 auto; min-width: 48px; padding: 0 8px; font-size: .78rem; text-align: center; } }
.team-default { margin-top: 14px; } .team-default .muted { display: block; margin-top: 4px; font-weight: 400; }

/* long words, links and numbers wrap inside their box instead of running out of it */
body { overflow-wrap: break-word; }
.card, .sheet, .dialog, .bcard, .row-card, .done-card, .appt, .timeline li, .tl-body, .pp-page, .pe-head, .pay-row, .cf, .ev, .mrow, .done-sum, .pp-item-main, .pp-up-main, .inv-row > span:first-child { overflow-wrap: anywhere; }
.appt-main > div, .rc-main, .pay-main, .dc-main, .pp-item-main, .pp-up-main, .tl-body { min-width: 0; }
.row-card > .rc-main { flex: 1 1 200px; }
.pay-main { flex: 1; }
/* items in scrolling lists keep their full height (never squashed on top of each other) */
.bcards > *, .pe-itemlist > *, .ca-results > *, .ca-scroll > *, .list > *, .pay-list > *, .appts > *, .ca-list > * { flex-shrink: 0; }

/* money page */
.mo-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.mo-tile { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--text); }
.mo-tile:hover { border-color: var(--blue); }
.mo-tile b { font: 800 1.6rem 'Montserrat', sans-serif; color: var(--navy); }
.mo-tile.warn b { color: #9A5B00; }
.mo-k { font-size: .78rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.mo-ytd-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 4px 0 14px; }
.mo-ytd-nums > div { display: flex; flex-direction: column; gap: 2px; }
.mo-ytd-nums b { font: 800 1.3rem 'Montserrat', sans-serif; color: var(--navy); }
.mo-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.mo-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mo-chart { position: relative; display: flex; gap: 8px; }
.mo-axis { display: flex; flex-direction: column; justify-content: space-between; height: 160px; font-size: .72rem; color: var(--muted); text-align: right; min-width: 52px; }
.mo-plot { flex: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, transparent calc(50% - .5px), #EEF2F6 calc(50% - .5px), #EEF2F6 calc(50% + .5px), transparent calc(50% + .5px)); }
.mo-col { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: default; outline: none; padding-top: 0; }
.mo-col:focus-visible .mo-bars { outline: 2px solid var(--blue); outline-offset: 2px; }
.mo-bars { height: 160px; display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; }
.mo-bars i { display: block; width: min(14px, 40%); border-radius: 4px 4px 0 0; min-height: 0; }
.mo-col span { font-size: .7rem; color: var(--muted); transform: translateY(18px); }
.mo-col:hover .mo-bars i { filter: brightness(.92); }
.s1 { background: #2a78d6; } .s2 { background: #eb6834; }
.mo-chart { margin-bottom: 28px; }
.mo-tip { position: absolute; top: -6px; width: 220px; background: #0F2A4A; color: #fff; font-size: .8rem; border-radius: 8px; padding: 6px 10px; pointer-events: none; z-index: 2; }
.mo-table { margin-top: 4px; } .mo-table summary { cursor: pointer; color: var(--blue); min-height: 40px; display: flex; align-items: center; }
.mo-table table { width: 100%; border-collapse: collapse; font-size: .9rem; } .mo-table th, .mo-table td { text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line); } .mo-table th:first-child, .mo-table td:first-child { text-align: left; }
.mo-list { display: flex; flex-direction: column; gap: 6px; }
.mo-row { flex-shrink: 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); background: #fff; overflow-wrap: anywhere; }
.mo-row:hover { border-color: var(--blue); }
.mo-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mo-amt { white-space: nowrap; color: var(--navy); }
.section-h .seg-b { border: 0; background: #fff; cursor: pointer; font: 700 .82rem inherit; } .section-h .seg-b.on { background: var(--navy); color: #fff; }
@media (max-width: 420px) { .nav-item { font-size: .64rem; } .nav-item .ni { font-size: 1.15rem; } }
.mo-col span b { font-weight: 400; } .mo-col .ms { display: none; }
@media (max-width: 600px) { .mo-col .ml { display: none; } .mo-col .ms { display: inline; } .mo-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mo-tile b { font-size: 1.25rem; } .mo-axis { min-width: 44px; } }
.cust-back { font-weight: 700; color: var(--navy); text-decoration: none; padding: 8px 12px 8px 4px; margin-right: -4px; min-height: 44px; display: inline-flex; align-items: center; font-size: 1.05rem; }
.pe-isearch { margin: 0 0 8px; }
.pe-isearch input { width: 100%; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line, #d5dbe3); border-radius: 10px; }
.pe-itemopt[hidden], .pe-items > details[hidden] { display: none !important; }
.pe-logo-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-top: 6px; }
.pe-logo-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 112px; min-height: 76px; padding: 8px; border: 2px solid var(--line, #d5dbe3); border-radius: 10px; background: #fff; cursor: pointer; font-size: .8rem; color: var(--muted, #5b6675); text-align: center; }
.pe-logo-opt img { max-width: 92px; max-height: 44px; object-fit: contain; }
.pe-logo-opt.on { border-color: var(--blue, #2a78d6); box-shadow: 0 0 0 2px rgba(42,120,214,.18); color: var(--navy); font-weight: 700; }
.pe-logo-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pe-logo-lib { display: flex; flex-direction: column; gap: 8px; }
.pe-logo-lib > div { display: flex; align-items: center; gap: 10px; }
.pe-logo-lib img { width: 96px; height: 48px; object-fit: contain; background: #fff; border: 1px solid var(--line, #d5dbe3); border-radius: 8px; flex-shrink: 0; }
.pe-logo-lib input { flex: 1; min-width: 0; }
.bc-val { white-space: nowrap; }
.bc-val.range { font-size: .84rem; }
.bc-dash { margin: 0 2px; font-weight: 600; }
.mo-high { display: block; font-size: .78rem; font-weight: 600; color: var(--muted, #5b6675); text-align: right; }
.pe-cover-details { margin-top: 14px; border: 1px solid var(--line, #d5dbe3); border-radius: 12px; padding: 10px 12px; background: #fff; }
.pe-cover-details > summary { cursor: pointer; padding: 4px 0; min-height: 32px; }
.pe-cover-details[open] > summary { margin-bottom: 8px; }
.pe-cv-ed { font-size: .72rem; font-weight: 700; color: #92400e; background: #FEF3C7; border-radius: 6px; padding: 1px 6px; }
.linkish { background: none; border: 0; padding: 0; color: var(--blue, #2a78d6); font-weight: 600; cursor: pointer; text-decoration: underline; }
.linkish.small { font-size: .78rem; }
.bk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0; }
.bk-row .btn { flex-shrink: 0; }
.bk-row span { flex: 1 1 220px; }
.bk-due { background: #FEF3C7; border-radius: 8px; padding: 6px 10px; color: #92400e; font-weight: 600; }
.bk-progress { margin: 8px 0; font-size: .9rem; }
.bk-bar { height: 8px; background: #E5EAF0; border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.bk-bar i { display: block; height: 100%; width: 0; background: var(--blue, #2a78d6); transition: width .2s; }
.bk-restore { margin-top: 10px; }
.bk-restore > summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.bk-setup { margin-top: 18px; text-align: center; }
/* ---------- phone home screen ---------- */
@media (min-width: 900px) { .nav-item.phone-only { display: none; } }
.hm { padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 24px; max-width: 640px; margin: 0 auto; }
.hm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 6px; }
.hm-logo { height: 34px; width: auto; display: block; }
.hm-plus { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(15,42,74,.25); }
.hm-hi { font-size: 1.35rem; color: var(--navy); margin: 6px 0 12px; }
.hm-quick { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px 6px; padding: 2px 16px 8px; scroll-snap-type: x proximity; scroll-padding-inline: 8px; scrollbar-width: none; }
.hm-quick::-webkit-scrollbar { display: none; }
.hm-ql { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 84px; min-height: 76px; padding: 10px 12px; border-radius: 18px; background: var(--card); color: var(--navy); text-decoration: none; font-family: 'Montserrat', system-ui, sans-serif; font-weight: 700; font-size: .82rem; box-shadow: 0 1px 3px rgba(15,42,74,.08); }
.hm-ql span { font-size: 1.5rem; line-height: 1; }
.hm-sec { margin-top: 18px; }
.hm-h { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; text-decoration: none; color: inherit; min-height: 32px; }
.hm-h h2 { margin: 0; font-size: 1.15rem; }
.hm-h .hm-chev { color: var(--blue); font-size: 1.5rem; }
.hm-date { margin-left: auto; color: var(--muted); font-size: .85rem; font-weight: 600; }
.hm-count { background: #FDE2E1; color: var(--danger); font-weight: 800; font-size: .78rem; border-radius: 99px; padding: 1px 9px; }
.hm-card { background: var(--card); border-radius: 18px; box-shadow: 0 1px 3px rgba(15,42,74,.08); overflow: hidden; }
.hm-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-decoration: none; color: inherit; min-height: 60px; }
.hm-row + .hm-row { border-top: 1px solid var(--line); }
.hm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hm-main b { color: var(--text); font-size: .98rem; overflow-wrap: anywhere; }
.hm-sub { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.hm-chev { color: #9AA6B4; font-size: 1.4rem; flex-shrink: 0; }
.hm-time { flex: 0 0 64px; font-weight: 800; color: var(--blue); font-family: 'Montserrat', system-ui, sans-serif; font-size: .9rem; }
.hm-appt.done { opacity: .6; }
.hm-clear { padding: 16px; display: flex; flex-direction: column; gap: 2px; background: linear-gradient(135deg, #fff 60%, var(--soft)); }
.hm-clear b { color: var(--navy); font-size: 1.05rem; }
.hm-ico { flex: 0 0 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: var(--soft); }
.hm-ico.rv { background: #FEF3C7; } .hm-ico.inv, .hm-ico.col { background: #FDE2E1; } .hm-ico.dep { background: #DCFCE7; } .hm-ico.fol { background: var(--soft); }
.hm-more { margin-top: 6px; width: 100%; }
.hm-recent { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hm-recent::-webkit-scrollbar { display: none; }
.hm-job { position: relative; flex: 0 0 82%; max-width: 330px; scroll-snap-align: start; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 3px rgba(15,42,74,.08); }
.hm-job-a { display: block; text-decoration: none; color: inherit; }
.hm-job-img { display: block; height: 130px; background: linear-gradient(135deg, var(--soft), #C9DDEE); }
.hm-job-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-job-ph { display: grid; place-items: center; height: 100%; font-size: 2.6rem; opacity: .55; }
.hm-job-t { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 14px; }
.hm-job-t b { color: var(--navy); font-size: 1.02rem; }
.hm-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(15,42,74,.75); color: #fff; font-size: .95rem; cursor: pointer; }
.hm-doc-t { overflow: hidden; text-overflow: ellipsis; }
.hm-cust-img { position: relative; display: grid; place-items: center; background: linear-gradient(135deg, #1E4E7E, var(--navy)); }
.hm-initials { color: #fff; font-family: 'Montserrat', system-ui, sans-serif; font-weight: 800; font-size: 2.2rem; letter-spacing: 1px; }
.hm-tag { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.92); color: var(--navy); font-size: .72rem; font-weight: 800; border-radius: 99px; padding: 2px 9px; }
/* pull to refresh (phones) */
.ptr { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 0px); left: 50%; z-index: 60; transform: translate(-50%, -56px); opacity: 0; display: flex; align-items: center; gap: 8px;
  background: #fff; color: var(--navy); border-radius: 99px; padding: 8px 14px 8px 10px; box-shadow: 0 4px 14px rgba(15,42,74,.22); font: 700 .85rem 'Montserrat', system-ui, sans-serif; pointer-events: none; }
.ptr.on, .ptr.spinning { transition: none; }
.ptr:not(.on):not(.spinning) { transition: transform .2s, opacity .2s; }
.ptr-spin { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); font-size: 1.05rem; }
.ptr.ready .ptr-spin { background: var(--navy); color: #fff; }
.ptr.spinning .ptr-spin { background: var(--navy); color: #fff; animation: ptr-rot .8s linear infinite; }
@keyframes ptr-rot { to { transform: rotate(360deg); } }
/* security */
.sec-2fa { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; justify-content: space-between; padding: 12px; border-radius: 12px; background: var(--soft); }
.sec-2fa.on { background: #E7F6EE; }
.sec-2fa > div:first-child { flex: 1 1 260px; }
.sec-2fa p { margin: 4px 0 0; }
.sec-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pill.ok { background: #DCFCE7; color: var(--ok); }
.sec-h { font-size: .98rem; color: var(--navy); margin: 16px 0 6px; }
.sec-devs, .sec-evs { display: flex; flex-direction: column; }
.sec-dev, .sec-ev { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); }
.sec-dev:first-child, .sec-ev:first-child { border-top: 0; }
.sec-ico { flex: 0 0 34px; height: 34px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; }
.sec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.sec-ev.warn .sec-ico { background: #FDE2E1; }
.sec-alert { background: #FDE2E1; color: var(--danger); border-radius: 8px; padding: 6px 10px; font-weight: 700; }
.sec-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.sec-qr { display: flex; justify-content: center; margin: 10px 0; }
.sec-qr svg { border: 1px solid var(--line); border-radius: 8px; }
.sec-key { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--soft); border-radius: 8px; padding: 6px 10px; }
.sec-key code { font-size: .92rem; letter-spacing: .5px; overflow-wrap: anywhere; flex: 1; }
.sec-code { width: 100%; font-size: 1.5rem !important; letter-spacing: 6px; text-align: center; padding: 10px; margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; font-family: 'Montserrat', system-ui, sans-serif; }
.sec-codes { columns: 2; padding-left: 22px; font-size: 1.05rem; }
.sec-codes code { letter-spacing: 1px; }
.sec-done { font-weight: 700; color: var(--ok); }
.bk-setup-pw { max-width: 360px; margin: 8px auto 0; text-align: left; }
.sec-main > .pill { align-self: flex-start; margin: 2px 0; }
/* ---------- phone bottom bar: bigger buttons, swipe sideways for the rest ---------- */
@media (max-width: 899px) {
  .nav { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 8px; scrollbar-width: none;
    padding: 6px 8px calc(6px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: 0 0 auto; width: 78px; min-height: 64px; gap: 4px; padding: 6px 2px; border-radius: 14px; font-size: .78rem; scroll-snap-align: start; color: var(--muted); }
  .nav-item .ni { font-size: 0; line-height: 0; display: grid; place-items: center; }
  .nav-item .ni svg { width: 26px; height: 26px; display: block; }
  .nav-item[aria-current="page"] { color: var(--navy); background: var(--soft); box-shadow: none; }
  .nav-item[aria-current="page"] .ni svg { stroke-width: 2.4; }
  .nav-item:active { background: var(--bg); }
  /* a soft fade on the side that has more buttons, so it's clear the bar swipes */
  .nav.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
  .nav.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
  .nav.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
  .nbadge { top: -5px; right: -10px; }
  body.signed-in main#app { padding-bottom: calc(96px + var(--safe-b)); }
}
@media (max-width: 420px) { .nav-item { font-size: .76rem; } }
@media (min-width: 900px) { .nav-item .ni svg { width: 22px; height: 22px; display: block; } .nav-item .ni { display: inline-grid; place-items: center; } }
.hm-ql span { display: grid; place-items: center; color: var(--blue); }
.hm-ql span svg { width: 28px; height: 28px; }
/* in-app PDF viewer (phones) */
.pdfv { position: fixed; inset: 0; z-index: 70; background: #5B6778; display: flex; flex-direction: column; }
.pdfv-bar { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; background: var(--navy); color: #fff; }
.pdfv-t { flex: 1; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.pdfv-btn { min-height: 44px; min-width: 44px; padding: 8px 12px; border-radius: 10px; border: 0; background: rgba(255,255,255,.14); color: #fff; font: 700 .95rem 'Montserrat', system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.pdfv-btn.primary { background: #fff; color: var(--navy); }
.pdfv-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 12px 10px calc(16px + env(safe-area-inset-bottom, 0px)); }
.pdfv-doc { display: flex; flex-direction: column; gap: 12px; max-width: 900px; margin: 0 auto; }
.pdfv-doc .pv-sheet { width: 100%; height: auto; background: #fff; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.pdfv-doc .pp-pdf-loading { color: #fff; text-align: center; }
.pr-row { display: flex; align-items: center; gap: 8px; padding-right: 10px; }
.pr-row .pr-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.pr-row .pr-pdf { flex-shrink: 0; }
.bk-auto { margin: 12px 0 4px; padding: 12px; border-radius: 12px; background: var(--soft); }
.bk-auto-h { display: flex; align-items: center; gap: 8px; }
.bk-auto p { margin: 6px 0; }

/* no signal bar + waiting-to-upload badge */
.off-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b, 0px)); z-index: 65; display: flex; gap: 6px; align-items: center; justify-content: center; white-space: nowrap; background: #1f2937; color: #fff; border-radius: 99px; padding: 4px 6px 4px 12px; font-size: 13px; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.25); max-width: calc(100vw - 24px); }
.off-bar:not(:has(button)) { padding-right: 12px; }
body.has-off-bar .toast { bottom: calc(146px + var(--safe-b, 0px)); }
@media (min-width: 900px) { .off-bar { bottom: 16px; left: calc(50% + 110px); } body.has-off-bar .toast { bottom: 70px; } }
.off-bar.off { background: #7c2d12; }
.off-bar.bad { outline: 2px solid #fca5a5; }
.off-bar button { background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 99px; padding: 6px 10px; font: inherit; min-height: 32px; cursor: pointer; }
.wt-list { display: grid; gap: 6px; margin: 10px 0; }
.wt-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; }
.wt-row > span { display: grid; gap: 2px; }
.wt-row.bad { border-color: #fca5a5; background: #fef2f2; }
/* problems list (Settings) */
.prob-list { display: grid; gap: 6px; margin: 8px 0; color: var(--text); }
.prob { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 8px 10px; }
.prob summary { cursor: pointer; display: grid; gap: 2px; list-style: none; }
.prob summary b { word-break: break-word; }
.prob-k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #b45309; }
.prob-pre { white-space: pre-wrap; word-break: break-word; font-size: 11px; background: #f3f4f6; padding: 8px; border-radius: 8px; max-height: 220px; overflow: auto; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.notif-on { color: var(--ok); margin: 0 0 8px; }
