/* HouseBoard workflow refit — final blue product layer. Loaded after every legacy file. */
:root{
  --hb-brand:#2563eb;--hb-brand-strong:#1d4ed8;--hb-brand-soft:#eaf2ff;
  --hb-ink:#0f172a;--hb-muted:#64748b;--hb-bg:#f6f8fc;--hb-surface:#fff;--hb-line:#dce5f0;
  --primary:#2563eb;--primary2:#1d4ed8;--accent:#2563eb;--softblue:#eaf2ff;
}
[data-theme="dark"]{
  --hb-brand:#60a5fa;--hb-brand-strong:#93c5fd;--hb-brand-soft:#172a46;
  --hb-ink:#eaf2ff;--hb-muted:#9fb0c6;--hb-bg:#0b1220;--hb-surface:#111a2c;--hb-line:#263550;
  --primary:#60a5fa;--primary2:#3b82f6;--accent:#60a5fa;--softblue:#172a46;
}
body{background:radial-gradient(circle at 8% 0,rgba(37,99,235,.08),transparent 30%),var(--hb-bg)!important;overflow-x:hidden}
.hb-refit-navbar{background:color-mix(in srgb,var(--hb-surface) 96%,transparent)!important}
.hb-logo{width:42px!important;height:42px!important;border:0!important;border-radius:13px!important;box-shadow:0 10px 26px rgba(37,99,235,.2)!important;background:transparent!important;overflow:hidden}
.hb-logo img{display:block;width:100%;height:100%;object-fit:contain}.hb-logo svg{display:none!important}.hb-wordmark span{color:var(--hb-brand)!important}
.hb-primary-action,.btn-primary{background:linear-gradient(135deg,var(--hb-brand),var(--hb-brand-strong))!important;border-color:var(--hb-brand)!important;box-shadow:0 10px 24px rgba(37,99,235,.16)!important}
.hb-work-icon{background:var(--hb-brand-soft)!important;color:var(--hb-brand-strong)!important}
.hb-work-link{min-width:0}.hb-work-copy{min-width:0}.hb-work-copy strong,.hb-work-copy span{overflow-wrap:anywhere}
.hb-work-arrow{flex:0 0 auto}
.hb-refit-shell{padding-bottom:34px!important;min-height:0!important}
.hb-site-footer{margin:8px auto 86px!important;padding:12px 16px!important;max-width:1280px;border-top:1px solid var(--hb-line);font-size:.82rem!important}
.hb-footer-brand{color:var(--hb-muted)!important;font-weight:750!important}.hb-footer-extra{margin-bottom:6px!important}
.owner-contact-strip{margin-bottom:10px!important}
/* One inbox only: retire the old welcome overlay, floating alert and dock. */
.hb-welcome-summary,.notify-pop,.hb-notify-dock{display:none!important}
/* Floating Messenger entry, like a support/chat button. */
.chat-launch{display:flex!important;position:fixed!important;right:22px!important;left:auto!important;bottom:24px!important;width:58px!important;height:58px!important;min-width:58px!important;padding:0!important;border-radius:999px!important;align-items:center!important;justify-content:center!important;background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;border:3px solid rgba(255,255,255,.9)!important;color:#fff!important;box-shadow:0 18px 42px rgba(37,99,235,.34)!important;z-index:1095!important;text-decoration:none!important;transform:none!important}
.chat-launch:hover{transform:translateY(-3px)!important}.chat-launch .chat-icon{font-size:1.45rem;line-height:1}.chat-launch .chat-label{display:none!important}
.chat-launch::after{content:'Messages';position:absolute;right:68px;white-space:nowrap;background:#0f172a;color:#fff;padding:7px 10px;border-radius:9px;font-size:.75rem;font-weight:800;opacity:0;pointer-events:none;transform:translateX(5px);transition:.16s ease}.chat-launch:hover::after{opacity:1;transform:none}
/* Prevent headers and buttons escaping cards. */
.hb-surface-head,.hb-page-head{min-width:0}.hb-surface-head>div:first-child,.hb-page-head>div:first-child{min-width:0;flex:1}.hb-surface-head .btn,.hb-page-actions .btn{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:0 0 auto}
.card,.hb-surface,.hb-work-link{max-width:100%}.btn{max-width:100%}.hb-list-row>*{min-width:0}
/* Compact profile record cards. */
.hb-record-summary{border:1px solid var(--hb-line);border-radius:18px;background:var(--hb-surface);padding:18px;display:flex;align-items:center;justify-content:space-between;gap:14px}.hb-record-summary-copy{min-width:0}.hb-record-summary-copy strong{display:block;font-size:1.05rem}.hb-record-summary-copy span{display:block;color:var(--hb-muted);font-size:.84rem;margin-top:4px}.hb-record-summary-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
/* Workflow/case system. */
.hb-case-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr);gap:20px}.hb-case-card{display:block;border:1px solid var(--hb-line);background:var(--hb-surface);border-radius:18px;padding:18px;text-decoration:none;color:var(--hb-ink);transition:.16s ease}.hb-case-card:hover{border-color:#93b7f5;box-shadow:0 12px 32px rgba(37,99,235,.09);transform:translateY(-1px)}.hb-case-card+.hb-case-card{margin-top:12px}.hb-case-top{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.hb-case-title{font-weight:850;font-size:1.04rem}.hb-case-meta{color:var(--hb-muted);font-size:.8rem;margin-top:4px}.hb-case-description{color:var(--hb-muted);font-size:.88rem;margin:12px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hb-case-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;padding-top:12px;border-top:1px solid var(--hb-line)}
.hb-stage-track{display:grid;grid-template-columns:repeat(var(--hb-stage-count,5),minmax(0,1fr));gap:0;margin:16px 0}.hb-stage{position:relative;text-align:center;color:var(--hb-muted);font-size:.7rem;font-weight:800;padding-top:28px;line-height:1.2}.hb-stage::before{content:'';position:absolute;top:7px;left:50%;right:-50%;height:3px;background:var(--hb-line)}.hb-stage:last-child::before{display:none}.hb-stage::after{content:'';position:absolute;top:0;left:50%;width:17px;height:17px;border-radius:50%;transform:translateX(-50%);background:var(--hb-surface);border:3px solid var(--hb-line);z-index:1}.hb-stage.done{color:var(--hb-brand-strong)}.hb-stage.done::before{background:var(--hb-brand)}.hb-stage.done::after{background:var(--hb-brand);border-color:var(--hb-brand)}.hb-stage.current{color:var(--hb-ink)}.hb-stage.current::after{border-color:var(--hb-brand);box-shadow:0 0 0 5px var(--hb-brand-soft)}
.hb-timeline{position:relative;display:grid;gap:14px;margin:8px 0 0;padding-left:28px}.hb-timeline::before{content:'';position:absolute;left:10px;top:7px;bottom:7px;width:2px;background:var(--hb-line)}.hb-timeline-item{position:relative;border:1px solid var(--hb-line);background:var(--hb-surface);border-radius:16px;padding:14px 15px}.hb-timeline-item::before{content:'';position:absolute;left:-25px;top:18px;width:12px;height:12px;border-radius:50%;background:var(--hb-brand);border:3px solid var(--hb-bg)}.hb-timeline-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.hb-timeline-author{font-weight:850}.hb-timeline-time{color:var(--hb-muted);font-size:.76rem;white-space:nowrap}.hb-timeline-type{color:var(--hb-brand-strong);font-size:.74rem;font-weight:850;text-transform:uppercase;letter-spacing:.05em;margin-top:2px}.hb-timeline-note{margin-top:8px;white-space:pre-wrap;overflow-wrap:anywhere}.hb-comment-box{position:sticky;top:92px;border:1px solid var(--hb-line);background:var(--hb-surface);border-radius:18px;padding:17px}.hb-comment-box textarea{min-height:110px}.hb-next-action{background:var(--hb-brand-soft);border:1px solid #bfdbfe;border-radius:14px;padding:12px 13px;color:var(--hb-brand-strong);font-size:.84rem;margin-bottom:14px}
/* Admin people control centre. */
.hb-people-shell{display:grid;grid-template-columns:330px minmax(0,1fr);gap:20px;align-items:start}.hb-people-sidebar{position:sticky;top:94px;border:1px solid var(--hb-line);border-radius:18px;background:var(--hb-surface);overflow:hidden}.hb-people-search{padding:14px;border-bottom:1px solid var(--hb-line)}.hb-person-list{max-height:calc(100vh - 205px);overflow:auto}.hb-person-row{display:flex;align-items:center;gap:11px;padding:12px 14px;border-bottom:1px solid var(--hb-line);text-decoration:none;color:var(--hb-ink)}.hb-person-row:hover,.hb-person-row.active{background:var(--hb-brand-soft)}.hb-person-avatar{width:40px;height:40px;border-radius:13px;background:var(--hb-brand);color:#fff;display:grid;place-items:center;font-weight:900;flex:0 0 auto}.hb-person-copy{min-width:0}.hb-person-copy strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hb-person-copy span{display:block;color:var(--hb-muted);font-size:.78rem}.hb-person-dashboard{display:grid;gap:16px}.hb-person-hero{border:1px solid var(--hb-line);border-radius:20px;background:linear-gradient(135deg,var(--hb-surface),var(--hb-brand-soft));padding:22px}.hb-person-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.hb-person-kpi{border:1px solid var(--hb-line);border-radius:15px;background:var(--hb-surface);padding:14px}.hb-person-kpi span{display:block;color:var(--hb-muted);font-size:.75rem;font-weight:800;text-transform:uppercase}.hb-person-kpi strong{display:block;font-size:1.25rem;margin-top:5px}.hb-control-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hb-control-link{border:1px solid var(--hb-line);border-radius:15px;padding:14px;text-decoration:none;color:var(--hb-ink);background:var(--hb-surface)}.hb-control-link strong{display:block}.hb-control-link span{display:block;color:var(--hb-muted);font-size:.82rem;margin-top:3px}
/* Bills quick-create cards. */
.hb-quick-form{max-width:820px;margin:0 auto}.hb-picker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;max-height:310px;overflow:auto}.hb-picker-option{border:1px solid var(--hb-line);border-radius:14px;padding:11px;background:var(--hb-surface);display:flex;gap:9px;align-items:flex-start}.hb-picker-option:has(input:checked){border-color:#7da7f1;background:var(--hb-brand-soft)}
@media(max-width:991.98px){
  .hb-refit-shell{padding:16px 14px 18px!important}.hb-site-footer{margin-bottom:96px!important}.chat-launch{right:16px!important;bottom:92px!important;width:54px!important;height:54px!important;min-width:54px!important}.chat-launch::after{display:none}.hb-case-grid,.hb-people-shell{grid-template-columns:1fr}.hb-comment-box,.hb-people-sidebar{position:static}.hb-person-list{max-height:300px}.hb-person-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.hb-control-links{grid-template-columns:1fr}
  .hb-surface-head{align-items:stretch;flex-wrap:wrap}.hb-surface-head .btn{width:auto;max-width:100%}.hb-page-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.hb-page-actions .btn{width:100%}.hb-picker-grid{grid-template-columns:1fr}
}
@media(max-width:575.98px){
  .hb-logo{width:36px!important;height:36px!important}.hb-wordmark{font-size:1.05rem!important}.hb-page-actions{grid-template-columns:1fr}.hb-surface-head .btn{width:100%;white-space:normal}.hb-stage{font-size:.61rem;padding-top:25px}.hb-case-card{padding:15px}.hb-case-top,.hb-case-footer{display:block}.hb-case-footer>*{margin-top:8px}.hb-person-kpis{grid-template-columns:1fr 1fr}.hb-record-summary{align-items:flex-start;display:block}.hb-record-summary-actions{justify-content:flex-start;margin-top:12px}
}
/* Footer and compact mobile-height correction. Legal links live in the same footer. */
.hb-footer-legal{display:flex;justify-content:center;gap:8px;align-items:center;margin-top:5px;flex-wrap:wrap}.hb-footer-legal a{color:var(--hb-brand-strong);font-weight:750;text-decoration:none}.hb-footer-legal a:hover{text-decoration:underline}
@media(max-width:991.98px){.hb-site-footer{margin-top:4px!important;margin-bottom:88px!important;padding:10px 12px!important}.hb-refit-shell{padding-bottom:10px!important}}
