/* ════════════════════════════════════════════════════════════════
   hub.css — the hub's screens (24 October 2026): Today, Chat, the email centre, the property search,
   guests and webhooks. Built only on ui.css's variables, so the light theme follows on its own.
   Admin only: the partner portal and the project room never load it.
   ════════════════════════════════════════════════════════════════ */

.band.band-slim { padding-bottom: 18px; }
.band .actions .ch-search { background: rgba(255,255,255,0.06); border: 1px solid var(--stroke); border-radius: var(--pill); color: var(--fog); padding: 8px 14px; font-size: 13px; width: 220px; max-width: 46vw; }

/* ───────── chat ───────── */
.ch-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; margin-top: 16px; height: calc(100vh - 260px); min-height: 460px; }
.ch-wrap.threaded { grid-template-columns: 250px minmax(0, 1fr) 340px; }
.ch-side { padding: 12px; overflow-y: auto; }
.ch-side-h { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fog-50); margin: 10px 4px 6px; }
.ch-side-h:first-child { margin-top: 2px; }
.ch-li { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; color: var(--fog-70); text-decoration: none; font-size: 13.5px; }
.ch-li svg { width: 14px; height: 14px; flex: none; opacity: 0.7; }
.ch-li span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ch-li:hover { background: rgba(255,255,255,0.05); color: var(--fog); }
.ch-li.on { background: color-mix(in srgb, var(--volt) 14%, transparent); color: var(--fog); }
.ch-li.unread { color: var(--fog); font-weight: 600; }
.ch-li.notin { opacity: 0.6; }
.ch-li .count { margin-left: auto; }
.ch-dot { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--fog-50); }
.ch-arch summary { cursor: pointer; margin: 10px 4px 4px; }
.ch-conv, .ch-thread { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ch-thread[hidden] { display: none; }
.ch-ch { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--stroke); flex-wrap: wrap; }
.ch-title { flex: 1; min-width: 120px; }
.ch-title b { font-size: 15px; color: var(--fog); }
.ch-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ch-back { display: none; }
.ch-scroll { flex: 1; overflow-y: auto; padding: 10px 6px 10px 12px; min-height: 0; }
.ch-day { text-align: center; margin: 14px 0 6px; font-size: 11px; color: var(--fog-50); }
.ch-day span { background: rgba(255,255,255,0.05); border: 1px solid var(--stroke); border-radius: var(--pill); padding: 3px 12px; }
.ch-more { text-align: center; margin: 6px 0 10px; }
.ch-msg { position: relative; display: flex; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.ch-msg:hover { background: rgba(255,255,255,0.035); }
.ch-msg.mention { background: color-mix(in srgb, var(--amber, #e8c47a) 9%, transparent); box-shadow: inset 2px 0 0 var(--amber, #e8c47a); }
.ch-msg.bot .ch-av { background: color-mix(in srgb, var(--info, #7dd3fc) 22%, transparent); }
.ch-av { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--fog); background: color-mix(in srgb, var(--volt) 22%, transparent); }
.ch-main { min-width: 0; flex: 1; }
.ch-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.ch-head b { color: var(--fog); }
.ch-body { font-size: 14px; line-height: 1.5; color: var(--fog-85, var(--fog)); overflow-wrap: anywhere; margin-top: 1px; }
.ch-body a { color: var(--volt); }
.ch-at { color: var(--volt); font-weight: 600; background: color-mix(in srgb, var(--volt) 10%, transparent); border-radius: 5px; padding: 0 3px; }
.ch-at.me { color: var(--amber, #e8c47a); background: color-mix(in srgb, var(--amber, #e8c47a) 14%, transparent); }
.ch-rec { display: inline-block; margin-top: 6px; font-size: 12px; padding: 3px 10px; border-radius: var(--pill); border: 1px solid var(--stroke); color: var(--fog-70); text-decoration: none; }
.ch-rec::before { content: '↗ '; }
.ch-rec:hover { color: var(--volt); border-color: var(--volt); }
.ch-reacts { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.ch-react { font-size: 12px; border: 1px solid var(--stroke); background: rgba(255,255,255,0.04); color: var(--fog-70); border-radius: var(--pill); padding: 2px 8px; cursor: pointer; }
.ch-react.on { border-color: var(--volt); color: var(--fog); background: color-mix(in srgb, var(--volt) 12%, transparent); }
.ch-replies { margin-top: 6px; font-size: 12px; color: var(--volt); background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; }
.ch-tools { position: absolute; right: 8px; top: -10px; display: none; gap: 2px; background: var(--ink, #12151d); border: 1px solid var(--stroke); border-radius: 9px; padding: 2px; }
.ch-msg:hover .ch-tools, .ch-msg:focus-within .ch-tools { display: flex; }
.ch-tools button { background: none; border: 0; color: var(--fog-70); width: 28px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.ch-tools button:hover { background: rgba(255,255,255,0.08); color: var(--fog); }
.ch-pop { position: absolute; right: 8px; top: 20px; z-index: 5; display: flex; gap: 2px; padding: 4px; flex-wrap: wrap; max-width: 230px; }
.ch-pop button { background: none; border: 0; font-size: 18px; width: 34px; height: 32px; cursor: pointer; border-radius: 7px; }
.ch-pop button:hover { background: rgba(255,255,255,0.08); }
.ch-compose { border-top: 1px solid var(--stroke); padding: 10px 12px 12px; position: relative; }
.ch-compose textarea { width: 100%; resize: none; min-height: 46px; max-height: 180px; background: rgba(255,255,255,0.05); border: 1px solid var(--stroke); border-radius: 12px; color: var(--fog); padding: 10px 12px; font: inherit; font-size: 14px; }
.ch-compose textarea:focus { outline: none; border-color: color-mix(in srgb, var(--volt) 60%, transparent); }
.ch-cbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.ch-sugg { position: absolute; left: 12px; bottom: 100%; z-index: 6; display: flex; flex-direction: column; min-width: 220px; background: var(--ink, #12151d); border: 1px solid var(--stroke); border-radius: 12px; padding: 4px; }
.ch-sugg[hidden] { display: none; }
.ch-sugg button { text-align: left; background: none; border: 0; color: var(--fog); padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.ch-sugg button:hover { background: rgba(255,255,255,0.07); }
.ch-draftrec { font-size: 12.5px; color: var(--fog-70); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.ch-hit { display: block; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--fog); border-bottom: 1px solid var(--stroke); }
.ch-hit:hover { background: rgba(255,255,255,0.04); }
.ch-hr { border: 0; border-top: 1px solid var(--stroke); margin: 16px 0; }
.ch-hook { display: flex; align-items: center; gap: 10px; margin: 6px 0; flex-wrap: wrap; }
.ch-url code { display: block; word-break: break-all; margin: 8px 0; font-size: 12px; }

@media (max-width: 900px) {
  .ch-wrap, .ch-wrap.threaded { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .ch-side { display: none; max-height: 60vh; }
  .ch-wrap.listing .ch-side { display: block; }
  .ch-wrap.listing .ch-conv { display: none; }
  .ch-back { display: inline-flex; }
  .ch-conv { height: calc(100vh - 230px); min-height: 420px; }
  .ch-wrap.threaded .ch-conv { display: none; }
  .ch-thread { height: calc(100vh - 230px); min-height: 420px; }
  .ch-tools { display: flex; position: static; margin-left: auto; align-self: flex-start; background: none; border: 0; }
  .band .actions .ch-search { width: 100%; max-width: none; }
}

/* ───────── today ───────── */
.td-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.td-tile { padding: 16px 18px; text-decoration: none; color: var(--fog); display: block; }
.td-tile b { display: block; font-family: var(--font-d); font-size: 28px; line-height: 1.1; color: #fff; }
.td-tile span { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fog-50); font-weight: 600; }
.td-tile .muted { display: block; margin-top: 6px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.td-tile.warn b { color: var(--amber, #e8c47a); }
.td-tile.bad b { color: var(--bad, #fb7185); }
.td-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.td-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--stroke); text-decoration: none; color: var(--fog); flex-wrap: wrap; }
.td-row:last-child { border-bottom: 0; }
.td-row .muted { margin-left: auto; }
html[data-theme="light"] .td-tile b { color: var(--fog); }
@media (max-width: 1100px) { .td-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .td-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 460px) { .td-grid { grid-template-columns: minmax(0, 1fr); } }

/* ───────── the property search, the email centre, guests, webhooks ───────── */
.hb-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.hb-form .wide { grid-column: span 2; }
.hb-form .full { grid-column: 1 / -1; }
.hb-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hb-results { margin-top: 14px; }
.hb-card { padding: 14px 16px; margin-bottom: 10px; }
.hb-card h4 { font-size: 14.5px; color: var(--fog); margin: 0 0 4px; }
.hb-card .hb-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.hb-card .btnrow { margin-top: 10px; }
.hb-flag { font-size: 11.5px; padding: 2px 9px; border-radius: var(--pill); border: 1px solid color-mix(in srgb, var(--amber, #e8c47a) 40%, transparent); color: var(--amber, #e8c47a); }
.hb-band { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font-weight: 800; color: #0b1422; }
.hb-band.A { background: #0f8a4d; color: #fff; } .hb-band.B { background: #2fa84f; color: #fff; } .hb-band.C { background: #8dc63f; } .hb-band.D { background: #ffcc00; }
.hb-band.E { background: #f7ac34; } .hb-band.F { background: #ef7d22; } .hb-band.G { background: #e31d23; color: #fff; }
.hb-notice { font-size: 10.5px; line-height: 1.5; color: var(--fog-50); margin-top: 16px; max-height: 120px; overflow-y: auto; padding-right: 8px; }
.hb-steps { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.hb-steps span { font-size: 12px; padding: 4px 12px; border-radius: var(--pill); border: 1px solid var(--stroke); color: var(--fog-50); }
.hb-steps span.on { color: var(--volt-ink); background: linear-gradient(135deg, var(--volt-hi), var(--volt-lo)); border-color: transparent; }
.hb-preview { background: #eef2f7; border-radius: 12px; overflow: hidden; }
.hb-preview iframe { width: 100%; height: 460px; border: 0; display: block; background: #eef2f7; }
.hb-people { max-height: 320px; overflow-y: auto; }
.hb-person { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--stroke); font-size: 13px; }
.hb-person.no { opacity: 0.6; }
.hb-person .muted { margin-left: auto; text-align: right; }
.hb-when { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hb-when button.on { border-color: var(--volt); color: var(--fog); }
.hb-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.hb-field-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.hb-field-list button { font-size: 11.5px; border: 1px solid var(--stroke); background: rgba(255,255,255,0.04); color: var(--fog-70); border-radius: var(--pill); padding: 2px 9px; cursor: pointer; }
.hb-field-list button:hover { color: var(--volt); border-color: var(--volt); }
@media (max-width: 900px) { .hb-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hb-form .wide { grid-column: 1 / -1; } }
@media (max-width: 520px) { .hb-form { grid-template-columns: minmax(0, 1fr); } }
/* the guest list: a cell wraps and on a phone each guest is a card (name across the top, stays and dates beside each other, homes under), never a table that scrolls sideways */
#ft-guests .tbl tbody td { white-space: normal; vertical-align: top; }
@media (max-width: 720px) {
  #ft-guests .tbl, #ft-guests .tbl tbody { display: block; }
  #ft-guests .tbl thead { display: none; }
  #ft-guests .tbl tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 2px; border-bottom: 1px solid var(--stroke); }
  #ft-guests .tbl tbody td { display: block; min-width: 0; padding: 0 12px; border: 0; }
  #ft-guests .tbl tbody td:first-child, #ft-guests .tbl tbody td:last-child { grid-column: 1 / -1; }
}

/* (24 October 2026) cleaning: the proof photos and videos on a clean's page */
.cl-thumbs { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-top: 6px; }
.cl-thumbs:empty { display: none; }
.cl-media { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--stroke); background: rgba(255,255,255,0.04); cursor: zoom-in; }
video.cl-media { cursor: default; }

/* (24 October 2026) chat attachments */
.ch-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ch-img { max-width: 220px; max-height: 180px; border-radius: 10px; border: 1px solid var(--stroke); cursor: zoom-in; object-fit: cover; background: rgba(255,255,255,0.04); }

/* (24 October 2026) owner statements: the totals strip, a figure column that lines up, and on a phone each line wraps */
.os-tbl td.num, .os-tbl th.num { text-align: right; white-space: nowrap; }
.os-tbl td { white-space: normal; vertical-align: top; }
.os-tot { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.os-tot div { padding: 10px 12px; border: 1px solid var(--stroke); border-radius: 12px; min-width: 0; }
.os-tot span { display: block; font-size: 12px; color: var(--fog-50); }
.os-tot b { font-family: var(--font-d); font-size: 18px; }
.os-tot .os-net { border-color: var(--volt); }
@media print { .os-tot div { border-color: #999; } }

/* (24 October 2026) guidebooks: a section's heading is typed into in place */
.gd-sec .panel-h { gap: 10px; flex-wrap: wrap; }
.gd-h { flex: 1 1 220px; min-width: 0; font-weight: 700; font-size: 15px; background: transparent; border: 1px solid var(--stroke); border-radius: 10px; padding: 7px 10px; color: var(--fog); }

/* (24 October 2026) HMO rooms: what the checks raised */
.hm-f { font-size: 13px; padding: 6px 10px; border-radius: 10px; margin: 6px 0; border: 1px solid var(--stroke); }
.hm-bad { border-color: var(--bad); color: var(--fog); }
.hm-warn { border-color: #f59e0b; }
@media (max-width: 720px) {   /* a statement's lines on a phone: date and amount across the top, what it is underneath; nothing scrolls sideways */
  .os-tbl, .os-tbl tbody { display: block; width: 100%; }
  .os-tbl thead { display: none; }
  .os-tbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 2px; border-bottom: 1px solid var(--stroke); }
  .os-tbl tbody td { display: block; min-width: 0; padding: 0; border: 0; }
  .os-tbl tbody td:nth-child(1) { grid-column: 1; grid-row: 1; color: var(--fog-50); font-size: 12.5px; }
  .os-tbl tbody td:nth-child(3) { grid-column: 2; grid-row: 1; }
  .os-tbl tbody td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}

/* customers (25 October 2026) */
.cu-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; } .cu-filters .fld { min-width: 150px; flex: 1 1 150px; } .cu-filters .fld:first-child { flex: 2 1 260px; }
.cu-tbl td .chip { margin: 2px 2px 2px 0; }
.cu-basis { font-size: 12px; margin-top: 10px; }
.cu-list { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--stroke); flex-wrap: wrap; }
.cu-list:last-of-type { border-bottom: 0; }
