:root {
  --bg: #f4f6f8; --panel: #ffffff; --ink: #1c2530; --muted: #66727f;
  --line: #e2e7ec; --side: #12302e; --side-ink: #cfe3e0; --accent: #0f766e;
  --accent-soft: #e0f2ef; --red: #c0392b; --red-soft: #fdecea;
  --amber: #b26a00; --amber-soft: #fff4e0; --green: #1e7d45; --green-soft: #e6f5ec;
  --blue: #1f5fa8; --blue-soft: #e7f0fb; --grey-soft: #eef1f4;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0; }
h3 { font-size: 13px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.muted { color: var(--muted); }
.pad { padding: 24px; }
.hidden { display: none !important; }

.shell { display: flex; min-height: 100vh; }
.side { width: 220px; flex: none; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 700; font-size: 18px; color: #fff; padding: 18px 18px 10px; display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-size: 16px; }
.building { padding: 0 18px 16px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.08); }
.building img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; display: block; }
.building b { color: #fff; display: block; }
nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
nav a { color: var(--side-ink); text-decoration: none; padding: 9px 12px; border-radius: 8px; display: flex; gap: 10px; align-items: center; }
nav a span { width: 18px; text-align: center; opacity: .8; }
nav a:hover { background: rgba(255,255,255,.06); }
nav a.on { background: var(--accent); color: #fff; }
.nav-count { margin-left: auto; background: #e08a1e; color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.mail { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.mail-head { display: flex; gap: 12px; align-items: center; padding: 12px 14px; flex-wrap: wrap; }
.mail-head input[type=checkbox] { width: 18px; height: 18px; }
.mail-head .who { flex: 1; min-width: 220px; }
.mail-head .who small { color: var(--muted); display: block; }
.mail-body { white-space: pre-wrap; padding: 12px 14px 14px 44px; border-top: 1px solid var(--line); color: #33404d; font-size: 13.5px; }
.mail .err { color: var(--red); font-size: 13px; padding: 0 14px 10px 44px; }
.notice { background: var(--amber-soft); border: 1px solid #f1d39a; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.notice.ok { background: var(--green-soft); border-color: #b9e0c8; }
/* emails received from contractors: menu count, dashboard notice, Received log */
.nav-count.in { background: #1e7d45; }
.nav-count:not(.hidden) + .nav-count.in { margin-left: 4px; }
.inbox-note { display: block; text-decoration: none; color: inherit; border-left: 5px solid var(--green); }
.inbox-note span { display: block; margin-top: 3px; }
.inbox-note u { display: inline-block; margin-top: 6px; color: var(--green); font-weight: 600; }
.mail.isnew, .mail.mail-in { border-left: 5px solid var(--green); }
.mail .filed { list-style: none; margin: 0; padding: 0 14px 12px 44px; font-size: 13.5px; }
.mail .filed li { padding: 3px 0; overflow-wrap: anywhere; }
.toast.note { background: #1e7d45; cursor: pointer; max-width: 92vw; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.tabs a .badge { margin-left: 4px; }
.code { font: 700 22px/1 Consolas, monospace; letter-spacing: .12em; background: #fff; border: 1px dashed var(--accent); padding: 8px 14px; border-radius: 8px; display: inline-block; margin: 6px 0; }
ol.steps li { margin-bottom: 6px; }
.side-foot { margin-top: auto; padding: 14px 18px; font-size: 12px; opacity: .6; }

main { flex: 1; min-width: 0; padding: 24px 28px 60px; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.top h1 { margin-right: auto; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: inherit; display: block; }
.tile:hover { border-color: var(--accent); }
.tile .n { font-size: 28px; font-weight: 700; }
.tile .l { color: var(--muted); }
.tile.warn .n { color: var(--red); }

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel + .panel { margin-top: 14px; }
.grid3 .panel + .panel { margin-top: 0; }

.donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; }
.legend li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend span { margin-left: auto; color: var(--muted); }

.action-list { list-style: none; margin: 0; padding: 0; }
.action-list a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.action-list a:hover { color: var(--accent); }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.activity small { color: var(--muted); display: block; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
input, select, textarea { font: inherit; color: inherit; border: 1px solid #cdd5dd; border-radius: 7px; padding: 7px 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { width: 100%; min-height: 90px; resize: vertical; }
.btn { font: inherit; border: 1px solid #cdd5dd; background: #fff; color: var(--ink); border-radius: 7px; padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); }
.btn.small { padding: 3px 10px; font-size: 13px; }

table.list { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafb; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #f6fbfa; }
.num { color: var(--muted); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.empty { padding: 30px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.b-red { background: var(--red-soft); color: var(--red); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-green { background: var(--green-soft); color: var(--green); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-grey { background: var(--grey-soft); color: var(--muted); }
.b-bld2 { background: #37474f; color: #fff; }
.bld-badge { font-size: 12.5px; }
td.case-title { min-width: 220px; }
.overdue { color: var(--red); font-weight: 600; }

.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 24px; }
.fields div small { display: block; color: var(--muted); font-size: 12px; }
.prewrap { white-space: pre-wrap; }
.status-row { display: flex; gap: 6px; flex-wrap: wrap; }
.status-row .btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.att-group { margin-top: 14px; }
.att-group h4 { margin: 0 0 6px; font-size: 13px; }
.att { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.att a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photo { position: relative; }
.photo img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.photo button { position: absolute; top: 4px; right: 4px; }
.upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

.modal { position: fixed; inset: 0; background: rgba(15, 25, 35, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { background: #fff; border-radius: 12px; width: min(680px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.modal-head h2 { margin-right: auto; }
.x { border: 0; background: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
#modalForm { padding: 18px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.form-grid label input, .form-grid label select { color: var(--ink); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 60; }
.toast.err { background: var(--red); }

.settings-img { max-width: 220px; max-height: 120px; border-radius: 8px; border: 1px solid var(--line); display: block; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { background: var(--grey-soft); border-radius: 99px; padding: 3px 4px 3px 12px; display: inline-flex; gap: 4px; align-items: center; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 6px; }
.chip button:hover { color: var(--red); }

/* ---- sign in */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--side); }
.login-box { background: #fff; border-radius: 14px; padding: 28px 26px; width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-box label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.login-box p { margin: 0; }
.brand-lg { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; margin-bottom: 6px; }
.brand-lg .logo-mark { color: #fff; }
.err-msg { color: var(--red); min-height: 1em; font-size: 13px; }
.btn.big { justify-content: center; padding: 11px 16px; font-size: 15px; }
.small { font-size: 12.5px; }

/* ---- buildings */
.bld-pick { display: flex; flex-direction: column; gap: 4px; padding: 0 18px 12px; font-size: 12px; }
.bld-pick span { opacity: .7; }
.bld-pick select { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.bld-pick select option { color: var(--ink); background: #fff; }
.building small { opacity: .75; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 8px; font-size: 18px; width: 40px; height: 36px; cursor: pointer; }
.side-foot a { color: var(--side-ink); }
h1 .sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.where { color: var(--accent); font-weight: 600; }
.grow { flex: 1; min-width: 200px; }
.set { max-width: 860px; }
.bld-row { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.bld-info { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 2px; }
.bld-imgs { display: flex; gap: 12px; }
.img-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.img-cell .settings-img { max-width: 140px; max-height: 80px; margin: 0; }
.img-cell p { margin: 0; }
.form-grid .check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.form-sub { margin: 8px 0 0; font-size: 13px; color: var(--ink); border-top: 1px solid var(--line); padding-top: 12px; }
.upload .or { margin-left: 6px; }
.upload #upAmount { width: 200px; }

@media (max-width: 760px) {
  body { font-size: 15px; }
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); }
  .brand { padding: 10px 16px; }
  .menu-btn { display: block; }
  .bld-pick { padding: 0 16px 10px; }
  .side nav, .side .building, .side .side-foot { display: none; }
  .side.open nav, .side.open .side-foot { display: flex; gap: 6px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile .n { font-size: 24px; }
  .tile .l { font-size: 13px; }
  .side.open nav { max-height: calc(100vh - 140px); overflow: auto; padding: 4px 10px 10px; }
  nav a { padding: 12px; }
  main { padding: 16px 16px 80px; }
  .form-grid { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px; }          /* stops iPhone zooming in */
  .btn { padding: 9px 14px; }
  .btn.small { padding: 6px 10px; }
  .top h1 { font-size: 20px; width: 100%; }
  .modal { padding: 0; place-items: end stretch; }
  .modal-box { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  /* tables become cards */
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list { border: 0; background: none; }
  table.list thead { display: none; }
  table.list tr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 8px 4px; }
  table.list td { border: 0; padding: 4px 10px; }
  table.list .hide-sm { display: none; }
  table.list tr.hidden { display: none; }
  .upload #upAmount { width: 100%; }
  .upload .camera { width: 100%; justify-content: center; padding: 12px; }
  .photo img { width: 100px; height: 76px; }
  .grow { min-width: 0; width: 100%; }
}

/* contractor files */
.name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.name-row > a:first-child { color: inherit; text-decoration: none; }
.name-row > a:first-child:hover { text-decoration: underline; }
.files-btn { text-decoration: none; white-space: nowrap; }
.small-sel { padding: 3px 6px; font-size: 13px; border-radius: 6px; border: 1px solid var(--line); }
.small-sel.b-green { background: var(--green-soft); color: var(--green); }
.small-sel.b-amber { background: var(--amber-soft, #fff3dc); color: var(--amber, #a15c00); }
.panel + .tiles { margin-top: 16px; }

/* service reports list */
table.list tr.group td { background: var(--bg, #f4f6f8); color: var(--muted, #5b6b7a); padding-top: 14px; font-size: 13px; letter-spacing: .03em; }
label.chk { display: flex; align-items: center; gap: 8px; flex-direction: row; }
label.chk input { width: auto; margin: 0; }
.pick-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-top: 6px; display: grid; gap: 4px; }
.pick-list label.chk { font-weight: normal; flex-wrap: wrap; }

/* ---- phase A: statuses, board, timeline, insurance ---- */
.b-purple { background: #f1eafb; color: #6b3fa8; }
.b-teal { background: var(--accent-soft); color: var(--accent); }
.chip { font-size: 11px; padding: 1px 6px; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.seg { display: inline-flex; gap: 4px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-head h3 { margin: 0; }
.att { flex-wrap: wrap; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kcol { flex: 0 0 250px; background: var(--grey-soft); border-radius: var(--radius); padding: 10px; min-height: 120px; border: 2px solid transparent; }
.kcol.over { border-color: var(--accent); background: var(--accent-soft); }
.kcol h4 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; }
.kdrop { display: grid; gap: 8px; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 4px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.kcard.dragging { opacity: .5; }
.kc-top { display: flex; justify-content: space-between; align-items: center; }
.kc-title { color: var(--ink); font-weight: 600; text-decoration: none; }
.kc-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 4px; }
.kc-move { font-size: 12px; padding: 2px 4px; max-width: 110px; }
.kempty { text-align: center; padding: 10px 0; }
.comment-box { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.comment-box textarea { flex: 1; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 6px 0 10px 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.timeline li.comment::before { background: var(--accent); }
.timeline li.comment .prewrap { background: var(--accent-soft); padding: 6px 10px; border-radius: 8px; margin-top: 2px; }
.timeline li.history .prewrap { color: var(--muted); font-size: 13px; }
.tl-head { display: flex; gap: 8px; align-items: baseline; }
@media (max-width: 700px) { .kcol { flex-basis: 78vw; } .comment-box { flex-direction: column; } .comment-box textarea { width: 100%; } }

/* ---- phase B: year planner, grids ---- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }
.yp-wrap { overflow-x: auto; }
table.yp th, table.yp td { text-align: center; padding: 6px 4px; }
table.yp td.yp-task, table.yp th:first-child { text-align: left; min-width: 220px; }
.yp-cell { color: var(--accent); font-weight: 700; }
.yp-cell.due { background: var(--accent-soft); }
.yp-cell.late { background: var(--red-soft); color: var(--red); }
.yp-cell.done { background: var(--green-soft); }
.yp-cell { white-space: nowrap; }
.yp-box { width: 20px; height: 20px; margin: 0 1px; vertical-align: middle; cursor: pointer; accent-color: var(--accent); }
.yp-box:checked { accent-color: #2e9e5b; }
.yp-box:disabled { cursor: default; opacity: .4; }
.yp-box:checked:disabled { opacity: .75; }
.yp-cell.late .yp-box { outline: 2px solid var(--red); outline-offset: 1px; border-radius: 3px; }
.yp-n { font-size: 11px; margin-left: 1px; }
@media (max-width: 760px) { .yp-box { width: 24px; height: 24px; } }
.pick-order { list-style: none; padding: 0; margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 8px; max-height: 340px; overflow-y: auto; }
.pick-order li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.pick-order li:last-child { border-bottom: 0; }
.pick-order .ord { display: flex; gap: 2px; flex-shrink: 0; }
label.tog { background: var(--grey-soft); padding: 4px 10px; border-radius: 20px; font-weight: normal; }

/* ---------- phase C: checklists, diary, keys, invoices ---------- */
.right { text-align: right; }
.show-sm { display: none; }
@media (max-width: 760px) { .show-sm { display: inline; } }
.tile.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ck-progress { height: 8px; background: var(--grey-soft); border-radius: 99px; overflow: hidden; margin: 4px 0 8px; }
.ck-progress div { height: 100%; background: var(--accent); transition: width .2s; }
.ck-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.ck-sec { margin: 14px 0 2px; color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
.ck-item { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.ck-item.ck-ok { border-left-color: var(--green); }
.ck-item.ck-issue { border-left-color: var(--red); background: #fff7f7; }
.ck-item.ck-na { border-left-color: #b8c0c8; opacity: .75; }
.ck-text { font-size: 15px; margin-bottom: 8px; }
.ck-btns { display: flex; gap: 6px; }
.ck-b { flex: 1; min-height: 42px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 15px; cursor: pointer; }
.ck-b:disabled { cursor: default; }
.ck-b-ok.on { background: var(--green); border-color: var(--green); color: #fff; }
.ck-b-issue.on { background: var(--red); border-color: var(--red); color: #fff; }
.ck-b-na.on { background: #8a96a3; border-color: #8a96a3; color: #fff; }
.ck-extra { margin-top: 10px; }
.ck-note { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; }
.ck-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.ck-photo { height: 64px; border-radius: 6px; display: block; }
details.panel summary { cursor: pointer; }
.timeline.diary { border-left: 2px solid var(--line); margin: 6px 0 0 6px; }
.diary .tl-item { position: relative; padding: 4px 0 14px 18px; display: flex; gap: 12px; }
.diary .tl-item::before { content: ""; position: absolute; left: -7px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.diary .tl-item.follow::before { background: var(--amber, #d98b00); }
.diary .tl-when { min-width: 46px; font-weight: 600; color: var(--muted); padding-top: 2px; white-space: nowrap; }
.diary .tl-body { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.diary .tl-body .prewrap { margin: 6px 0 4px; }
.tl-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.key-code { background: var(--grey-soft); padding: 1px 7px; border-radius: 5px; font-family: ui-monospace, Consolas, monospace; }
@media print {
  .side, .no-print, .top .btn, .tl-actions { display: none !important; }
  .shell { display: block; } main { padding: 0; }
  .diary .tl-body { border: 0; padding: 0; }
}

/* ---------- phase D: breaches, budget ---------- */
.bud-bar { height: 10px; background: var(--grey-soft); border-radius: 99px; overflow: hidden; display: flex; }
.bud-bar i { background: var(--accent); }
.bud-bar b { background: #f0b85a; }
.bud-bar.over i { background: var(--red); }
table.list tr.total td { border-top: 2px solid var(--line); }

/* ---------- residents ---------- */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.scroll-x { overflow-x: auto; max-width: 100%; }
table.list.mini td, table.list.mini th { font-size: 12px; padding: 4px 6px; white-space: nowrap; }
tr.faded td { opacity: .55; }
.rf-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.rf-photos figure { margin: 0; }
.rf-photos img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; display: block; }
.rf-photos figcaption { font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: center; margin-top: 4px; }
.rf-photos figcaption .btn { padding: 0 6px; }
.rf-text { background: var(--grey-soft); padding: 8px 10px; border-radius: 8px; margin-top: 4px; max-height: 360px; overflow: auto; }
#dropZone.drag { border-color: var(--accent); background: var(--accent-soft); }
#dropZone .seg { margin: 6px 0 4px; flex-wrap: wrap; }
.rf-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rf-atts .chip { font-size: 12px; padding: 3px 10px; text-decoration: none; color: inherit; }
input.autofilled, select.autofilled { background: #fff8db; border-color: #e0b84a; }
/* contractors: insured (green) first, then not current (red) */
table.list tr.ins-ok td { background: #eefaf2; }
table.list tr.ins-ok td:first-child { box-shadow: inset 4px 0 0 #2e9d5b; }
table.list tr.ins-bad td { background: #fdf0f0; }
table.list tr.ins-bad td:first-child { box-shadow: inset 4px 0 0 #d1495b; }
table.list tr.ins-divider td { background: #fbe1e1; color: #a12b3a; font-weight: 600; font-size: 13px; padding: 6px 10px; }
.ins-count.ok { color: #23804a; font-weight: 600; }
.ins-count.bad { color: #b3263a; font-weight: 600; }

/* sidebar: scroll when the menu is taller than the screen */
.side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.side::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 8px; }
.side::-webkit-scrollbar-track { background: transparent; }
@media (min-width: 761px) {
  nav a { padding: 7px 12px; }
}
@media (min-width: 761px) and (max-height: 820px) {
  .building img { display: none; }
}
/* case: quotes & invoices progress */
.money-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; }
.money-steps span { padding: 3px 10px; border-radius: 99px; background: var(--grey-soft); color: var(--muted); }
.money-steps span.done { background: var(--green-soft); color: #23804a; font-weight: 600; }
.money-steps i { color: var(--muted); font-style: normal; }

/* Phone tidy-ups (Samsung ~384px wide) */
@media (max-width: 760px) {
  .seg { flex-wrap: wrap; }
  .toolbar { flex-wrap: wrap; }
  .toolbar input.grow { flex: 1 1 100%; min-width: 0; }
  input, select, textarea { font-size: 16px; }
}
/* Galaxy Z Fold inner screen / small tablets: sidebar + narrow content, so tables become cards too */
@media (min-width: 761px) and (max-width: 1000px) {
  table.list:not(.mini), table.list:not(.mini) tbody, table.list:not(.mini) tr, table.list:not(.mini) td { display: block; width: 100%; }
  table.list:not(.mini) { border: 0; background: none; }
  table.list:not(.mini) thead { display: none; }
  table.list:not(.mini) tr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 8px 4px; }
  table.list:not(.mini) td { border: 0; padding: 4px 10px; }
  table.list .hide-sm { display: none; }
  table.list tr.hidden { display: none; }
  .side { width: 200px; }
}
/* Snap: floating camera button + "photo first" sheet */
.snap-fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; border: 0; border-radius: 99px; padding: 12px 18px; font: 600 15px/1 "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; }
.snap-fab:hover { filter: brightness(1.08); }
.snap-strip { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.snap-strip .photo img { width: 96px; height: 96px; }
.snap-more { height: 96px; width: 96px; flex-direction: column; justify-content: center; text-align: center; font-size: 13px; }
.snap-mode { display: flex; }
.snap-mode label { flex: 1; justify-content: center; cursor: pointer; }
.snap-sec { margin-top: 2px; }
#snOld { display: flex; flex-direction: column; gap: 8px; }
.snap-cases { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; }
.snap-case { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.snap-case small { display: block; margin-top: 2px; }
.snap-case.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.snap-note { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.snap-land { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
@media (max-width: 760px) {
  .snap-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); padding: 16px 20px; font-size: 17px; }
  .snap-strip .photo img, .snap-more { width: 84px; height: 84px; }
}
@media print { .snap-fab { display: none; } }
main { padding-bottom: 90px; }   /* room for the Snap button */

/* in-app photo viewer */
.pv { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; touch-action: pinch-zoom; }
.pv img { max-width: 100vw; max-height: calc(100vh - 60px); object-fit: contain; }
.pv button { position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 26px; line-height: 1; cursor: pointer; }
.pv-x { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.pv-prev { left: 10px; top: 50%; transform: translateY(-50%); font-size: 34px !important; }
.pv-next { right: 10px; top: 50%; transform: translateY(-50%); font-size: 34px !important; }
.pv-bar { position: absolute; left: 0; right: 0; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 18px; color: #ddd; font-size: 14px; }
.pv-open { color: #9cf; }
.pv-text { background: #fff; color: #1c2530; margin: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 140px); overflow: auto; padding: 16px; border-radius: 10px; white-space: pre-wrap; word-break: break-word; font: 14px/1.5 "Segoe UI", system-ui, sans-serif; }
.pv button, .pv-bar { position: fixed; }
.pv-open { cursor: pointer; text-decoration: underline; }
.pv.pv-zoomed { display: block; overflow: auto; touch-action: auto; }
.pv.pv-zoomed img { max-width: none; max-height: none; width: max(250vw, 1000px); height: auto; display: block; }
.pv.pv-zoomed .pv-prev, .pv.pv-zoomed .pv-next { display: none; }
.pv-bar { background: rgba(0, 0, 0, .55); padding: 8px 14px; border-radius: 20px; left: 50%; right: auto; transform: translateX(-50%); }
/* in-app viewer: documents */
.pv-doc { background: #fff; color: #1c2530; width: min(900px, calc(100vw - 16px)); max-height: calc(100vh - 130px); margin-top: 20px; overflow: auto; border-radius: 10px; padding: 14px; -webkit-overflow-scrolling: touch; }
.pv-title { font-weight: 600; margin-bottom: 8px; padding-right: 8px; word-break: break-word; }
.pv-body.prewrap { white-space: pre-wrap; word-break: break-word; font: 14px/1.5 "Segoe UI", system-ui, sans-serif; }
.pv-pdf { background: #e9ecef; padding: 8px; }
.pv-pages canvas { display: block; width: 100%; height: auto; margin: 0 auto 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.pv.pv-zoomed .pv-pages canvas { width: 250%; max-width: none; }
.pv.pv-zoomed.pv-is-doc { display: flex; overflow: hidden; }
.pv-table-wrap { overflow: auto; }
.pv-table { border-collapse: collapse; font-size: 13px; }
.pv-table td { border: 1px solid #d5dbe1; padding: 4px 8px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.pv-table tr:first-child td { background: #f1f4f7; font-weight: 600; }
.pv-dl { color: #9cf; text-decoration: underline; }

/* side menu: each item is a see-through pill button with a soft rim */
nav { gap: 6px; padding: 12px 12px; }
nav a {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 1px 2px rgba(0, 0, 0, .18);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
nav a:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05)); border-color: rgba(255, 255, 255, .32); }
nav a:active { transform: scale(.98); }
nav a.on {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent));
  border-color: color-mix(in srgb, var(--accent) 60%, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 8px color-mix(in srgb, var(--accent) 45%, transparent);
  color: #fff;
}
nav a span { opacity: .9; }
nav a:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 2px; }
@media (min-width: 761px) { nav a { padding: 7px 14px; } }
@media (max-width: 760px) { .side.open nav { gap: 7px; } nav a { padding: 10px 16px; } }

/* side menu as see-through holographic folders, turned slightly on an angle, plain (no colour) icons */
.side {
  background:
    linear-gradient(rgba(94,242,230,.05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(94,242,230,.05) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(120% 60% at 0% 0%, #13606a 0%, #0a3540 50%, #041a22 100%);
  box-shadow: inset -1px 0 0 rgba(94,242,230,.25);
}
nav { gap: 14px; padding: 18px 16px 12px 12px; perspective: 600px; perspective-origin: 0 50%; }
nav a {
  position: relative; border-radius: 3px 10px 10px 10px; color: #dffcf8;
  border: 1px solid rgba(94,242,230,.35);
  background: linear-gradient(160deg, rgba(94,242,230,.13), rgba(57,198,255,.03));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 14px rgba(94,242,230,.10), 0 8px 16px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.12);
  transform: rotateY(12deg); transform-origin: 0 50%;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .25s, border-color .25s, box-shadow .25s;
}
nav a::before { content: ""; position: absolute; left: -1px; top: -8px; width: 38px; height: 8px;
  border: 1px solid rgba(94,242,230,.35); border-bottom: 0; border-radius: 6px 8px 0 0;
  background: rgba(94,242,230,.12); }
nav a:hover { transform: rotateY(4deg) translateX(3px); background: linear-gradient(160deg, rgba(94,242,230,.24), rgba(57,198,255,.06));
  border-color: rgba(94,242,230,.7); box-shadow: 0 0 20px rgba(94,242,230,.3), 0 10px 18px rgba(0,0,0,.25); }
nav a:active { transform: rotateY(4deg) scale(.98); }
nav a.on { color: #fff; transform: rotateY(0) translateX(4px);
  background: linear-gradient(160deg, rgba(94,242,230,.32), rgba(57,198,255,.10));
  border-color: #5ef2e6; box-shadow: 0 0 22px rgba(94,242,230,.45), inset 0 1px 0 rgba(255,255,255,.25); text-shadow: 0 0 10px rgba(94,242,230,.6); }
nav a.on::before { border-color: #5ef2e6; background: rgba(94,242,230,.35); }
/* icons: one plain colour, no coloured emoji */
nav a > span:first-child { filter: grayscale(1) brightness(2.2) contrast(.9); opacity: .9; font-variant-emoji: text; color: #dffcf8; }
nav a.on > span:first-child { filter: grayscale(1) brightness(2.6) drop-shadow(0 0 4px rgba(94,242,230,.8)); opacity: 1; }
@media (max-width: 760px) { nav a, nav a:hover, nav a.on { transform: none; } nav { perspective: none; gap: 14px; } }
@media (prefers-reduced-motion: reduce) { nav a { transition: none; } }

/* by-law documents panel (top of By-law breaches) */
.bl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.bl-bld { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg); }
.bl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.bl-doc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.bl-doc a { text-decoration: none; }
.bl-act { margin-left: auto; display: flex; gap: 6px; }
.bl-reg-title { margin: 18px 0 2px; }

/* ---- boxes: photos / reports / invoices / quotes / files, with "new" flags ---- */
.tiles.boxes { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile.box { position: relative; border-width: 2px; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: transform .12s, box-shadow .12s; }
.tile.box:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.10); }
.tile.box .ico { font-size: 22px; margin-right: 8px; vertical-align: 2px; }
.tile.box.has-new { border-color: #f59e0b; background: linear-gradient(180deg, #fff7e6, var(--panel)); }
.new-pill { position: absolute; top: -9px; right: 10px; background: #f59e0b; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; box-shadow: 0 2px 6px rgba(245,158,11,.5); animation: newpulse 1.6s ease-in-out infinite; }
@keyframes newpulse { 50% { transform: scale(1.08); } }
.new-flag { position: absolute; top: 4px; left: 4px; background: #f59e0b; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; }
.new-flag.inline { position: static; display: inline-block; flex: none; }
.photo.is-new img { border: 3px solid #f59e0b; }
.photo small { display: block; text-align: center; color: var(--muted); font-size: 11px; margin-top: 2px; }
.photo .who { position: static; display: block; width: 120px; margin-top: 3px; padding: 3px 4px; font: 600 11px/1.2 inherit; text-align: center; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px dashed var(--line); border-radius: 6px; background: var(--panel); color: var(--muted); cursor: pointer; }
.photo .who.set { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
tr.row-new td { background: #fff9ec; }
.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px #f59e0b; } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (max-width: 760px) { .tiles.boxes { grid-template-columns: 1fr 1fr 1fr; } .tile.box .ico { font-size: 18px; margin-right: 5px; } .photo .who { width: 100px; } }

.yp-box.sm { width: 13px; height: 13px; margin: 1px; }
.yp-cell:has(.yp-box.sm) { white-space: normal; line-height: 1; }
@media (max-width: 760px) { .yp-box.sm { width: 18px; height: 18px; } }

/* ---------- residents: faces, cleaner list, unit cards, profile header (14 Nov) ---------- */
.av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; letter-spacing: .5px; vertical-align: middle; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.av.xl { width: 124px; height: 124px; font-size: 42px; box-shadow: 0 0 0 4px var(--panel), 0 0 0 6px var(--accent-soft); }
.res-bar { align-items: center; min-height: 34px; margin-bottom: 8px; }
.res-acts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.res-list { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.res-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; border-top: 1px solid var(--line); }
.res-row:first-child { border-top: 0; }
.res-row:hover { background: var(--accent-soft); }
.res-row.faded, .unit-card.faded { opacity: .55; }
.res-row .rChk { flex: none; width: 17px; height: 17px; }
.res-main { flex: 1 1 220px; min-width: 0; }
.res-contact { flex: 0 1 270px; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.res-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.res-row .res-chips { min-width: 90px; justify-content: flex-end; }
.rc { background: var(--grey-soft); border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.rc.warn { background: var(--red-soft); color: var(--red); }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.unit-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px; transition: transform .12s, box-shadow .12s; }
.unit-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.10); }
.uc-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.uc-top b { font-size: 22px; }
.uc-people { display: grid; gap: 6px; }
.uc-people div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.uc-people span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-people small { margin-left: auto; white-space: nowrap; font-size: 11px; }
.res-head { display: flex; gap: 24px; align-items: center; margin-bottom: 16px; }
.res-pic { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: none; }
.res-id { min-width: 0; display: grid; gap: 10px; }
.res-id h1 { font-size: 26px; }
.res-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.res-lines { display: grid; gap: 3px; overflow-wrap: anywhere; }
.res-note { margin-bottom: 16px; }
.it-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.it-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; text-decoration: none; color: inherit; position: relative; }
.it-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.it-pic { width: 56px; height: 56px; border-radius: 10px; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--grey-soft); font-size: 26px; }
.it-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.it-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.it-edit { color: var(--muted); opacity: 0; }
.it-card:hover .it-edit { opacity: 1; }
@media (max-width: 760px) {
  .res-contact { display: none; }
  .res-row { padding: 10px 12px; gap: 10px; }
  .res-row .res-chips { min-width: 0; }
  .unit-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .res-head { flex-direction: column; text-align: center; gap: 14px; }
  .res-id { justify-items: center; }
  .res-badges, .res-head .toolbar { justify-content: center; }
  .av.xl { width: 104px; height: 104px; font-size: 36px; }
  .it-grid { grid-template-columns: 1fr; }
  .it-edit { opacity: 1; }
}
@media (min-width: 761px) { .tiles.boxes.res-boxes { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); } }

/* ---------- contact everyone page + its dashboard tile ---------- */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ct-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; }
.ct-card.faded { opacity: .6; }
.ct-head { display: flex; gap: 12px; align-items: center; }
.ct-head small { display: block; }
.ct-ico { font-size: 26px; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.ct-nums { display: flex; gap: 18px; color: var(--muted); }
.ct-nums b { color: var(--ink); font-size: 20px; }
.tile.go { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile.go .l { color: #e0f2ef; }
.tile.go:hover { filter: brightness(1.08); }
@media (min-width: 761px) { .tiles.dash { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }

/* ---------- dashboard boxes: one colour each ---------- */
.tile[class*=" c-"] { background: var(--tb); border-color: var(--tl); border-top: 4px solid var(--tc); }
.tile[class*=" c-"] .n, .tile[class*=" c-"].warn .n { color: var(--tc); }
.tile[class*=" c-"] .l { color: var(--ink); opacity: .8; }
.tile[class*=" c-"]:hover { border-color: var(--tc); box-shadow: 0 6px 14px rgba(0,0,0,.08); }
.tile.c-slate  { --tc: #2f3b48; --tb: #e3e8ed; --tl: #c3ccd5; }
.tile.c-grey   { --tc: #66727f; --tb: #f3f5f7; --tl: #d9dfe5; }
.tile.c-green  { --tc: #1e7d45; --tb: #e6f5ec; --tl: #bfe3cd; }
.tile.c-red    { --tc: #c0392b; --tb: #fdecea; --tl: #f3c3bd; }
.tile.go { background: #2f3b48; border-color: #2f3b48; border-top: 4px solid #151c24; }
.tile.go .l { color: #e3e8ed; }

/* ---------- logo picture (on a white tile so it reads on the dark side menu) ---------- */
.logo-img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; flex: none; }
.brand-lg .logo-img { width: 56px; height: 56px; border: 1px solid var(--line); }

/* email setup: one row per connected mailbox */
.mb-row{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:10px 0;border-top:1px solid var(--line,#e3e6ea)}

/* ---- by-laws in short: numbered list that opens to a plain summary ---- */
.bl-find { width: 100%; margin: 0 0 8px; }
.bl-item { border-top: 1px solid var(--line); }
.bl-item > summary { display: flex; align-items: center; gap: 12px; padding: 11px 4px; cursor: pointer; list-style: none; }
.bl-item > summary::-webkit-details-marker { display: none; }
.bl-item > summary::after { content: "▾"; margin-left: auto; color: var(--muted, #7a8591); transition: transform .15s; }
.bl-item[open] > summary::after { transform: rotate(180deg); }
.bl-item > summary:hover { background: var(--bg); }
.bl-no { min-width: 34px; height: 26px; padding: 0 8px; border-radius: 13px; background: #2f3b48; color: #fff; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bl-body { padding: 0 4px 14px 50px; }
.bl-body p { margin: 0 0 10px; }
@media (max-width: 600px) { .bl-body { padding-left: 4px; } }

/* by-laws: where to find it in the document; page labels in the PDF viewer */
.bl-ref { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; display: inline-block; }
.bl-pg { margin-left: 10px; white-space: nowrap; }
.bl-item > summary::after { margin-left: 12px; }
.bl-item > summary > b { flex: 1; }
.pv-pno { color: #fff; background: #2f3b48; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 14px; margin: 14px auto 6px; width: max-content; scroll-margin-top: 8px; }
.pv-pno.pv-want { background: #c0392b; }

/* by-laws: the two buildings' short lists side by side on a wide screen */
.bl-cols.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.bl-cols.two > .panel { margin: 0; min-width: 0; }
.bl-cols.two .panel-head { flex-wrap: wrap; gap: 6px; }
.bl-cols.two .bl-body { padding-left: 4px; }
.bl-cols { margin-bottom: 14px; }
@media (max-width: 1000px) { .bl-cols.two { grid-template-columns: 1fr; } }

/* ---- contractor sign-in ---- */
.si-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.si-card { border: 1px solid var(--line); border-left: 5px solid #2e8b57; border-radius: 10px; padding: 12px; background: var(--bg); line-height: 1.45; }
.si-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.si-sites { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.si-site { display: flex; gap: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg); }
.si-qr { width: 150px; flex: none; }
.si-qr svg { width: 100%; height: auto; display: block; border-radius: 6px; }
.si-set { flex: 1; min-width: 0; }
.si-set label { display: block; margin-top: 8px; }
.si-set input { width: 100%; margin-top: 3px; }
.si-set p { margin: 4px 0; }
@media (max-width: 600px) { .si-site { flex-direction: column; } }

.si-q { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.si-q span { width: 26px; height: 26px; border-radius: 13px; background: #2f3b48; color: #fff; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.si-q input { flex: 1; min-width: 0; }
.si-fail { margin-top: 6px; padding: 6px 10px; border-left: 4px solid var(--red, #c0392b); background: var(--red-soft, #fdecea); border-radius: 6px; font-size: 13px; }
.si-fail ul { margin: 2px 0 0; padding-left: 18px; }

/* apartments & owners */
.unit-card.apt { border-left: 6px solid #9aa5b1; gap: 8px; }
.unit-card.apt.own { border-left-color: #2e9d5b; }
.unit-card.apt.ten { border-left-color: #5b6b7a; }
.unit-card.apt.inv { border-left-color: #cfd6dd; }
.unit-card.apt.none { border-left-color: #d1495b; }
.apt-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.apt-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.apt-line { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.apt-line:first-of-type { border-top: 0; }
.apt-line > span { flex: none; width: 110px; color: var(--muted); font-size: 13px; }
.apt-line > div { min-width: 0; overflow-wrap: anywhere; }
.apt-cols > div { min-width: 0; }
@media (max-width: 800px) { .apt-grid { grid-template-columns: 1fr 1fr; } }
/* Phone / Fold inner screen: one column, Owner + agent straight after "Living here" (not squashed to the side
   or pushed under every other panel). */
@media (max-width: 1150px) {
  .apt-cols { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .apt-cols .panel { width: auto; align-self: stretch; }
  .apt-cols > div { display: contents; }
  .apt-cols .panel { order: 3; }
  .apt-cols .apt-living { order: 1; }
  .apt-cols .apt-side > .panel { order: 2; }
}
/* Small phones (iPhone SE / mini, most Androids): label above its value so names and emails get the full width;
   folder tabs wrap instead of hiding off the side of the screen. */
@media (max-width: 480px) {
  .apt-line { flex-direction: column; gap: 1px; }
  .apt-line > span { width: auto; font-size: 12px; }
  .bf-steps { flex-wrap: wrap; overflow-x: visible; }
}

.case-pics { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; align-items: center; }
.case-pics img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; display: block; }

/* row of section buttons across the top of a page (the side menu only has the main sections) */
.secbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.secbar .btn { font-weight: 600; }

/* Building: a page of big tiles, one per section */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.hub-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px 14px 18px; text-align: center; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .12s, box-shadow .12s, border-color .12s; }
.hub-tile:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.10); }
.hub-ico { font-size: 44px; line-height: 1; height: 62px; display: flex; align-items: center; color: var(--accent); }
.hub-tile b { font-size: 16px; border-top: 1px solid var(--line); padding-top: 12px; width: 100%; }
.hub-tile small { color: var(--muted); font-size: 12px; }
.secbar .btn:first-child[href="#/building"] { background: none; }
@media (max-width: 700px) { .hub { grid-template-columns: 1fr 1fr; gap: 10px; } .hub-ico { font-size: 34px; height: 46px; } }

/* my reports */
.mr-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.mr-page { max-width: 980px; }
.mr-page.drag { outline: 3px dashed var(--accent); }
.mr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mr-head h1 { margin: 0 0 4px; }
.mr-con { margin: 14px 0; padding: 10px 12px; background: var(--bg, #f4f6f8); border-radius: 10px; }
.mr-con small { display: block; color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.mr-body { margin: 12px 0 18px; line-height: 1.5; }
.mr-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
.mr-photos figure { margin: 0; }
.mr-photos img { width: 100%; height: 210px; object-fit: cover; border-radius: 10px; display: block; }
.mr-photos figcaption { font-size: 13px; padding-top: 4px; }
@media print {
  body.print-mr .side, body.print-mr .no-print, body.print-mr .secbar, body.print-mr .toast, body.print-mr #snapFab, body.print-mr .snap-fab { display: none !important; }
  body.print-mr main { padding: 0; }
  body.print-mr .mr-page { border: 0; box-shadow: none; max-width: none; padding: 0; }
  body.print-mr .mr-photos { grid-template-columns: 1fr 1fr; }
  body.print-mr .mr-photos figure { break-inside: avoid; }
}

/* year planner: one per building, side by side */
.yp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.yp-pair > div { min-width: 0; }
.yp-bname { margin: 0 0 8px; font-size: 17px; }
table.yp.compact th, table.yp.compact td { padding: 4px 1px; font-size: 12px; }
table.yp.compact td.yp-task, table.yp.compact th:first-child { min-width: 150px; max-width: 190px; padding-left: 8px; font-size: 13px; overflow-wrap: anywhere; }
table.yp.compact .yp-box { width: 16px; height: 16px; margin: 0; }
table.yp.compact .yp-box.sm { width: 11px; height: 11px; margin: 0; }
table.yp.compact .yp-cell { min-width: 26px; }
@media (max-width: 1250px) { .yp-pair { grid-template-columns: 1fr; } }

/* Year planner on phones / Fold / tablets: month by month, buildings side by side */
.ypm { display: none; }
@media (max-width: 1000px) {
  .yp-desk { display: none; }
  .ypm { display: block; }
}
.ypm-head { display: grid; gap: 8px; position: sticky; top: 0; z-index: 3; padding: 8px 0; background: var(--bg, #f4f6f8); }
.ypm-head > div { background: var(--accent); color: #fff; border-radius: 8px; padding: 7px 10px; font-weight: 700; font-size: 14px;
  line-height: 1.25; overflow-wrap: anywhere; }
.ypm-head > div:nth-child(2) { background: #3c4a57; }
.ypm-head small { opacity: .75; font-weight: 400; margin-left: 4px; }
.ypm-month { margin: 0 0 10px; }
.ypm-mname { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 2px; }
.ypm-row { display: grid; gap: 8px; }
.ypm-col { background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; min-width: 0; }
.ypm-item { padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.ypm-item:first-child { border-top: 0; }
.ypm-item > a { display: block; font-weight: 600; color: inherit; text-decoration: none; }
.ypm-item.late > a { color: var(--red); }
.ypm-item.done > a { color: #2e9e5b; }
.ypm-boxes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ypm-boxes .yp-box, .ypm-boxes .yp-box.sm { width: 22px; height: 22px; margin: 0; }
.ypm-item .btn { margin-top: 5px; }

/* ---------- New email (Emails > New email) ---------- */
.cmp { max-width: 900px; }
.cmp-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: start; margin-bottom: 10px; }
.cmp-row > label { padding-top: 9px; font-weight: 600; color: var(--muted, #667); }
.cmp-row select, .cmp-row input[type=text] { width: 100%; }
.cmp-box { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; padding: 5px 8px;
  border: 1px solid var(--line, #cfd6dd); border-radius: 8px; background: var(--card, #fff); cursor: text; }
.cmp-box input { flex: 1; min-width: 160px; border: 0 !important; outline: 0; box-shadow: none !important; padding: 4px 2px; background: transparent; }
.cmp-chips { display: contents; }
.cmp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px;
  background: #e6eef5; color: #1d3446; font-size: 13px; margin: 2px 4px 2px 0; }
.cmp-chip button { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 5px; color: #567; }
.cmp-chip button:hover { color: #b00; }
.cmp-sug { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 30; max-height: 320px; overflow: auto;
  background: var(--card, #fff); border: 1px solid var(--line, #cfd6dd); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.cmp-opt { padding: 8px 12px; cursor: pointer; display: flex; flex-direction: column; }
.cmp-opt small { color: var(--muted, #778); }
.cmp-opt:hover { background: #eef4f8; }
.cmp-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.cmp-body { width: 100%; min-height: 280px; margin: 4px 0 12px; font: inherit; line-height: 1.5; }
@media (max-width: 640px) { .cmp-row { grid-template-columns: 1fr; gap: 4px; } .cmp-row > label { padding-top: 0; } }

/* ---------- Work orders ---------- */
.wo-tiles .tile.box.on { outline: 2px solid var(--accent); }
.wo-tiles .new-pill.warn { background: #d1495b; }
.wo-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.wo-grid > .panel { min-width: 0; }
.wo-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 18px; margin: 6px 0 12px; }
.wo-facts small { display: block; color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; margin-bottom: 2px; }
.wo-desc { padding: 10px 12px; background: var(--bg, #f4f6f8); border-radius: 10px; margin-bottom: 10px; }
.wo-hist { list-style: none; margin: 0; padding: 0; }
.wo-hist li { padding: 6px 0; border-bottom: 1px solid var(--line, #e3e8ec); }
.wo-list td .btn.small { margin-top: 4px; }
.wo-sheet { display: none; }

/* ===== Building section as holographic see-through folders (folders.js) — JARVIS look ===== */
.bf, .bf-desk {
  --holo: #5ef2e6; --holo-2: #39c6ff; --holo-line: rgba(94,242,230,.28); --holo-glow: 0 0 18px rgba(94,242,230,.35);
  position: relative; border-radius: 22px; overflow: hidden; isolation: isolate;
  background:
    linear-gradient(rgba(94,242,230,.06) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(94,242,230,.06) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(90% 70% at 25% 0%, #13606a 0%, #0a3540 45%, #041a22 100%);
  box-shadow: inset 0 0 0 1px rgba(94,242,230,.25), inset 0 0 80px rgba(57,198,255,.12), 0 20px 50px rgba(4,26,34,.35);
}
.bf::after, .bf-desk::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 20; border-radius: inherit;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px),
              radial-gradient(60% 50% at 85% 100%, rgba(94,242,230,.10), transparent 70%); }

.bf { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; align-items: start; padding: 22px 26px 26px 18px; }
.bf-steps { position: sticky; top: 12px; display: flex; flex-direction: column; z-index: 6; }
.bf-steps a { display: flex; gap: 10px; align-items: center; padding: 9px 4px; color: rgba(200,245,245,.6); text-decoration: none;
  border-bottom: 1px solid var(--holo-line); font-size: 14px; letter-spacing: .04em; transition: color .2s, text-shadow .2s; }
.bf-steps a:hover { color: #fff; text-shadow: var(--holo-glow); }
.bf-steps .dot { width: 7px; height: 7px; border-radius: 1px; flex: none; border: 1px solid rgba(94,242,230,.4); }
.bf-steps .no { font: 600 12px/1 Consolas, "Cascadia Mono", monospace; color: var(--holo); opacity: .8; }
.bf-steps a.on { color: #fff; font-weight: 600; text-shadow: var(--holo-glow); }
.bf-steps a.on .dot { background: var(--holo); box-shadow: var(--holo-glow); border-color: var(--holo); }
.bf-steps .bf-home { color: var(--holo); font: 600 12px/1.2 Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }

/* the stack of folders, turned on an angle like the demo */
.bf-stage { position: relative; padding-top: 64px; }   /* flat: the pages inside are not tilted */
.bf-tab { position: absolute; top: -30px; height: 30px; padding: 7px 16px 0; border-radius: 10px 10px 0 0; white-space: nowrap;
  font: 600 11px/1.2 Consolas, "Cascadia Mono", monospace; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid var(--holo-line); border-bottom: 0; color: #dffcf8; }
.bf-back { position: absolute; z-index: 1; color: #dffcf8; text-decoration: none;
  top: calc(64px - var(--k) * 12px); left: calc(var(--k) * 14px); right: calc(var(--k) * -10px); height: 420px;
  border-radius: 4px 14px 14px 14px; border: 1px solid rgba(94,242,230,calc(.4 - var(--k) * .06));
  background: linear-gradient(160deg, rgba(94,242,230,calc(.14 - var(--k) * .02)), rgba(57,198,255,.04));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 22px rgba(94,242,230,calc(.16 - var(--k) * .03)); transition: transform .35s, background .35s; }
.bf-back .bf-tab { left: calc(var(--k) * 160px + 40px); background: rgba(94,242,230,.10); }
.bf-back:hover { transform: translateY(-8px); background: linear-gradient(160deg, rgba(94,242,230,.22), rgba(57,198,255,.06)); }
.bf-back:hover .bf-tab { color: #fff; text-shadow: var(--holo-glow); }

/* the front folder: glass rim and glow, but the page inside looks exactly as it normally does */
.bf-front { position: relative; z-index: 5; border-radius: 4px 16px 16px 16px; padding: 22px 24px; min-height: 380px;
  background: rgba(244,246,248,.97); color: var(--ink);
  border: 1px solid rgba(94,242,230,.7);
  box-shadow: 0 0 0 4px rgba(94,242,230,.10), 0 0 40px rgba(94,242,230,.28), 0 40px 80px rgba(0,0,0,.35), inset 0 1px 0 #fff; }
.bf-front::before, .bf-front::after { content: ""; position: absolute; width: 26px; height: 26px; pointer-events: none; border: 2px solid var(--holo); filter: drop-shadow(0 0 6px var(--holo)); }
.bf-front::before { right: -6px; top: -6px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.bf-front::after { left: -6px; bottom: -6px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.bf-tab-front { left: -1px; background: rgba(244,246,248,.97); border-color: rgba(94,242,230,.7); color: var(--side); }
.bf-body > .top:first-child { margin-top: 0; }
/* inside a folder, row buttons may wrap so wide tables (e.g. Contractors) fit instead of being cut off at the folder edge */
.bf-body table.list td.nowrap { white-space: normal; }
.bf-body table.list td.nowrap .btn { margin: 2px 0; white-space: nowrap; }
.bf-body table.list td a { overflow-wrap: anywhere; }
.bf-fwd .bf-front { animation: bfIn .5s cubic-bezier(.2,.8,.2,1); }
.bf-bwd .bf-front { animation: bfBack .5s cubic-bezier(.2,.8,.2,1); }
@keyframes bfIn { from { opacity: 0; transform: translateX(40px); } }
@keyframes bfBack { from { opacity: 0; transform: translateX(-40px); } }

/* the folder desk on #/building: every folder fanned out on an angle */
.bf-desk { padding: 64px 56px 30px 34px; perspective: 1600px; perspective-origin: 50% 0%; }
.bf-fan { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 50px 22px;
  transform: rotateX(16deg) rotateY(-8deg); transform-origin: 50% 0; }
.bf-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 140px; padding: 18px 18px 16px;
  color: #e8fffd; text-decoration: none; border-radius: 4px 16px 16px 16px; border: 1px solid rgba(94,242,230,.45);
  background: linear-gradient(160deg, rgba(94,242,230,.16), rgba(57,198,255,.04));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 24px rgba(94,242,230,.14), 0 24px 40px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .35s, box-shadow .35s; }
.bf-card .bf-tab { left: -1px; background: rgba(94,242,230,.12); border-color: rgba(94,242,230,.45); }
.bf-fan.bf-few { grid-template-columns: repeat(auto-fill, minmax(220px, 300px)); }
.bf-card .ico { font-size: 26px; line-height: 1; margin-bottom: 4px; filter: drop-shadow(0 0 6px rgba(94,242,230,.5)); }
.bf-card b { font-size: 17px; color: #fff; }
.bf-card small { color: rgba(205,240,240,.72); }
.bf-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255,255,255,.35), transparent 55%); }
.bf-card:hover::after { opacity: 1; }
.bf-card:hover { transition: transform .12s ease-out, background .35s, box-shadow .35s; z-index: 3; }
.bf-card:hover, .bf-card:focus-visible { outline: none;
  transform: perspective(480px) translateY(-14px) rotateX(var(--rx, 8deg)) rotateY(var(--ry, -20deg)) scale(1.07);
  background: linear-gradient(160deg, rgba(94,242,230,.28), rgba(57,198,255,.08)); box-shadow: 0 0 36px rgba(94,242,230,.4), 0 30px 50px rgba(0,0,0,.3); }
.bf-card:hover .bf-tab { color: #fff; text-shadow: var(--holo-glow); }
.bf-desk .top h1, .bf-desk .top .sub { color: #e8fffd; }
.bf-desk .top h1 { text-shadow: 0 0 16px rgba(94,242,230,.4); letter-spacing: .02em; }
.bf-desk .top { position: relative; z-index: 2; margin: -40px 0 30px; }
.bf-hint { color: rgba(205,240,240,.6); font: 12px Consolas, monospace; letter-spacing: .08em; margin-top: 26px; text-align: right; }

@media (max-width: 900px) {
  .bf { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px 10px 14px; border-radius: 16px; perspective: none; }
  .bf-steps { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .bf-steps a { flex: none; border: 1px solid var(--holo-line); border-radius: 999px; padding: 6px 12px; background: rgba(94,242,230,.06); font-size: 13px; }
  .bf-steps .dot { display: none; }
  .bf-stage, .bf-stage:hover { transform: none; padding-top: 38px; }
  .bf-back { display: none; }
  .bf-front { padding: 16px 12px; min-height: 0; }
  .bf-desk { padding: 56px 12px 16px; border-radius: 16px; }
  .bf-fan { transform: none; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 42px 12px; }
}
@media (prefers-reduced-motion: reduce) { .bf-front { animation: none !important; } .bf-card, .bf-back, .bf-stage { transition: none; } }
@media print { .bf { display: block; background: none; box-shadow: none; padding: 0; } .bf::after { display: none; }
  .bf-stage { transform: none !important; padding: 0; } .bf-front { box-shadow: none; border: 0; padding: 0; background: none; color: #000; backdrop-filter: none; } }

/* ===== Dashboard: the same holographic glass, with the quick-look info in floating windows ===== */
.hd { padding: 26px 28px 30px; perspective: none; }
.hd-top { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.hd-top h1 { margin: 0; color: #e8fffd; text-shadow: 0 0 16px rgba(94,242,230,.4); letter-spacing: .02em; }
.hd-top .sub { display: block; color: rgba(205,240,240,.7); font: 12px/1.6 Consolas, "Cascadia Mono", monospace; letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.hd-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.hd-btns .btn:not(.primary) { background: rgba(94,242,230,.10); color: #dffcf8; border-color: rgba(94,242,230,.45); }
.hd-btns .btn:not(.primary):hover { background: rgba(94,242,230,.2); color: #fff; }

/* glowing number chips */
.hd-chips { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; margin-bottom: 44px; }
.hd-chip { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 4px 12px 12px 12px; text-decoration: none;
  border: 1px solid rgba(94,242,230,.4); background: linear-gradient(160deg, rgba(94,242,230,.14), rgba(57,198,255,.03));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 18px rgba(94,242,230,.12); transition: transform .25s, box-shadow .25s, background .25s; }
.hd-chip b { font: 700 26px/1.1 "Segoe UI", system-ui, sans-serif; color: #fff; text-shadow: 0 0 12px rgba(94,242,230,.6); }
.hd-chip span { color: rgba(205,240,240,.75); font: 11px/1.3 Consolas, "Cascadia Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.hd-chip:hover { transform: translateY(-3px); background: linear-gradient(160deg, rgba(94,242,230,.24), rgba(57,198,255,.06)); box-shadow: 0 0 28px rgba(94,242,230,.35); }
.hd-chip.warn { border-color: rgba(255,122,144,.6); background: linear-gradient(160deg, rgba(255,122,144,.2), rgba(255,122,144,.04)); }
.hd-chip.warn b { text-shadow: 0 0 12px rgba(255,122,144,.8); }

/* floating windows, laid out like a wall of screens */
.hd-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; align-items: start; }
.hd-col { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 1250px) { .hd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hd-col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; align-items: start; } }
.hw { position: relative; display: block; margin: 0 0 50px; padding: 16px 18px 12px; border-radius: 4px 14px 14px 14px;
  background: rgba(244,246,248,.97); color: var(--ink); border: 1px solid rgba(94,242,230,.7);
  box-shadow: 0 0 0 4px rgba(94,242,230,.08), 0 0 32px rgba(94,242,230,.22), 0 26px 50px rgba(0,0,0,.32), inset 0 1px 0 #fff;
  animation: hwIn .55s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--k, 0) * 70ms); transition: transform .3s, box-shadow .3s; }
.hw:hover { transform: translateY(-5px); box-shadow: 0 0 0 4px rgba(94,242,230,.14), 0 0 46px rgba(94,242,230,.4), 0 34px 60px rgba(0,0,0,.36), inset 0 1px 0 #fff; }
.hw::before, .hw::after { content: ""; position: absolute; width: 20px; height: 20px; pointer-events: none; border: 2px solid var(--holo); filter: drop-shadow(0 0 5px var(--holo)); }
.hw::before { right: -5px; top: -5px; border-left: 0; border-bottom: 0; border-radius: 0 7px 0 0; }
.hw::after { left: -5px; bottom: -5px; border-right: 0; border-top: 0; border-radius: 0 0 0 7px; }
@keyframes hwIn { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.hw-tab { position: absolute; left: -1px; top: -30px; height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 14px; white-space: nowrap;
  border-radius: 10px 10px 0 0; border: 1px solid rgba(94,242,230,.7); border-bottom: 0; background: rgba(244,246,248,.97); color: var(--side);
  font: 600 11px/1 Consolas, "Cascadia Mono", monospace; letter-spacing: .14em; text-transform: uppercase; }
.hw-count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px;
  background: #0a3540; color: #5ef2e6; font-size: 11px; letter-spacing: 0; box-shadow: 0 0 8px rgba(94,242,230,.5); }
.hw-list { list-style: none; margin: 0; padding: 0; }
.hw-list li + li { border-top: 1px solid var(--line); }
.hw-list a { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 4px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.hw-list a:hover { background: rgba(94,242,230,.12); }
.hw-main { min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.hw-main small { font-size: 12px; }
.hw-main .num { color: var(--muted); font-weight: 600; }
.hw-side { flex: none; display: flex; gap: 6px; align-items: center; }
.hw-list li.is-new a { background: linear-gradient(90deg, rgba(94,242,230,.16), transparent 70%); }
.hw-empty { color: var(--muted); margin: 6px 4px 8px; }
.hw-h { margin: 12px 4px 2px; font: 600 11px/1.4 Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hw-alert { display: block; margin: 2px 0 8px; padding: 8px 10px; border-radius: 8px; background: #fff4dc; color: #7a5200; font-weight: 600; text-decoration: none; border: 1px solid #f1d38b; }
.hw-more { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); text-align: right;
  font: 600 12px/1.2 Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; color: #0d7f88; text-decoration: none; }
.hw-more:hover { color: #054a52; }
.hw-folders { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hw-folders a { flex: 1; min-width: 100px; padding: 10px 12px; border-radius: 4px 10px 10px 10px; text-decoration: none; text-align: center; font-weight: 600;
  color: #dffcf8; background: linear-gradient(160deg, #13606a, #0a3540); border: 1px solid rgba(94,242,230,.6); box-shadow: 0 0 12px rgba(94,242,230,.25); transition: transform .2s, box-shadow .2s; }
.hw-folders a:hover { transform: translateY(-2px); box-shadow: 0 0 20px rgba(94,242,230,.5); color: #fff; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 8px #2ecc71; margin-right: 6px; animation: livePulse 1.6s infinite; vertical-align: middle; }
@keyframes livePulse { 50% { opacity: .35; } }
.hw-activity { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; }
.hw-activity li { padding: 6px 4px; border-top: 1px solid var(--line); font-size: 13px; display: flex; justify-content: space-between; gap: 10px; }
.hw-activity li:first-child { border-top: 0; }
.hw-activity small { color: var(--muted); flex: none; }

/* the dark glass window holding the ring chart */
.hw-dark { background: linear-gradient(160deg, rgba(94,242,230,.14), rgba(4,26,34,.55)); color: #e8fffd; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hw-dark .hw-tab { background: rgba(10,53,64,.92); color: #dffcf8; }
.hw-dark .hw-empty { color: rgba(205,240,240,.7); }
.ring-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.ring { width: 180px; height: 180px; flex: none; }
.ring-ticks line { stroke: rgba(94,242,230,.45); stroke-width: 1; }
.ring-track { stroke: rgba(94,242,230,.10); }
.ring-core { fill: rgba(4,26,34,.6); stroke: rgba(94,242,230,.35); stroke-width: 1; }
.ring-n { fill: #fff; font: 700 30px "Segoe UI", system-ui, sans-serif; filter: drop-shadow(0 0 6px rgba(94,242,230,.8)); }
.ring-l { fill: #5ef2e6; font: 600 10px Consolas, monospace; letter-spacing: .3em; }
.ring-seg { animation: ringIn 1s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
@keyframes ringIn { from { opacity: 0; stroke-width: 2; } }
.ring-ticks { animation: ringSpin 60s linear infinite; transform-origin: 90px 90px; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.ring-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 170px; }
.ring-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) 60px 24px; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; }
.ring-legend i { width: 10px; height: 10px; border-radius: 2px; box-shadow: 0 0 6px currentColor; }
.ring-legend .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring-legend .bar { height: 4px; border-radius: 99px; background: rgba(94,242,230,.12); overflow: hidden; }
.ring-legend .bar b { display: block; height: 100%; border-radius: 99px; }
.ring-legend .n { text-align: right; font-weight: 700; color: #fff; }

@media (max-width: 900px) {
  .hd { padding: 16px 10px 10px; border-radius: 16px; }
  .hd-chips { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); margin-bottom: 40px; }
  .hd-chip b { font-size: 22px; }
  .hd-grid, .hd-col:last-child { display: flex; flex-direction: column; }
  .hw { padding: 14px 12px 10px; margin-bottom: 44px; }
}
@media (prefers-reduced-motion: reduce) { .hw, .ring-seg, .ring-ticks, .live-dot { animation: none !important; } .hw, .hd-chip { transition: none; } }
@media print { .hd { background: none; box-shadow: none; } .hd::after { display: none; } .hw { box-shadow: none; animation: none; } }

/* tick boxes for "Delete ticked" (bulk.js) */
td.tick, th.tick { width: 34px; text-align: center; }
td.tick input, .tick-box { width: 18px; height: 18px; cursor: pointer; }
.photo { position: relative; }
.photo > .tick-box { position: absolute; top: 6px; left: 6px; z-index: 2; box-shadow: 0 0 0 3px rgba(255,255,255,.85); border-radius: 3px; }
.tl-item > .tick-box { float: left; margin: 4px 8px 0 0; }
.tick-bar { margin: 6px 0 8px; }
@media (min-width: 761px) { .tiles.boxes.wo-tiles, .tiles.boxes.wo-boxes { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); } }
@media (max-width: 900px) { .wo-grid { grid-template-columns: 1fr; } }
@media print {
  body.print-wo .side, body.print-wo .no-print, body.print-wo .secbar, body.print-wo .toast, body.print-wo #snapFab, body.print-wo .snap-fab { display: none !important; }
  body.print-wo main { padding: 0; }
  body.print-wo .wo-sheet { display: block; color: #000; font-size: 13px; }
  .wo-sheet-head { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 12px; }
  .wo-sheet-head h1 { margin: 0 0 4px; }
  .wo-sheet-head .right { text-align: right; }
  .wo-sheet-t { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
  .wo-sheet-t th, .wo-sheet-t td { text-align: left; padding: 6px 8px; border: 1px solid #bbb; vertical-align: top; }
  .wo-sheet-t th { width: 120px; background: #f2f2f2; }
  .wo-sheet h3 { margin: 14px 0 4px; }
  .wo-sheet-ph { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .wo-sheet-ph img { width: 100%; height: 220px; object-fit: cover; break-inside: avoid; }
  .wo-sheet-sig { margin-top: 24px; }
}

/* ===== WHS & Compliance (compliance.js) ===== */
.cmp-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.cmp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: inherit; text-decoration: none; font-weight: 600; }
.cmp-chip:hover, .cmp-chip.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cmp-start { border-left: 4px solid var(--accent); }
.cmp-hub .hub-tile { padding-top: 18px; }
.cmp-count { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; font-size: 12px; }
.cmp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 14px 0; }
.cmp-facts > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.cmp-facts small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
#cmpDrop.drag { outline: 3px dashed var(--accent); }
fieldset.cmp-set { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; padding: 8px 12px; }
fieldset.cmp-set legend { font-weight: 700; padding: 0 6px; }
fieldset.cmp-set label.chk { font-weight: normal; padding: 3px 0; }
.cmp-register h3 { margin: 18px 0 6px; }
@media print { .cmp-register { border: 0; box-shadow: none; padding: 0; } .cmp-register table { font-size: 11px; } .cmp-register h3 { break-after: avoid; } .cmp-register tr { break-inside: avoid; } }

/* WHS & Compliance sub-folders: floating glass cards on a small holo desk inside the page (tilt comes from folders.js) */
.cmp-desk { padding: 56px 26px 24px; margin-top: 8px; perspective: none; }
.cmp-fan { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 48px 20px; transform: none; }
.cmp-fan .bf-card { min-height: 150px; animation: cmpFloat 6s ease-in-out infinite; animation-delay: calc(var(--k) * -.45s); }
.cmp-fan .bf-card:hover, .cmp-fan .bf-card:focus-visible { animation: none; }
.cmp-fan .bf-tab { max-width: calc(100% + 2px); overflow: hidden; text-overflow: ellipsis; }
@keyframes cmpFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.cmp-desk .cmp-count { justify-content: flex-start; margin-top: auto; padding-top: 8px; }
.cmp-desk .cmp-n { color: #bff7f1; font-weight: 600; }
.cmp-desk .cmp-n.dim { color: rgba(205,240,240,.45); font-weight: normal; }
.cmp-fan .bf-card.cmp-hot { border-color: rgba(255,110,110,.75); box-shadow: 0 0 26px rgba(255,90,90,.35), 0 24px 40px rgba(0,0,0,.25); }
.cmp-fan .bf-card.cmp-warm { border-color: rgba(255,196,90,.7); box-shadow: 0 0 24px rgba(255,190,80,.28), 0 24px 40px rgba(0,0,0,.25); }
@media (max-width: 900px) { .cmp-desk { padding: 48px 10px 14px; } .cmp-fan { transform: none; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 40px 10px; } }
@media (prefers-reduced-motion: reduce) { .cmp-fan .bf-card { animation: none; } }
@media print { .cmp-desk { display: none; } }

/* straight folder desks (Mark: no angled layouts from now on), small count badge on a desk folder,
   and the Emails tab row is hidden inside the folders (the folders do that job) */
.bf-fan.bf-straight { transform: none; }
.bf-badge { align-self: flex-start; margin-top: auto; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: #04212a; background: var(--holo, #5ef2e6); box-shadow: 0 0 12px rgba(94,242,230,.55); }
.bf-sec-emails .bf-body > .tabs, .bf-sec-emails .bf-body .tabs:first-of-type { display: none; }

/* Site Manager Pro: name on one line, PRO as a small tag */
.brand-name { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.pro-tag { font-size: 10px; font-weight: 800; letter-spacing: .12em; padding: 2px 6px; border-radius: 5px; color: #062a2a; background: linear-gradient(135deg, #7ff3e2, #3cc7b4); box-shadow: 0 0 10px rgba(80, 230, 210, .45); }
.brand { gap: 8px; padding-right: 12px; }
.brand-name { font-size: 16px; gap: 5px; }
.pro-tag { font-size: 9px; padding: 2px 5px; letter-spacing: .1em; }
.brand > .logo-img { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 15px; }

/* company name above the building picker */
.co-name { padding: 0 18px 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8fe9dc; }
.co-name:empty { display: none; }
/* long names wrap onto a second line instead of being cut off */
.co-name { position: relative; z-index: 1; margin-top: 6px; padding-bottom: 10px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.co-name.switchable { cursor: pointer; }
.co-name.switchable::after { content: ' ⇄'; opacity: .7; white-space: nowrap; }
.co-name.switchable:hover { color: #fff; }
.demo-flag { position: relative; z-index: 1; margin: 0 18px 14px; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; color: #3a2400; background: linear-gradient(135deg, #ffd27a, #ffb347); text-align: center; }
.cmp-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.cmp-col .cmp-facts { grid-template-columns: repeat(3, 1fr); }
.cmp-rec { padding: 6px 0; border-bottom: 1px solid var(--line, #e5e7eb); }

/* ---------- Import files (21 Nov 2026) ---------- */
.imp-scroll{overflow:auto;max-height:60vh;border:1px solid var(--line);border-radius:10px}
.imp-table input,.imp-table select{width:100%;min-width:70px;padding:4px 6px;font-size:13px}
.imp-table td{padding:4px 6px;vertical-align:middle}
.imp-table thead th{position:sticky;top:0;background:var(--panel,#fff);z-index:1}
.imp-towers{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:0 0 10px}
.imp-towers label{display:flex;gap:6px;align-items:center}
.imp-towers select{width:auto}
.imp-bar{height:12px;border-radius:8px;background:rgba(0,0,0,.08);overflow:hidden;margin:8px 0}
.imp-bar span{display:block;height:100%;background:linear-gradient(90deg,#1aa3b8,#3ad1e0);transition:width .6s}
.imp-drop{margin-top:12px;border:2px dashed var(--line);border-radius:12px;padding:22px;text-align:center;color:var(--muted)}
.imp-drop.on{border-color:#1aa3b8;background:rgba(26,163,184,.08)}
.imp-cl{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-top:12px}
.imp-cl-card{display:block;border:1px solid var(--line);border-radius:12px;padding:12px 14px;cursor:pointer}
.imp-cl-card:has(input:checked){border-color:#1aa3b8;box-shadow:0 0 0 2px rgba(26,163,184,.25)}
.imp-cl-card.have{opacity:.6;cursor:default}
.imp-cl-card ul{margin:8px 0 0;padding-left:18px;line-height:1.5}
.imp-done ul{line-height:1.7}
.btn.disabled{opacity:.5;pointer-events:none}

/* Folders that need attention (e.g. a checklist not completed): translucent red glass (23 Nov 2026) */
.bf-card.bf-warn { border-color: rgba(255,110,110,.8);
  background: linear-gradient(160deg, rgba(255,80,80,.32), rgba(255,60,60,.10));
  box-shadow: 0 0 28px rgba(255,80,80,.38), 0 24px 40px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.2); }
.bf-card.bf-warn:hover, .bf-card.bf-warn:focus-visible { background: linear-gradient(160deg, rgba(255,90,90,.45), rgba(255,60,60,.16));
  box-shadow: 0 0 40px rgba(255,80,80,.5), 0 30px 50px rgba(0,0,0,.3); }
.bf-card.bf-warn .bf-tab { background: rgba(255,80,80,.22); border-color: rgba(255,110,110,.8); }
.bf-card.bf-warn .ico { filter: drop-shadow(0 0 6px rgba(255,90,90,.7)); }
.bf-card.bf-warn .bf-badge { background: rgba(255,80,80,.85); color: #fff; border-color: rgba(255,140,140,.9); }
.bf-back.bf-warn { border-color: rgba(255,110,110,.65); background: linear-gradient(160deg, rgba(255,80,80,.24), rgba(255,60,60,.06));
  box-shadow: 0 0 22px rgba(255,80,80,.3); }
.bf-back.bf-warn .bf-tab { background: rgba(255,80,80,.25); border-color: rgba(255,110,110,.75); color: #ffe3e3; }
.bf-steps a.bf-warn { color: #ffb4b4; }
.bf-steps a.bf-warn .dot { background: rgba(255,80,80,.85); border-color: #ff7a7a; box-shadow: 0 0 8px rgba(255,80,80,.8); }
.bf-tab-front.bf-warn { background: rgba(255,225,225,.97); border-color: rgba(255,110,110,.8); color: #a32020; }
/* the unfinished lists on the Checklists page itself */
table.list tr.cl-due td { background: rgba(255,80,80,.10); }
table.list tr.cl-due td:first-child { box-shadow: inset 4px 0 0 rgba(220,50,50,.75); }

/* Maintenance form: months it's due on the schedule */
.lbl-sm { display:block; font-size:.9em; margin-bottom:4px; }
.dm-row { display:flex; flex-wrap:wrap; gap:4px 10px; }
.dm-row .dm { min-width:62px; }


/* Body corporate meeting report builder (gmreport.js) */
.gm-panel { border-left: 4px solid var(--accent, #0f766e); }
.gm-h { font-size: 1.05rem; margin: 22px 0 8px; }
.gm-stats { margin: 6px 0 4px; gap: 6px; flex-wrap: wrap; }
.gm-case { padding-top: 12px; }
.gm-case.gm-off { opacity: .5; }
.gm-case-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; }
.gm-case-head .gm-saved { margin-left: auto; }
.gm-desc summary { cursor: pointer; }
.gm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.gm-grid label { display: flex; flex-direction: column; gap: 4px; }
.gm-grid textarea { min-height: 76px; }
@media (max-width: 760px) { .gm-grid { grid-template-columns: 1fr; } }
.gm-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gm-ph { position: relative; width: 112px; height: 84px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: .45; }
.gm-ph.on { border-color: var(--accent, #0f766e); opacity: 1; }
.gm-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gm-ph input { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent, #0f766e); cursor: pointer; text-decoration: underline; font: inherit; }

/* Inductions folder (inductions.js) */
.ind-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.ind-tools input[type=search] { flex: 1 1 220px; min-width: 0; }
.ind-tools label { display: flex; gap: 6px; align-items: center; margin: 0; }
.ind-group { margin-bottom: 18px; }
.ind-group h3 { margin: 6px 0 8px; font-size: 1rem; }
.ind-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line, #ddd); }
.ind-inline label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ind-inline input[type=file] { max-width: 100%; }
.ind-exp { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ind-exp input { flex: 1 1 140px; }
#indDrop.drag { outline: 3px dashed var(--accent, #2a7); outline-offset: -6px; }

/* Case notes panel */
#notesPanel .tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#notesPanel .note-btns { margin-left: auto; display: flex; gap: 6px; }
#notesPanel .notes-list li.note { padding-bottom: 10px; }
#notesPanel .comment-box textarea { min-height: 70px; }

/* Templates & forms folder (forms.js) */
#frmDrop .toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
#frmDrop .toolbar input[type=search] { flex: 1 1 220px; min-width: 0; }
#frmDrop.drag { outline: 3px dashed var(--accent, #2a7); outline-offset: -6px; }
.frm-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.frm-table td.frm-tick { width: 28px; }
.frm-table td.frm-tick input { width: 18px; height: 18px; }
.frm-table td { vertical-align: top; }
.frm-cons { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 42vh; overflow: auto;
  border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 8px; }
.frm-con { display: flex !important; flex-direction: row !important; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 8px; cursor: pointer; margin: 0; }
.frm-con:has(input:checked) { background: rgba(26,163,184,.12); }
.frm-con input { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.frm-con.muted { cursor: default; }
@media (max-width: 700px) { .frm-table td.nowrap.no-print { white-space: normal; } .frm-table td.nowrap.no-print .btn { margin: 2px 0; } }
/* Service reports: "what it's for" headline + defects/readings pill (reportsum.py) */
.rs-flag { display:inline-block; font-size:.78em; font-weight:600; padding:1px 8px; border-radius:999px; margin-left:4px; vertical-align:1px; background:#eef1f4; color:#4a5560; white-space:nowrap; }
.rs-flag.ok { background:#e3f4e8; color:#1d6b35; }
.rs-flag.amber { background:#fff1d6; color:#8a5a00; }
.rs-flag.red { background:#fde2e2; color:#a11d1d; }
.rs-for { font-size:.92em; }
.rs-edit { background:none; border:0; padding:0 4px; cursor:pointer; color:#8a96a3; font-size:.95em; }
.rs-edit:hover { color:#2563eb; }
.rs-input { min-width:260px; width:60%; }
/* Received emails: act on a quote/invoice in place */
.filed .qa-row { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:6px 0 4px 1.6em; }

/* Naming note for new clients (app.js NAMING_TIP) */
.naming-tip { background: #fff8e6; border: 1px solid #f0d48a; border-radius: 8px; padding: 8px 12px; margin: 4px 0 10px; font-size: .92em; }
.naming-tip summary { cursor: pointer; font-weight: 600; }
.naming-tip ul { margin: 6px 0; padding-left: 20px; }
.naming-tip li { margin: 3px 0; }
.naming-tip p { margin: 6px 0; }

/* File viewer: 🖨 Print prints only the open file (app.js printBtn, body.print-pv) */
.pv-print { color: #9cf; text-decoration: underline; cursor: pointer; }
.pv-print.pv-wait { color: #889; text-decoration: none; cursor: default; }
@media print {
  body.print-pv > *:not(.pv) { display: none !important; }
  body.print-pv .pv { position: static !important; display: block !important; background: #fff !important; overflow: visible !important; inset: auto; }
  body.print-pv .pv button, body.print-pv .pv-bar, body.print-pv .pv-pno, body.print-pv .pv .muted { display: none !important; }
  body.print-pv .pv img:not(.hidden) { display: block; max-width: 100%; max-height: 95vh; width: auto; height: auto; margin: 0 auto; }
  body.print-pv .pv-doc { width: auto; max-height: none; overflow: visible; margin: 0; padding: 0; border-radius: 0; background: #fff; color: #000; }
  body.print-pv .pv-pdf { padding: 0; background: #fff; }
  body.print-pv .pv-pdf .pv-title { display: none; }
  body.print-pv .pv-pages canvas { width: auto !important; height: auto; max-width: 100%; max-height: 97vh; margin: 0 auto; box-shadow: none; break-after: page; break-inside: avoid; }
  body.print-pv .pv-pages canvas:last-of-type { break-after: auto; }
  body.print-pv .pv-table-wrap { overflow: visible; }
  body.print-pv .pv-table td { white-space: normal; max-width: none; font-size: 10px; }
}

