/* Hive Rent — shared styles for the tenant app and the staff page.
   Brand tokens are the same as Hive Central (hivequarters.com.my). */
:root {
  --honey: #F7D26A; --honey-dark: #E0B94A; --honey-light: #FDF3D4; --honey-ink: #8A6D1F;
  --navy: #383A46; --navy-light: #EDEEF2;
  --coral: #F38C72; --coral-light: #FDEBE6; --coral-ink: #B4472C;
  --teal: #63C9CC; --teal-light: #E4F6F7; --teal-ink: #217478;
  --green: #1FAE5C; --green-light: #E4F7EC; --green-ink: #12703B;
  --purple-light: #EEECFA; --purple-ink: #4A3FA0;
  --ink: #1f1f1f; --text: #52525b; --muted: #71717a; --line: #e5e5e5; --soft: #f4f4f5;
  --bg: #FAFAF8; --card: #fff;
  --radius: 16px; --pill: 999px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
h1, h2, h3 { color: var(--ink); margin: 0; }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.2px; }
h2 { font-size: 16px; font-weight: 800; }
h3 { font-size: 14px; font-weight: 700; }
a { color: var(--navy); }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ── app shell ── */
.app { max-width: 560px; margin: 0 auto; padding: 0 16px 96px; }
.topbar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 14px 0 10px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--navy); font-size: 15px; }
.brand-logo { height: 34px; width: auto; display: block; }
.sbrand { display: inline-flex; align-items: center; gap: 10px; text-align: left; }
.sbrand img { width: 36px; height: 36px; flex: none; }
.sbrand > span { display: flex; flex-direction: column; line-height: 1.05; }
.sbrand b { font-size: 19px; font-weight: 800; color: var(--navy); }
.sbrand small { font-size: 10.5px; font-weight: 600; color: #8a8c99; margin-top: 2px; }
.sbrand b i { font-style: normal; color: #F7B500; }
.side-brand .sbrand b { color: #fff; }
.side-brand .sbrand small { color: #a9abb8; }
.login .logo .sbrand img { width: 48px; height: 48px; }
.login .logo .sbrand b { font-size: 24px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--honey); display: flex; align-items: center; justify-content: center; font-weight: 800; border: none; cursor: pointer; }
.banner { border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 6px 0 12px; }
.banner.info { background: var(--teal-light); color: var(--teal-ink); }
.banner.warn { background: var(--honey-light); color: var(--honey-ink); }
.banner.bad { background: var(--coral-light); color: var(--coral-ink); }
.banner.good { background: var(--green-light); color: var(--green-ink); }
.banner.act { background: var(--coral-light); color: var(--coral-ink); border: 1.5px solid var(--coral); }
.banner.act a { color: inherit; font-weight: 700; white-space: nowrap; }
/* Guest / agent demo login: DEMO strip on every screen, faint DEMO mark behind the page (lib/guest.js). */
.demo-strip { position: sticky; top: 0; z-index: 30; display: flex; gap: 10px; align-items: center; margin: 6px 0 12px;
  padding: 8px 12px; border-radius: 12px; background: var(--coral-ink); color: #fff; font-size: 12.5px; line-height: 1.35; }
.demo-strip .demo-tag { flex: none; font-weight: 800; letter-spacing: .12em; font-size: 13px; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.22); }
body.is-demo::after { content: "DEMO"; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-28deg);
  font-size: 30vmin; font-weight: 900; letter-spacing: .08em; color: var(--coral); opacity: .07; pointer-events: none; z-index: 9999; white-space: nowrap; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.nav-inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.nav a { text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; position: relative; }
.nav a svg { width: 22px; height: 22px; }
.nav a.on { color: var(--navy); }
.nav a.on svg { color: var(--navy); }
.nav a.on::before { content: ''; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 3px; background: var(--honey); }
.nav .dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }

/* ── cards ── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card, .card + .section, .section + .card { margin-top: 14px; }
.section { margin-top: 22px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.section-title a { font-size: 12px; font-weight: 700; text-decoration: none; color: var(--honey-ink); }

.hero { background: var(--navy); color: #fff; border-radius: 20px; padding: 18px; position: relative; overflow: hidden; }
.hero h1 { color: #fff; }
.hero .prop { color: #fff; font-weight: 700; font-size: 13px; margin-top: 6px; }
.hero .place { color: var(--honey); font-weight: 700; font-size: 13px; margin-top: 4px; }
.hero .prop + .place { margin-top: 2px; }
.hero .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.hero .fact { background: rgba(255,255,255,.08); border-radius: 12px; padding: 10px; }
.hero .fact .k { font-size: 11px; color: #c9cad3; }
.hero .fact .v { font-size: 15px; font-weight: 800; color: #fff; margin-top: 2px; }
.hero .comb { position: absolute; right: -24px; top: -24px; width: 120px; height: 120px; opacity: .12; }

.due { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.due .amt { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.due.over .amt { color: var(--coral-ink); }

.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.action { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 12px; }
.action .ic { width: 38px; height: 38px; margin: 0 auto 6px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--honey-light); color: var(--honey-ink); }
.action .ic svg { width: 20px; height: 20px; }

.list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-top: 1px solid var(--soft); text-decoration: none; color: inherit; cursor: pointer; }
.item:first-child { border-top: none; }
.item .grow { flex: 1; min-width: 0; }
.item .t { color: var(--ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 12px; color: var(--muted); }
.item .r { text-align: right; font-weight: 800; color: var(--ink); white-space: nowrap; }
.item .chev { color: #c4c4c8; }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); }

.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--pill); white-space: nowrap; }
.chip.overdue, .chip.bad { background: var(--coral-light); color: var(--coral-ink); }
.chip.pending, .chip.open, .chip.warn { background: var(--honey-light); color: var(--honey-ink); }
.chip.paid, .chip.resolved, .chip.applied, .chip.good, .chip.active, .chip.booked { background: var(--green-light); color: var(--green-ink); }
.chip.in_progress, .chip.info, .chip.upcoming, .chip.contacted, .chip.viewing, .chip.to_apply { background: var(--teal-light); color: var(--teal-ink); }
.chip.on_hold, .chip.ended, .chip.void, .chip.new, .chip.not_interested, .chip.cancelled { background: var(--soft); color: var(--muted); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--ink); font-weight: 600; text-align: right; }
.lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.lines td { padding: 8px 0; border-top: 1px solid var(--soft); }
.lines td:last-child { text-align: right; font-weight: 700; color: var(--ink); }
.lines tr.total td { border-top: 2px solid var(--line); font-weight: 800; color: var(--ink); }

/* ── forms ── */
label.f { display: block; font-size: 12px; font-weight: 700; color: var(--ink); margin: 12px 0 5px; }
input.i, select.i, textarea.i { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; color: var(--ink); font-size: 15px; }
input.i:focus, select.i:focus, textarea.i:focus { outline: none; border-color: var(--honey-dark); box-shadow: 0 0 0 3px var(--honey-light); }
textarea.i { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin-top: 12px; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--navy); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: var(--pill); padding: 12px 20px; font-weight: 800; cursor: pointer; text-decoration: none; font-size: 14px; }
.btn.primary { background: var(--honey); color: var(--navy); }
.btn.primary:hover { background: var(--honey-dark); }
.btn.dark { background: var(--navy); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 13px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.amounts button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 0; font-weight: 800; color: var(--navy); cursor: pointer; }
.amounts button.on { border-color: var(--navy); background: var(--navy); color: var(--honey); }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.files .f { background: var(--soft); border-radius: 10px; padding: 6px 10px; font-size: 12px; display: flex; gap: 8px; align-items: center; }
.files .f button { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; }
.err { color: var(--coral-ink); font-size: 13px; margin-top: 10px; }

/* ── ticket thread ── */
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; border-radius: 16px; padding: 10px 12px; font-size: 14px; word-wrap: break-word; }
.msg .body { white-space: pre-wrap; }
.msg .who { font-size: 11px; font-weight: 700; margin-bottom: 3px; opacity: .8; }
.msg .when { font-size: 10.5px; opacity: .65; margin-top: 4px; }
.msg.tenant { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.staff { align-self: flex-start; background: #fff; box-shadow: var(--shadow); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: 12px; padding: 2px; }
.msg a.att { display: inline-block; margin-top: 6px; color: inherit; font-weight: 700; font-size: 12px; }
.msg img.att { display: block; max-width: 220px; border-radius: 10px; margin-top: 6px; }
.reply { position: sticky; bottom: 76px; background: var(--bg); padding-top: 10px; }

/* ── login ── */
.login { max-width: 400px; margin: 0 auto; padding: 48px 20px; }
.login .logo { display: flex; justify-content: center; margin-bottom: 18px; }
.login h1 { text-align: center; }
.login p.lead { text-align: center; color: var(--muted); margin: 6px 0 22px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
/* Login inside Lark / WhatsApp etc. (public/login.js inAppBrowser): open in Chrome or Safari for Google. */
.banner.inapp { font-size: 14px; line-height: 1.45; }
.banner.inapp p { margin: 6px 0 10px; }
.banner.inapp .inapp-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.banner.inapp .inapp-btns .btn { flex: 1 1 140px; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.linkbtn { background: none; border: none; color: var(--navy); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; font-size: 13px; }
.gbtn { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.gbtn svg { width: 18px; height: 18px; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13px; z-index: 70; box-shadow: var(--shadow); max-width: 90vw; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--honey-light); border-top-color: var(--honey-dark); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 13px; margin: 4px 0 10px; }

/* ── staff page (wider) ── */
.staff .app { max-width: 1100px; padding-bottom: 40px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 16px; }
.tabs button { border: 1.5px solid var(--line); background: #fff; border-radius: var(--pill); padding: 7px 14px; font-weight: 700; color: var(--navy); cursor: pointer; font-size: 13px; }
.tabs button.on { background: var(--navy); border-color: var(--navy); color: var(--honey); }
.tabs .count { background: var(--coral); color: #fff; border-radius: var(--pill); padding: 0 6px; font-size: 11px; margin-left: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat .n { font-size: 24px; font-weight: 800; color: var(--ink); }
.stat .l { font-size: 12px; color: var(--muted); }
table.t { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); font-size: 13px; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 10px 12px; background: var(--soft); }
table.t td { padding: 10px 12px; border-top: 1px solid var(--soft); vertical-align: top; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #fcfcfa; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.warnlist { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; }

/* ── staff console: left panel like go.ibilik.com ── */
.console { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #d6d7de; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; z-index: 30; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.side-brand { flex-direction: column; align-items: flex-start; gap: 8px; }
.side-brand > span:not(.sbrand) { font-size: 11px; color: #a9abb8; }
.side nav { padding: 4px 10px 16px; flex: 1; }
.m-search { padding: 0 14px 8px; }
.m-search input { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; }
.m-search input::placeholder { color: #a9abb8; }
.m-search input:focus { outline: none; border-color: var(--honey); }
.m-hit { display: block; color: #d6d7de; text-decoration: none; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.m-hit span { display: block; font-size: 11px; font-weight: 500; color: #a9abb8; }
.m-hit:hover, .m-hit.first { background: rgba(255,255,255,.08); color: #fff; }
.m-none { color: #a9abb8; font-size: 13px; padding: 8px 10px; }
.m-top { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; color: #d6d7de; font-weight: 700; font-size: 13px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer; text-decoration: none; text-align: left; }
.m-top svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.m-top span:first-of-type { flex: 1; }
.m-top:hover, .m-items a:hover { background: rgba(255,255,255,.06); color: #fff; }
.m-top.on { color: var(--honey); }
a.m-top.on { background: rgba(247,210,106,.12); }
.m-top .caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -3px 4px 0 0; transition: transform .15s; opacity: .7; }
.m-group.open > .m-top .caret { transform: rotate(-135deg); margin-top: 3px; }
.m-items { display: none; padding: 2px 0 6px 38px; }
.m-group.open .m-items { display: block; }
.m-items a { display: flex; align-items: center; gap: 6px; color: #b9bbc7; text-decoration: none; font-size: 13px; font-weight: 500; padding: 6px 10px; border-radius: 8px; }
.m-items a.on { color: var(--navy); background: var(--honey); font-weight: 700; }
.side .later, .side .hive { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; padding: 1px 6px; border-radius: var(--pill); }
.side .later { color: #9a9cab; border: 1px solid rgba(255,255,255,.18); }
.m-items a.on .later { color: var(--navy); border-color: rgba(56,58,70,.3); }
.side .hive { color: var(--navy); background: var(--teal); }
.side .count, .m-items .count { margin-left: auto; background: var(--coral); color: #fff; border-radius: var(--pill); padding: 0 7px; font-size: 11px; font-weight: 700; }
.m-top .hive + .count { margin-left: 6px; }
.side-foot { padding: 12px 18px 18px; font-size: 11px; color: #9a9cab; border-top: 1px solid rgba(255,255,255,.08); }
.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.top h1 { font-size: 18px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .who { display: flex; align-items: center; gap: 8px; }
.burger { display: none; background: none; border: none; color: var(--navy); cursor: pointer; padding: 4px; }
.burger svg { width: 24px; height: 24px; }
#content { padding: 20px 24px 48px; max-width: 1280px; }
.scrim { display: none; }
@media (max-width: 900px) {
  .console { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .2s; }
  .side.show { transform: none; }
  .side.show + .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .burger { display: block; }
  .top { padding: 10px 16px; }
  .top .who .small, .top .who a.btn { display: none; }
  #content { padding: 16px 16px 40px; }
}
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.toolbar input.i { flex: 1 1 260px; max-width: 420px; }
.toolbar select.i { width: auto; flex: 0 1 220px; }
.toolbar input.i, .toolbar select.i { padding: 8px 11px; font-size: 13px; }
.tw { overflow-x: auto; border-radius: 12px; }
.tw table.t { min-width: 640px; }
table.t tr.sel td { background: var(--honey-light); }
.pager { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pager > .small:first-child { margin-right: auto; }
.row.wrap { flex-wrap: wrap; }
a.card.stat { display: block; text-decoration: none; color: inherit; }
a.card.stat[href]:hover { box-shadow: 0 0 0 2px var(--honey) inset, var(--shadow); }
.stat .n.bad, .kv .v.bad { color: var(--coral-ink); }
.grid.tiles4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 14px; }
.dash { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.dash .card + .card { margin-top: 0; }
.dash h2 { display: flex; align-items: center; gap: 8px; }
.occ .bar { height: 10px; background: var(--soft); border-radius: var(--pill); overflow: hidden; margin: 10px 0 12px; }
.occ .bar i { display: block; height: 100%; background: var(--honey-dark); }
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 12px 0 16px; overflow-x: auto; }
.subtabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 13px; border-bottom: 3px solid transparent; white-space: nowrap; }
.subtabs a.on { color: var(--navy); border-bottom-color: var(--honey-dark); }
.later-card { text-align: center; padding: 36px 20px; max-width: 560px; }
.later-card .later-ic svg { width: 40px; height: 40px; color: var(--honey-dark); }
.later-card h2 { margin: 8px 0 6px; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: var(--pill); cursor: pointer; transition: background .15s; }
.switch i::before { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--teal-ink); }
.switch input:checked + i::before { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--honey-light); }
.grid > .card + .card, .grid > .card { margin-top: 0; }
.console .card > h2:first-child, .console .card > .spread:first-child { margin-bottom: 8px; }
.console .card > h2 + p.small { margin-top: -4px; }
.grid.tiles4 .stat .n { font-size: 20px; }
/* ── console forms ── */
.form-card { max-width: 860px; }
.form-card h3 { margin: 20px 0 4px; padding-top: 14px; border-top: 1px solid var(--soft); }
.form-card h2 + h3, .form-card p + h3 { border-top: none; padding-top: 0; }
.fgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.fgrid > * { min-width: 0; }
.fgrid .ff.full { grid-column: 1 / -1; }
.fgrid .check { margin-top: 34px; }
.fgrid .check.full { margin-top: 12px; }
@media (max-width: 640px) { .fgrid { grid-template-columns: minmax(0, 1fr); } .fgrid .check { margin-top: 12px; } }
.console input.i, .console select.i, .console textarea.i { font-size: 14px; padding: 9px 11px; }
.console input.i[disabled], .console select.i[disabled] { background: var(--soft); color: var(--muted); }
.req { color: var(--coral-ink); }
.actions-bar { margin: 10px 0 2px; }
.btn.danger { color: var(--coral-ink); border-color: var(--coral-light); }
table.t.flat { box-shadow: none; border: 1px solid var(--soft); }
.card .tw table.t { min-width: 480px; }
.nowrap { white-space: nowrap; }
table.deps td { vertical-align: middle; padding: 6px 10px; }
table.deps input.i, table.deps select.i { padding: 6px 9px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--pill); padding: 3px; gap: 3px; margin-top: 6px; }
.seg button { border: none; background: none; border-radius: var(--pill); padding: 6px 14px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--navy); color: var(--honey); }
.picklist { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.picklist button { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; cursor: pointer; display: flex; flex-direction: column; color: var(--ink); }
.picklist button:hover { border-color: var(--honey-dark); }
.modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; width: 100%; max-width: 560px; }
.actmenu { position: absolute; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 170px; display: flex; flex-direction: column; }
.actmenu button { background: none; border: 0; text-align: left; padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.actmenu button:hover { background: var(--soft); }
.pickres { display: flex; flex-direction: column; margin-top: 4px; }
.pickres button { background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; padding: 8px 10px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.pickres button:hover { background: var(--soft); }
.ib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; margin: 12px 0; }
.ib-grid > div { border-radius: 12px; padding: 10px; font-size: 13px; }
.ib-grid h4 { margin: 0 0 6px; font-size: 13px; color: var(--navy); }
.ib-grid ul { margin: 0; padding-left: 16px; }
.ib-a { background: var(--honey-light); } .ib-b { background: var(--teal-light); }
.ib-date { background: var(--navy); color: #fff; border-radius: 12px; padding: 10px; margin: 12px 0; font-size: 14px; }
.ib-date b { color: var(--honey); font-size: 18px; display: block; }
.ib-never { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--text); margin: 0 0 12px; cursor: pointer; }
.ib-never input { width: 18px; height: 18px; accent-color: var(--navy); }
.modal .x { background: none; border: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.stack2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 12px; }
.stack2 .card + .card { margin-top: 0; }
.stack2 .kv { grid-template-columns: 180px 1fr; }
.stack2 .kv .v { text-align: left; }
@media (min-width: 1100px) { .stack2 .kv { grid-template-columns: 180px 1fr 180px 1fr; } }
/* ── owners ── */
.fee-now { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 14px; }
.fee-now > div { background: var(--honey-light); border-radius: 12px; padding: 10px 14px; min-width: 200px; }
.fee-now span { display: block; }
.fee-now b { color: var(--ink); }
.kv.kv4 { grid-template-columns: 170px 1fr; }
.kv.kv4 .v { text-align: left; }
@media (min-width: 1100px) { .kv.kv4 { grid-template-columns: 170px 1fr 170px 1fr; } }
.pre { white-space: pre-wrap; }
.unitpick { border-top: 1px solid var(--soft); padding: 8px 0; }
.unitpick > div { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.unitpick .check { margin-top: 6px; }
table.terms td { vertical-align: middle; padding: 6px 8px; }
table.terms input.i { padding: 6px 9px; }
/* ── billing ── */
.form-card { max-width: 1040px; }
table.terms select.i { min-width: 140px; }
table.terms input[type="month"] { min-width: 130px; }
table.terms input[data-k="amount"] { min-width: 90px; }
/* ── owner statement ── */
.statement { max-width: 860px; margin-top: 12px; }
.st-brand { font-size: 12px; font-weight: 800; color: var(--honey-ink); letter-spacing: .3px; text-transform: uppercase; }
.st-pay { text-align: right; display: flex; flex-direction: column; }
.st-pay b { font-size: 24px; color: var(--ink); }
.st-h { margin: 18px 0 2px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.st-total { margin-top: 18px; border-top: 2px solid var(--line); }
.lines tr.muted td { color: var(--muted); font-weight: 400; }
b.bad, span.bad { color: var(--coral-ink); }
@media print {
  .side, .top, .scrim, .noprint, .toast { display: none !important; }
  .console { display: block; }
  #content { padding: 0; max-width: none; }
  body { background: #fff; }
  .statement { box-shadow: none; max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
}

/* Tenancy › Smart home: automatic codes checklist */
.checks { display: grid; gap: 8px; margin-top: 10px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; }
.check-row > span { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; font-size: 12px; }
.check-row > span.ok { background: var(--green-light); color: var(--green-ink); }
.check-row > span.no { background: var(--soft); color: var(--muted); }

/* Tenancy agreement: signature pad (tenant app) */
.sigpad { position: relative; border: 1.5px dashed var(--line, #d9d3c7); border-radius: 12px; background: #fff; margin-top: 6px; touch-action: none; }
.sigpad canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; pointer-events: none; }
.sign-card { display: flex; gap: 12px; align-items: center; border: 2px solid var(--honey, #F6C445); text-decoration: none; color: inherit; }
.sign-card .grow { flex: 1; }
.sign-card .t { font-weight: 700; }
.sign-card .s { font-size: 13px; color: var(--muted); }
.card.muted { opacity: .55; }

/* Rooms grid (unit page / Add unit): one row per room or car park, edited in place */
.tw table.t.roomgrid { min-width: 1060px; }
table.t.roomgrid td { padding: 6px 5px; vertical-align: middle; }
table.t.roomgrid .i { padding: 7px 8px; font-size: 13px; border-radius: 9px; min-width: 96px; }
table.t.roomgrid .i.money { min-width: 84px; width: 92px; }
table.t.roomgrid td:first-child .i { min-width: 88px; }

/* Move-in charges: amounts staff can type over */
table.t.movein-t .mi-in { max-width: 130px; margin-left: auto; padding: 7px 9px; font-size: 14px; text-align: right; }

/* Login: "First time here?" help for tenants */
.login details.firsttime { margin-top: 18px; text-align: left; background: #fff; border: 1px solid var(--line, #e7e3da); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.login details.firsttime summary { cursor: pointer; font-weight: 600; }
.login details.firsttime ol { margin: 10px 0 2px; padding-left: 20px; line-height: 1.5; }
.login details.firsttime li { margin-bottom: 6px; }

/* Tenant app: a door code card, big digits and # (KL: easy to read at the door) */
.doorcard { background: var(--navy); color: #fff; border-radius: 18px; padding: 16px 18px; margin-bottom: 12px; }
.doorcard .dc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.doorcard .dc-door { font-weight: 800; font-size: 16px; }
.doorcard .dc-place { color: var(--honey); font-size: 12px; font-weight: 600; margin-top: 2px; }
.doorcard .dc-eye { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.doorcard .dc-code { margin: 14px 0 4px; font-size: 38px; font-weight: 800; letter-spacing: 3px; line-height: 1.1; color: var(--honey); word-break: break-all; }
.doorcard .dc-code .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.doorcard .dc-hash { margin-left: 8px; color: #fff; background: rgba(255,255,255,.14); border-radius: 10px; padding: 0 10px; font-size: 30px; }
.doorcard .dc-how { font-size: 13px; color: #d4d5dc; }
.doorcard .dc-note { margin-top: 10px; background: var(--honey-light); color: var(--honey-ink); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.doorcard .dc-paused { margin-top: 12px; background: var(--coral-light); color: var(--coral-ink); border-radius: 10px; padding: 8px 10px; font-size: 14px; font-weight: 700; }
.doorcard .dc-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 12px; font-size: 12px; color: #c9cad3; }
.doorcard .dc-foot a, .doorcard .dc-foot .linkbtn { color: var(--honey); font-weight: 700; font-size: 12px; }
.doorcard.frozen { background: #55576a; }

/* Staff: Tenant Care › Requests (list + chat) */
.tk { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tk-list { background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.tk-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 10px 0; }
.tk-tabs button { border: 0; background: var(--soft); color: var(--text); border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 700; cursor: pointer; }
.tk-tabs button.on { background: var(--navy); color: #fff; }
.tk-list input.tk-q { display: block; margin: 10px; width: calc(100% - 20px); padding: 8px 11px; font-size: 13px; }
#tkrows { max-height: calc(100vh - 230px); overflow-y: auto; border-top: 1px solid var(--soft); }
.tk-row { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--soft); background: #fff; padding: 11px 14px; cursor: pointer; font: inherit; color: inherit; }
.tk-row:hover { background: #fcfcfa; }
.tk-row.on { background: var(--honey-light); box-shadow: inset 3px 0 0 var(--honey-dark); }
.tk-r1 { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.tk-r2 { font-size: 12.5px; color: var(--text); margin-top: 2px; }
.tk-r3 { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tk-unread { margin-left: auto; background: var(--coral); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 800; }
.tk-chat { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; min-height: 420px; }
.tk-empty { color: var(--muted); padding: 40px; text-align: center; }
.tk-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--soft); }
.tk-head h2 { margin: 0 0 4px; }
.tk-st { text-align: right; flex: none; }
.tk-thread { background: var(--bg); border-radius: 12px; padding: 14px; margin: 12px 0; max-height: calc(100vh - 380px); min-height: 160px; overflow-y: auto; }
.tk-thread .msg { max-width: 75%; }
.tk-thread .msg img.att { max-width: 200px; }
.tk-compose textarea { min-height: 70px; }
.tk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.tk-bar .i { width: auto; padding: 8px 11px; font-size: 13px; }
.tk-bar #rn { max-width: 170px; } .tk-bar #na { max-width: 140px; } .tk-bar #ns { max-width: 140px; }
.tk-sp { flex: 1; }
@media (max-width: 900px) { .tk { grid-template-columns: minmax(0, 1fr); } #tkrows { max-height: 320px; } .tk-thread { max-height: 60vh; } }
/* Finance › Utility bills to pay */
table.t th.num, table.t td.num { text-align: right; white-space: nowrap; }
.small.bad { color: var(--coral-ink); }
table.t tr.grp td { background: var(--soft); border-top: 2px solid var(--line); }
table.t tr.grp .btn { margin-left: 4px; }

/* Tenant app: invoice and receipt to print or save as PDF (iBilik+ layout) */
.doc { background: #fff; border-radius: 16px; padding: 22px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); font-size: 13px; color: var(--ink); }
.doc-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--soft); }
.doc-from { display: flex; gap: 12px; flex: 1 1 260px; min-width: 0; }
.doc-from { flex-wrap: wrap; }
.doc-logo { width: 150px; height: auto; flex: none; align-self: flex-start; border-radius: 4px; }
.doc-btns { display: grid; gap: 10px; margin-top: 16px; }
.doc-btns.two { grid-template-columns: 1fr 1fr; }
.doc-co { font-weight: 800; font-size: 16px; }
.doc-meta { flex: 0 1 auto; text-align: right; margin-left: auto; }
.doc-title { font-size: 24px; font-weight: 400; margin-bottom: 6px; }
.doc-meta table { margin-left: auto; border-collapse: collapse; }
.doc-meta td { padding: 2px 0 2px 12px; vertical-align: top; overflow-wrap: anywhere; }
.doc-meta td:first-child { color: var(--muted); }
.doc-who { margin: 16px 0; }
.doc-who h3 { margin: 0 0 4px; font-size: 15px; }
.doc-lines { width: 100%; border-collapse: collapse; margin-top: 8px; }
.doc-lines th { background: var(--soft); text-align: left; font-weight: 600; padding: 8px 6px; }
.doc-lines td { padding: 10px 6px; border-bottom: 1px solid var(--soft); vertical-align: top; overflow-wrap: anywhere; }
.doc-lines .num { text-align: right; white-space: nowrap; }
.doc-sum { margin: 10px 0 0 auto; border-collapse: collapse; }
.doc-sum td { padding: 4px 6px; text-align: right; }
.doc-sum td:last-child { min-width: 90px; white-space: nowrap; }
.doc-sum tr.b td { font-weight: 800; }
.doc-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 28px; }
@media print {
  .topbar, .nav { display: none !important; }
  .app { max-width: none; padding: 0; }
  .doc { box-shadow: none; border-radius: 0; padding: 0; }
  .doc-lines th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── staff: Insurance (upload box, as iBilik+'s) ── */
.drop { border: 1.5px dashed var(--line); border-radius: 12px; background: var(--soft); padding: 22px 14px; text-align: center; cursor: pointer; }
.drop.over { border-color: var(--teal); background: var(--teal-light); }
.drop b { display: block; color: var(--ink); margin-top: 6px; }
.drop svg { width: 34px; height: 34px; color: var(--teal-ink); }
.filelist { list-style: none; padding: 0; margin: 10px 0 0; }
.filelist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--soft); font-size: 13px; }
.filelist li a { overflow-wrap: anywhere; }
.pick { border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; max-height: 260px; overflow: auto; }
.pick button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--soft); padding: 8px 10px; cursor: pointer; }
.pick button:hover { background: var(--soft); }

/* Staff dashboard (Collection first): one column on a phone, blocks side by side on a computer. */
.db { max-width: 1180px; }
.db-top { display: grid; gap: 12px; }
.db-hero { display: block; background: var(--navy); color: #fff; border-radius: 18px; padding: 16px; text-decoration: none; }
.db-hrow { display: flex; align-items: center; gap: 18px; margin: 10px 0; }
.db-ringw { position: relative; width: 108px; height: 108px; flex: none; }
.db-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.db-ring circle { fill: none; stroke-width: 11; }
.db-ring .tr { stroke: rgba(255,255,255,.15); }
.db-ring .fg { stroke: #F7B500; stroke-linecap: round; }
.db-ringw > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.db-ringw b { font-size: 21px; font-weight: 800; }
.db-ringw span { font-size: 10px; color: #c9cad3; }
.db-hk { font-size: 11.5px; color: #c9cad3; }
.db-hv { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.db-hv.honey { color: #F7D26A; margin-bottom: 0; }
.db-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.db-tile { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.db-tile b { font-size: 20px; font-weight: 800; }
.db-tile b.bad { color: var(--coral-ink); }
.db-tile span { font-size: 12px; font-weight: 700; color: #555; margin-top: 2px; }
.db-tile small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.db-sec { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 18px 2px 8px; }
.db-list { background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.db-list a { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-size: 13.5px; color: var(--ink); text-decoration: none; border-bottom: 1px solid #f0f0f0; }
.db-list a:last-child { border-bottom: 0; }
.db-list b.bad { color: var(--coral-ink); }
.db-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.db-chips a { background: #fff; border-radius: 999px; padding: 7px 11px; font-size: 12px; color: #555; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.db-chips a b { color: var(--ink); }
.db-hhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.db-hhead a { color: #F7D26A; font-size: 12px; font-weight: 700; text-decoration: none; }
.db-month { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 28px 6px 12px; font: 700 13px Montserrat, sans-serif; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #c9cad3 50%), linear-gradient(135deg, #c9cad3 50%, transparent 50%); background-position: right 14px center, right 9px center; background-size: 5px 5px; background-repeat: no-repeat; }
.db-month option { color: #222; }
.db-chart { background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 14px 14px 10px; margin-top: 12px; }
.db-ch { font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.db-ch small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.db-plot { position: relative; height: 120px; margin: 16px 0 0 46px; border-bottom: 1px solid #d6d7de;
  background: linear-gradient(#eee, #eee) 0 0 / 100% 1px no-repeat, linear-gradient(#eee, #eee) 0 50% / 100% 1px no-repeat; }
.db-yl { position: absolute; left: -46px; transform: translateY(-50%); font-size: 10px; color: var(--muted); }
.db-bars { display: grid; grid-template-columns: repeat(12, 1fr); height: 100%; }
.db-bar { position: relative; height: 100%; padding: 0 2px; border: 0; background: none; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; border-radius: 6px 6px 0 0; }
.db-bar.on { background: rgba(247,181,0,.12); }
.db-bar .pair { position: relative; display: flex; align-items: flex-end; gap: 2px; width: 100%; max-width: 48px; }
.db-bar .pair i { display: block; flex: 1; border-radius: 4px 4px 0 0; }
.db-bar .billed { height: 100%; background: var(--navy); }
.db-bar .paid { background: #F7B500; }
.db-bar:hover .pair { opacity: .85; }
.db-bar em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font: normal 700 9.5px Montserrat, sans-serif; color: var(--muted); white-space: nowrap; }
.db-bar.on em { font-weight: 800; font-size: 11px; color: var(--ink); }
.db-legend { display: flex; gap: 14px; font-size: 11.5px; color: #555; font-weight: 600; margin: -4px 0 4px; }
.db-legend span { display: inline-flex; align-items: center; gap: 6px; }
.db-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.db-legend .billed { background: var(--navy); }
.db-legend .paid { background: #F7B500; }
@media (max-width: 520px) { .db-bar em { display: none; } .db-bar.on em { display: block; } }
.rp-people { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.rp-pr { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 44px minmax(0, 70px) minmax(0, 120px); align-items: center; gap: 10px; border: 0; background: none; padding: 7px 6px; border-radius: 10px; font: inherit; font-size: 13px; color: var(--ink); text-align: left; cursor: pointer; }
.rp-pr.cat { grid-template-columns: minmax(110px, 180px) 1fr 44px minmax(0, 70px); }
.rp-pr:hover { background: #f6f6f2; }
.rp-pr .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-pr > b { text-align: right; font-size: 15px; }
.rp-track { display: block; height: 14px; background: #f0f0ec; border-radius: 999px; overflow: hidden; }
.rp-fill { display: flex; height: 100%; border-radius: 999px; overflow: hidden; min-width: 4px; }
.rp-fill i { display: block; height: 100%; }
.rp-x { font-size: 11.5px; white-space: nowrap; }
@media (max-width: 640px) { .rp-pr, .rp-pr.cat { grid-template-columns: 1fr 44px; } .rp-pr .rp-track { grid-column: 1 / -1; grid-row: 2; } .rp-pr .rp-x { display: none; } }
.db-tip { position: absolute; top: -8px; transform: translate(-50%, -100%); background: var(--navy); color: #fff; font-size: 11.5px; font-weight: 600; padding: 6px 9px; border-radius: 8px; max-width: 230px; width: max-content; text-align: center; pointer-events: none; z-index: 2; }
.db-axis { display: grid; grid-template-columns: repeat(12, 1fr); margin: 6px 0 0 46px; }
.db-axis span { font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; }
.db-axis span.on { color: var(--ink); font-weight: 800; }
@media (max-width: 420px) { .db-axis span { font-size: 9px; letter-spacing: -.2px; } }
@media (min-width: 900px) {
  .db-top { grid-template-columns: minmax(340px, 1fr) 1fr; }
  .db-tiles { gap: 12px; }
  .db-low { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

/* ── tenant app: Explore tab (the hub behind "Refer"; Investor Journey) ── */
.hub-card { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; margin-top: 12px; }
.hub-card.refer { background: var(--honey); padding: 16px; }
.hub-card .hub-ic { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.55); color: var(--navy); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.hub-card .hub-ic svg { width: 24px; height: 24px; }
.hub-card .hub-t { font-weight: 800; font-size: 16px; color: var(--ink); }
.hub-card .hub-s { font-size: 12.5px; margin-top: 3px; }
.hub-card.refer .hub-t { color: var(--navy); }
.hub-card.refer .hub-s { color: #6b5418; }
.hub-soon { border: 1.5px dashed #d4d4d8; border-radius: 16px; padding: 14px; text-align: center; color: #a1a1aa; font-size: 12.5px; font-weight: 600; margin-top: 12px; }
.proj-card { display: block; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; text-decoration: none; color: inherit; }
.proj-card img, .proj-card video, .proj-card .proj-noimg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #eef0f4; }
.proj-card img.plan { object-fit: contain; background: #fff; }
.proj-card .proj-noimg { display: flex; align-items: center; justify-content: center; background: var(--navy-light); color: var(--muted); }
.proj-card .proj-noimg svg { width: 40px; height: 40px; }
.proj-card .bd { padding: 12px 14px; }
.proj-card .t { font-weight: 800; color: var(--ink); }
.proj-card .s { font-size: 12px; color: var(--muted); }
.proj-card .pr { font-weight: 800; color: var(--navy); margin-top: 6px; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
/* Every gallery item is the same 16:10 frame, on every screen width: the staff
   crop tool (public/staff.js PJ_RATIO) uses the same shape. Photos fill it
   (cover, centred); floor plans and videos show whole inside it. */
.gallery .slide { position: relative; flex: 0 0 100%; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #eef0f4; scroll-snap-align: start; }
.gallery .slide > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.gallery .slide.plan, .gallery .slide.plan > img { object-fit: contain; background: #fff; }
.gallery .slide.video { background: #000; }
.gallery .slide.video > img, .gallery .slide.video video, .gallery .slide.video iframe { display: block; width: 100%; height: 100%; object-fit: contain; border: 0; background: #000; }
.vsound { position: absolute; left: 10px; bottom: 44px; z-index: 2; display: flex; align-items: center; gap: 6px; border: 0; border-radius: 16px; padding: 7px 12px; background: rgba(0,0,0,.7); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.vsound svg { width: 16px; height: 16px; }
.vsound[hidden] { display: none; }
.vstate { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: rgba(0,0,0,.7); color: #fff; font-size: 12px; padding: 5px 10px; border-radius: 12px; pointer-events: none; text-align: center; max-width: 90%; }
body.noscroll { overflow: hidden; }
.gdots button.vid { background: #f0a04b; }
.gdots { display: flex; gap: 5px; justify-content: center; margin-top: 8px; }
.gdots i, .gdots button { width: 6px; height: 6px; border-radius: 3px; background: #d4d4d8; transition: width .2s; border: 0; padding: 0; cursor: pointer; }
.gdots i.on, .gdots button.on { background: var(--navy); width: 16px; }
.slides { position: relative; }
.sl-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 17px; border: 0; background: rgba(255,255,255,.9); color: var(--ink); font-size: 22px; line-height: 1; box-shadow: var(--shadow); cursor: pointer; }
.sl-nav.prev { left: 8px; }
.sl-nav.next { right: 8px; }
.sl-count { position: absolute; right: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.sl-count { bottom: 10px; }
.sl-cap { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; min-height: 16px; }
.proj-card { position: relative; }
.proj-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.proj-filters .q { grid-column: 1 / -1; }
.proj-filters .i { padding: 9px 12px; font-size: 14px; }
.pfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pfacts > div { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 11px 12px; }
.pfacts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.pfacts .k { font-size: 11px; font-weight: 600; color: var(--muted); }
.pfacts .v { font-size: 14px; font-weight: 800; color: var(--ink); margin-top: 2px; line-height: 1.3; }
.pfacts .v.desc { font-weight: 500; font-size: 13.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.pfacts + .pfacts { margin-top: 10px; }

/* Help: repairs from the Lark repair table, tap to see the details */
details.item.repair { display: block; }
details.item.repair summary { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; list-style: none; }
details.item.repair summary::-webkit-details-marker { display: none; }
details.item.repair .rtile { flex: none; width: 46px; text-align: center; background: var(--honey-light); color: var(--honey-ink); border-radius: 12px; padding: 6px 0; line-height: 1.15; }
details.item.repair .rtile b { display: block; font-size: 18px; color: var(--ink); }
details.item.repair .rtile i { font-style: normal; font-size: 10px; font-weight: 700; }
details.item.repair .rdesc { color: var(--text); font-size: 13px; margin-top: 2px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
details.item.repair[open] .rdesc { display: block; -webkit-line-clamp: unset; }
details.item.repair .rfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
details.item.repair .rmore { margin: 8px 0 0 58px; }
details.item.repair .rmore:empty { display: none; }

/* Staff: crop tool for project photos (public/staff.js cropPhoto) */
.modal.crop-modal { max-width: 640px; }
.crop-stage { position: relative; height: 360px; margin-top: 10px; overflow: hidden; background: #1c1d26; border-radius: 12px; cursor: grab; touch-action: none; user-select: none; outline: none; }
.crop-stage:focus-visible { box-shadow: 0 0 0 3px var(--honey); }
.crop-stage.dragging { cursor: grabbing; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; will-change: transform; }
.crop-frame { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); pointer-events: none; box-sizing: border-box; }
.crop-frame i { position: absolute; background: rgba(255,255,255,.35); }
.crop-frame i:nth-child(1) { left: 33.333%; top: 0; bottom: 0; width: 1px; }
.crop-frame i:nth-child(2) { left: 66.666%; top: 0; bottom: 0; width: 1px; }
.crop-frame i:nth-child(3) { top: 33.333%; left: 0; right: 0; height: 1px; }
.crop-frame i:nth-child(4) { top: 66.666%; left: 0; right: 0; height: 1px; }
.crop-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; }
.crop-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 10px; }
.crop-bar select { width: auto; display: inline-block; margin-left: 6px; }
.crop-prev { margin-top: 10px; }
.crop-prev canvas { display: block; margin-top: 4px; width: 100%; max-width: 320px; height: auto; aspect-ratio: 16 / 10; border-radius: 8px; border: 1px solid var(--line, #e4e4e7); }
.crop-frame.nogrid i { display: none; }
/* Staff: project photos / videos */
.pj-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; align-items: flex-start; }
.pj-tile { width: 160px; }
.pj-media { position: relative; width: 160px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #eef0f4; }
.pj-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pj-media.plan > img { object-fit: contain; background: #fff; }
.pj-novid { width: 100%; height: 100%; background: #1d1e27; }
.pj-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 17px; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.pj-dur { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 6px; }
.pj-badge { position: absolute; left: 4px; top: 4px; }
.pj-badge.r { left: auto; right: 4px; }
.pj-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.pj-add { width: 160px; aspect-ratio: 16 / 10; border: 2px dashed #c9cad3; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; text-align: center; font-size: 13px; padding: 6px; box-sizing: border-box; }
.pj-add span { font-size: 11px; color: var(--muted); }
.pj-add.off { cursor: not-allowed; opacity: .55; }
.pj-add.over, .up-drop.over { border-color: var(--honey); background: var(--honey-light); }
.modal.up-modal { max-width: 620px; }
.up-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; margin-top: 10px; border: 2px dashed #c9cad3; border-radius: 12px; cursor: pointer; text-align: center; }
.up-drop span { font-size: 12px; color: var(--muted); }
.up-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.up-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid #ececf0; border-radius: 10px; }
.up-item .grow { flex: 1; min-width: 0; }
.up-item .t { font-weight: 700; font-size: 13px; word-break: break-all; }
.up-thumb { position: relative; flex: 0 0 112px; width: 112px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #1d1e27; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.up-thumb img, .up-thumb video { width: 100%; height: 100%; object-fit: contain; display: block; }
.up-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 15px; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.up-rm { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.up-bar { height: 5px; background: #ececf0; border-radius: 3px; margin: 6px 0 3px; overflow: hidden; }
.up-bar i { display: block; height: 100%; background: var(--honey); width: 0; transition: width .2s; }
.bad-t { color: var(--coral-ink); }
.good-t { color: var(--green-ink); }
@media (max-width: 560px) { .pj-tile, .pj-media, .pj-add { width: calc(50vw - 40px); } .up-thumb { flex-basis: 88px; width: 88px; } }
@media (max-width: 560px) { .crop-stage { height: 280px; } }

/* Investor Journey (9 Nov 2026): Hive Points card, rent-first project cards, contact choice */
.pts-card { background: var(--navy); border-radius: 20px; padding: 16px; color: #fff; box-shadow: var(--shadow); margin-top: 12px; }
.pts-card .pts-l { font-size: 12px; color: #c9cad3; font-weight: 600; }
.pts-card .pts-n { font-size: 30px; font-weight: 800; color: var(--honey); letter-spacing: -.5px; line-height: 1.15; }
.pts-card .pts-n small { font-size: 14px; color: #fff; font-weight: 700; }
.pts-card .pts-s { font-size: 12.5px; color: #c9cad3; margin-top: 4px; }
.pts-card .pts-go { display: inline-block; margin-top: 12px; font-size: 12.5px; font-weight: 800; color: var(--honey); text-decoration: none; }
.li-pts { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.li-pts:last-child { border: 0; }
.li-pts .pp { font-weight: 800; color: var(--green-ink); }
.rent-l { font-size: 12px; color: var(--green-ink); font-weight: 700; margin-top: 4px; }
.rent-n { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.4px; line-height: 1.15; }
.rent-n.big { font-size: 28px; }
.chpick { display: flex; gap: 8px; }
.chpick label { flex: 1; cursor: pointer; }
.chpick input { position: absolute; opacity: 0; pointer-events: none; }
.chpick span { display: block; text-align: center; border: 1.5px solid var(--line); border-radius: var(--pill); padding: 10px 8px; font-weight: 700; color: var(--navy); background: #fff; }
.chpick input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chpick input:focus-visible + span { outline: 2px solid var(--honey); outline-offset: 2px; }

/* Investor Journey (Hive, 9 Nov 2026): the tenure tag on the top left of a home's box, and
   the pop-up sheets for "I'd like to know more" and the thank-you (with same-tag suggestions). */
.proj-tag { position: absolute; top: 10px; left: 10px; z-index: 1; max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--honey); color: var(--navy); font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.proj-tag.in { position: static; display: inline-block; max-width: 100%; padding: 2px 8px; font-size: 10.5px; box-shadow: none; }
.sheet-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { position: relative; background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; border-radius: 22px 22px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.2); outline: none; animation: sheetUp .22s ease-out; }
.sheet .grab { display: block; width: 40px; height: 4px; border-radius: 2px; background: #d5d6dd; margin: 0 auto 12px; }
.sheet-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 16px; background: #f1f1f4; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.sheet-t { margin: 0 0 2px; font-size: 18px; padding-right: 36px; }
.sheet-t.c { text-align: center; padding: 0; font-size: 22px; }
.sent-ic { width: 64px; height: 64px; border-radius: 32px; background: var(--green-light); color: var(--green-ink); display: flex; align-items: center; justify-content: center; margin: 6px auto 10px; }
.sent-ic svg { width: 32px; height: 32px; }
.sent-s { text-align: center; color: var(--muted); margin: 4px 0 0; }
.sg-h { margin: 18px 0 8px; font-size: 14px; color: var(--ink); }
.sg-card { display: flex; align-items: center; gap: 12px; padding: 8px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; color: inherit; }
.sg-img { flex: 0 0 88px; height: 62px; border-radius: 10px; overflow: hidden; background: var(--navy-light); display: block; }
.sg-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sg-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--muted); }
.sg-noimg svg { width: 24px; height: 24px; }
.sg-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.sg-tx b { color: var(--ink); font-size: 13.5px; }
.sg-r { font-weight: 800; color: var(--ink); font-size: 13px; }
.sg-r small { font-weight: 600; color: var(--muted); }
.sg-go { color: var(--muted); font-size: 22px; padding-right: 4px; }
@media (min-width: 640px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; max-height: 88vh; } }
@keyframes sheetUp { from { transform: translateY(36px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }

/* Cleaning (staff console; lib/cleaning.js, HANDOVER §4.44) */
.cl-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cl-people .card + .card { margin-top: 0; }
.cl-people { align-items: start; }
.cl-phd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
summary.cl-phd { cursor: pointer; list-style: none; }
summary.cl-phd::-webkit-details-marker { display: none; }
summary.cl-phd h2::before { content: '▸'; display: inline-block; width: 16px; color: var(--muted); transition: transform .15s; }
details[open] > summary.cl-phd h2::before { transform: rotate(90deg); }
details.cl-person:not([open]) > .small { margin-top: 4px; }
.cl-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.cl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.cl-bar input.i { flex: 1 1 220px; max-width: 360px; padding: 8px 12px; font-size: 14px; }
.cl-bar select.i { width: auto; padding: 8px 12px; font-size: 14px; }
details.cl-dayx { border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; background: #fff; }
details.cl-dayx > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 12px 14px; cursor: pointer; list-style: none; }
details.cl-dayx > summary::-webkit-details-marker { display: none; }
details.cl-dayx > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; display: inline-block; width: 12px; }
details.cl-dayx[open] > summary::before { transform: rotate(90deg); }
details.cl-dayx[open] > summary { border-bottom: 1px solid var(--line); }
.cl-dname { font-weight: 800; font-size: 16px; color: var(--ink); min-width: 120px; }
.cl-dname em { font-style: normal; font-size: 11px; font-weight: 800; background: var(--honey); color: var(--navy); border-radius: var(--pill); padding: 2px 8px; margin-left: 6px; vertical-align: 2px; }
details.cl-dayx.today { border-color: var(--honey-dark); }
.cl-dsum { font-size: 13px; color: var(--muted); }
.cl-dsum b { color: var(--ink); }
.cl-warnx { color: #B45309; font-weight: 700; }
.cl-dbody { padding: 4px 14px 12px; }
.cl-crow { display: grid; grid-template-columns: 220px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--soft); }
.cl-crow:first-child { border-top: 0; }
.cl-crow.none .cl-cname b { color: #B45309; }
.cl-crow.none .cl-n { background: #F59E0B; color: #fff; }
.cl-cname { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cl-cname b { font-size: 14px; color: var(--ink); }
.cl-n { background: var(--navy); color: var(--honey); border-radius: var(--pill); padding: 2px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.cl-pline { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: start; padding: 3px 0; }
.cl-pname { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding-top: 6px; }
.cl-pname i { font-style: normal; font-weight: 600; opacity: .8; }
.cl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
button.cl-chip { display: inline-block; border: 0; cursor: pointer; font: inherit; padding: 4px 9px; border-radius: 8px; background: var(--navy-light); color: var(--navy); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
button.cl-chip:hover { background: var(--navy); color: var(--honey); }
button.cl-chip.warn { background: #FFF4E0; color: #8A5A00; }
button.cl-chip.out { background: #FDE7F0; color: #8A1C4A; border: 1px dashed #D9739E; }
@media (max-width: 760px) { .cl-crow, .cl-pline { grid-template-columns: 1fr; gap: 4px; } .cl-cname { flex-direction: row; align-items: center; } .cl-pname { padding-top: 0; } }
table.cl-offt td { vertical-align: middle; }
table.cl-offt select.cl-sel { padding: 6px 30px 6px 10px; font-size: 13px; border-radius: 10px; min-width: 120px; width: auto; max-width: 240px; }
table.cl-offt select.cl-sel:disabled { background: var(--soft); color: #a1a1aa; border-color: var(--soft); cursor: not-allowed; }
table.cl-offt tr.blank td:first-child { box-shadow: inset 3px 0 0 #F59E0B; }
table.cl-offt tr.blank select[data-f="weekly"] { border-color: #F59E0B; }
table.cl-offt tr.yes select[data-f="weekly"] { background-color: var(--green-light); border-color: var(--green); color: var(--green-ink); font-weight: 700; }
table.cl-offt tr.no select[data-f="weekly"] { background-color: #FDECEC; border-color: #E5484D; color: #B42318; font-weight: 700; }
table.cl-offt tr.blank select[data-f="weekly"] { background-color: #FFF4E0; color: #8A5A00; font-weight: 700; }
details#cltable { margin-top: 12px; }
details#cltable summary { margin-bottom: 0; }
details#cltable[open] summary { margin-bottom: 10px; }
.cl-units { list-style: none; margin: 10px 0 0; padding: 0; }
.cl-units li { display: flex; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.cl-units .tick { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.cl-units li.done .tick { background: var(--green); border-color: var(--green); color: #fff; }
.cl-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.cl-photo { border: 0; padding: 0; background: none; text-align: left; cursor: zoom-in; font: inherit; }
.cl-photo .ph { display: block; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: linear-gradient(110deg, var(--soft) 30%, #fafafa 50%, var(--soft) 70%); background-size: 200% 100%; animation: cl-shimmer 1.2s infinite linear; }
.cl-photo .ph.in { animation: none; background: var(--soft); }
.cl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-photo .cap { display: block; font-size: 12px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.cl-photo .cap i { display: block; font-style: normal; font-weight: 500; color: var(--muted); }
/* Repairs (lib/repairs.js): a job's details in two columns, one on a phone. */
.rp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; margin-top: 12px; }
@media (max-width: 760px) { .rp-two { grid-template-columns: 1fr; } }
table.rp-kv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.rp-kv th { text-align: left; font-weight: 600; color: var(--muted); padding: 5px 12px 5px 0; vertical-align: top; width: 38%; }
table.rp-kv td { padding: 5px 0; color: var(--ink); word-break: break-word; vertical-align: top; }
.card > h3 { margin-top: 16px; }
.card.stat.click { cursor: pointer; }
.card.stat.click:hover { box-shadow: 0 0 0 2px var(--honey-dark) inset; }
@keyframes cl-shimmer { to { background-position: -200% 0; } }
/* Repairs › Quotations (lib/repairquotes.js): editor beside its totals, one column on a phone. */
.rq-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .rq-layout { grid-template-columns: 1fr; } }
.rq-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; }
.rq-stages .card.stat.on { box-shadow: 0 0 0 2px var(--honey-dark) inset; }
.rq-field { display: block; margin: 10px 0; font-size: 13px; }
.rq-field > b { display: block; margin-bottom: 4px; }
.rq-combo { position: relative; }
.rq-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; }
.rq-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.rq-list li:hover { background: var(--soft); }
table.t.rq-lines input.i { padding: 6px 9px; font-size: 13px; }
table.t.rq-lines input.rq-num { width: 84px; text-align: right; }
table.t.rq-lines td:first-child input.i { min-width: 150px; }
table.t.rq-lines input.below { border-color: var(--coral); }
table.t.rq-lines .n { text-align: right; white-space: nowrap; }
.rq-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 8px 0; }
.rq-ph { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--soft); cursor: pointer; }
.rq-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rq-ph input[type="checkbox"] { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; }
.rq-ph.rq-add { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed var(--line); background: #fff; color: var(--muted); }
.rq-ph.rq-add span { font-size: 26px; line-height: 1; }
.rq-ph.busy { opacity: .6; pointer-events: none; }
.rq-sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.rq-sum .big { font-weight: 800; font-size: 18px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.rq-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rq-hist { list-style: none; padding: 0; margin: 0; }
.rq-hist li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.btn.rq-rb[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cl-viewer { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.cl-viewer figure { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.cl-viewer img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 6px; }
.cl-viewer figcaption { color: #fff; font-weight: 700; margin-top: 10px; }
.cl-viewer button { position: absolute; border: 0; background: rgba(255,255,255,.15); color: #fff; border-radius: 999px; width: 48px; height: 48px; font-size: 24px; cursor: pointer; }
.cl-viewer .x { top: 14px; right: 14px; }
/* .nav is also the tenant app's bottom bar (left / right / bottom 0): undo that here, or both arrows sit on the left. */
.cl-viewer .nav { right: auto; bottom: auto; padding: 0; border-top: 0; z-index: 1; background: rgba(255,255,255,.15); }
.cl-viewer .prev { left: 14px; right: auto; top: 50%; }
.cl-viewer .next { right: 14px; left: auto; top: 50%; }
/* Language choice on the worker screens (public/i18n.js): a row on the login page, big buttons from 🌐. */
.lg-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 560px; margin: 14px auto 0; padding: 0 14px; }
.lg-chips button { border: 1.5px solid var(--line, #d4d4d8); background: #fff; color: var(--ink, #383A46); border-radius: 999px; padding: 7px 11px; font: inherit; font-size: 14px; font-weight: 700; }
.lg-chips button.on { background: #383A46; border-color: #383A46; color: #fff; }
.lg-big { display: grid; gap: 12px; padding: 6px 0; }
.lg-big button { border: 2px solid var(--line, #d4d4d8); background: #fff; color: var(--ink, #383A46); border-radius: 18px; padding: 20px 18px; font: inherit; font-size: 22px; font-weight: 800; text-align: left; }
.lg-big button.on { border-color: var(--green, #1FAE5C); background: #F2FBF5; }

/* Tap feedback on phones (Hive, 17 Nov 2026: "the UI as smooth as possible"): a button, card or tab answers the
   finger at once, without the grey flash, before the screen behind it changes. Only on touch screens (the staff
   console on a computer is as before). `scale` leaves an element's own transform alone. */
html { -webkit-tap-highlight-color: transparent; }
button, a, summary, label, select, input[type="checkbox"], input[type="radio"] { touch-action: manipulation; }
@media (hover: none) {
  button:not([disabled]), .btn, summary, .nav a, .cl-row, a.card, a.action, a.item { transition: scale .08s ease-out, filter .08s ease-out; }
  button:not([disabled]):active, .btn:active, summary:active, .nav a:active, .cl-row:active, a.action:active { scale: .97; filter: brightness(.92); }
  a.item:active { filter: brightness(.95); }
  /* Big cards move less. */
  #root .tc-card:not([disabled]):active, #root button.cl-card:not([disabled]):active, #root a.card:active { scale: .985; filter: brightness(.96); }
}

/* ── Help as a chat (HANDOVER §4.51): WhatsApp-style list, guided new request, conversation ── */
.hc-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--pill); padding: 0 14px; color: var(--muted); margin: 2px 0 10px; }
.hc-search svg { width: 16px; height: 16px; flex: none; }
.hc-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font: inherit; font-size: 14px; padding: 10px 0; color: var(--ink); }
.hc-filters { display: flex; gap: 6px; margin-bottom: 10px; }
.hc-filters button { border: none; font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 13px; border-radius: var(--pill); background: var(--soft); color: var(--text); cursor: pointer; }
.hc-filters button.on { background: var(--honey-light); color: var(--honey-ink); }
.hc-filters button b { background: var(--coral); color: #fff; border-radius: var(--pill); padding: 0 6px; font-size: 10.5px; margin-left: 3px; }
.hc-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hc-row { display: flex; gap: 12px; padding: 12px 14px; align-items: center; border-top: 1px solid #f0f0f0; text-decoration: none; color: inherit; cursor: pointer; }
.hc-list > :first-child, .hc-list > :first-child > summary { border-top: none; }
details.hc-row { display: block; padding: 0; }
details.hc-row > summary { display: flex; gap: 12px; padding: 12px 14px; align-items: center; list-style: none; }
details.hc-row > summary::-webkit-details-marker { display: none; }
.hc-more { padding: 0 14px 12px 72px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.hc-av { width: 46px; height: 46px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 21px; background: var(--honey-light); }
.hc-av.other { background: var(--teal-light); }
.hc-av.done { background: var(--soft); }
.hc-av img { width: 30px; height: 30px; }
.hc-mid { flex: 1; min-width: 0; }
.hc-l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.hc-t { font-weight: 700; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-row.solved .hc-t { color: var(--text); }
.hc-when { font-size: 11px; color: var(--muted); flex: none; }
.hc-row.unread .hc-when { color: var(--green); font-weight: 700; }
.hc-l2 { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 2px; }
.hc-last { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hc-last b { color: var(--teal-ink); }
.hc-row.unread .hc-last { color: var(--ink); font-weight: 600; }
.hc-n { background: var(--green); color: #fff; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 6px; flex: none; }
.hc-l3 { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 11px; color: var(--muted); min-width: 0; }
.hc-l3 .chip { font-size: 10px; padding: 2px 8px; }
.hc-l3 > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-sec { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin: 18px 4px 8px; }
.hc-fab { position: fixed; z-index: 11; right: max(16px, calc((100vw - 560px) / 2 + 16px)); bottom: calc(80px + env(safe-area-inset-bottom)); background: var(--navy); color: var(--honey); border-radius: 18px; padding: 14px 18px; font-weight: 800; font-size: 14px; display: flex; gap: 8px; align-items: center; box-shadow: 0 6px 18px rgba(56,58,70,.35); text-decoration: none; }
.hc-fab svg { width: 20px; height: 20px; }
.hc-pad { height: 70px; }

/* A chat screen: full height, no tab bar; the messages scroll between the header and the reply bar. */
.chatpage { display: flex; flex-direction: column; height: 100vh; height: 100dvh; max-width: 560px; margin: 0 auto; background: #F4EFE3; }
.chatpage > .banner { margin: 8px 10px; flex: none; }
.ch-head { flex: none; display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: calc(8px + env(safe-area-inset-top)) 12px 10px; }
.ch-head .bk { color: #fff; display: flex; padding: 4px 2px; }
.ch-head .bk svg { width: 22px; height: 22px; }
.ch-head .hc-av { width: 40px; height: 40px; font-size: 19px; }
.ch-head .hc-av.bot { background: #fff; }
.ch-info { flex: 1; min-width: 0; }
.ch-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sub { font-size: 11.5px; color: #c9cad3; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-strip { flex: none; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 14px; display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--text); }
.ch-strip .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-strip .linkbtn { font-size: 12px; white-space: nowrap; }
.ch-steps { display: flex; align-items: center; gap: 4px; flex: 1; }
.ch-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.ch-steps i.on { background: var(--honey); }
.ch-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px 8px; background-color: #F4EFE3;
  background-image: radial-gradient(rgba(138,109,31,.09) 1.2px, transparent 1.3px); background-size: 18px 18px; }
.ch-day { text-align: center; margin: 10px 0; }
.ch-day span { display: inline-block; background: #fff; color: #54656F; font-size: 10.5px; font-weight: 700; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); text-transform: uppercase; letter-spacing: .03em; }
.ch-sys { text-align: center; margin: 6px 0; }
.ch-sys span { display: inline-block; background: var(--honey-light); color: var(--honey-ink); font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.1); max-width: 86%; }
.ch-m { display: flex; margin-bottom: 2px; }
.ch-m.first { margin-top: 8px; }
.ch-m.me { justify-content: flex-end; }
.ch-bub { position: relative; max-width: 80%; padding: 6px 9px 7px; border-radius: 8px; font-size: 14px; line-height: 1.42; color: #111B21; box-shadow: 0 1px .5px rgba(11,20,26,.13); background: #fff; overflow-wrap: anywhere; text-align: left; }
.ch-m.me .ch-bub { background: #FCEBB4; }
.ch-m.me.first .ch-bub { border-top-right-radius: 0; }
.ch-m.them.first .ch-bub { border-top-left-radius: 0; }
.ch-m.first .ch-bub::before { content: ""; position: absolute; top: 0; width: 8px; height: 13px; }
.ch-m.me.first .ch-bub::before { right: -8px; background: #FCEBB4; clip-path: polygon(0 0, 100% 0, 0 100%); }
.ch-m.them.first .ch-bub::before { left: -8px; background: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%); }
button.ch-bub { font: inherit; border: none; cursor: pointer; }
.ch-who { font-size: 12px; font-weight: 700; color: var(--teal-ink); margin-bottom: 1px; }
.ch-who.bot { color: var(--honey-ink); }
.ch-txt { white-space: pre-wrap; }
.ch-tm { float: right; font-size: 10.5px; color: #667781; margin: 7px 0 -4px 10px; white-space: nowrap; }
.ch-img { display: block; max-width: 220px; max-height: 260px; border-radius: 6px; margin: 2px 0 4px; object-fit: cover; }
.ch-att { display: inline-block; background: rgba(0,0,0,.05); border-radius: 6px; padding: 6px 9px; margin: 2px 0 4px; color: inherit; font-weight: 700; font-size: 12.5px; text-decoration: none; }
.ch-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; margin: 2px 0 4px; font-size: 12.5px; }
.ch-card .k { color: var(--muted); font-size: 11px; }
.ch-sum { margin: 6px 0 2px; font-size: 13px; }
.ch-sum div { padding: 3px 0; border-top: 1px solid var(--soft); }
.ch-sum div:first-child { border-top: none; }
.ch-sum .k { color: var(--muted); font-size: 11px; display: block; }
.ch-edit { font-size: 10.5px; color: var(--honey-ink); font-weight: 700; display: block; margin-top: 2px; }
.ch-qr { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin: 8px 0 2px; }
.ch-qr button, .ch-qr label { position: relative; background: #fff; border: 1.5px solid var(--honey-dark); color: var(--navy); font: inherit; font-weight: 700; font-size: 13px; padding: 7px 12px; border-radius: var(--pill); box-shadow: 0 1px .5px rgba(11,20,26,.1); cursor: pointer; }
.ch-qr button.on { background: var(--navy); border-color: var(--navy); color: var(--honey); }
.ch-qr label input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.ch-qr .ch-grp { width: 100%; text-align: right; font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-top: 4px; }
.ch-files { flex: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0 10px; background: #F0EEE8; }
.ch-files:not(:empty) { padding-top: 8px; }
.ch-files .f { position: relative; background: #fff; border-radius: 8px; font-size: 12px; padding: 6px 26px 6px 8px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-files .f img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 6px; margin: -2px 0 -2px -4px; }
.ch-files .f button { position: absolute; top: 2px; right: 2px; border: none; background: none; font-size: 16px; color: var(--muted); cursor: pointer; }
.ch-comp { flex: none; display: flex; align-items: flex-end; gap: 6px; background: #F0EEE8; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
.ch-box { flex: 1; min-width: 0; background: #fff; border-radius: 22px; padding: 0 8px 0 14px; display: flex; align-items: flex-end; gap: 4px; }
.ch-box textarea { flex: 1; min-width: 0; border: none; outline: none; resize: none; background: none; font: inherit; font-size: 15px; line-height: 1.4; padding: 11px 0; max-height: 120px; overflow-y: hidden; color: var(--ink); }
.ch-box textarea:disabled { color: var(--muted); }
.ch-box textarea::placeholder { color: #8a8c99; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-ic { color: #54656F; display: flex; padding: 10px 4px; border: none; background: none; cursor: pointer; }
.ch-ic svg { width: 22px; height: 22px; }
.ch-ic[disabled] { opacity: .35; cursor: default; }
.ch-send { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--honey); display: flex; align-items: center; justify-content: center; flex: none; border: none; cursor: pointer; }
.ch-send svg { width: 20px; height: 20px; }
.ch-send[disabled] { opacity: .45; cursor: default; }
.ch-fixed { flex: none; background: #fff; border-top: 1px solid var(--line); padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); text-align: center; }
.ch-fixed p { margin: 0 0 10px; font-size: 13px; color: var(--text); }
.ch-two { display: flex; gap: 8px; }
.ch-two button { flex: 1; border: none; border-radius: 12px; padding: 12px; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.ch-two .y { background: var(--navy); color: var(--honey); }
.ch-two .n { background: var(--soft); color: var(--navy); }
.chatpage .err { margin: 0; padding: 0 14px; background: #F0EEE8; }
.chatpage .err:not(:empty) { padding: 6px 14px 0; }
.chatview { display: contents; }
.hc-row[hidden], .hc-list [hidden], #chreply[hidden], .ch-fixed[hidden] { display: none; }

/* Tenancy › Check-ins (HANDOVER §4.62): a table on a computer, cards on a phone. */
.ci-cards { display: none; }
.ci-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.ci-card.urgent { border-left: 5px solid var(--coral-ink); }
.ci-card .ci-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@media (max-width: 700px) { .ci-table { display: none; } .ci-cards { display: block; } }
