
/* HouseBoard 2026 focused information architecture */
:root{--hb-space:clamp(16px,2vw,28px);--hb-radius:22px;--hb-border:rgba(100,116,139,.18);--hb-shadow:0 10px 30px rgba(15,23,42,.06)}
.hb-focus-shell{display:grid;gap:var(--hb-space);margin-bottom:24px}
.hb-focus-hero{padding:clamp(22px,4vw,42px);border:1px solid var(--hb-border);border-radius:28px;background:linear-gradient(135deg,var(--card,#fff),rgba(37,99,235,.08));box-shadow:var(--hb-shadow)}
.hb-focus-hero h1{font-size:clamp(1.8rem,4vw,3rem);letter-spacing:-.04em;margin:.25rem 0}.hb-focus-kicker{text-transform:uppercase;letter-spacing:.12em;font-weight:800;font-size:.72rem;color:#2563eb}
.hb-assistant-inline{margin-top:20px;display:flex;gap:10px;align-items:center}.hb-assistant-inline input{min-height:52px;border-radius:16px}.hb-assistant-inline button{min-height:52px;border-radius:16px;padding-inline:20px}
.hb-focus-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:var(--hb-space)}
.hb-focus-card{background:var(--card,#fff);border:1px solid var(--hb-border);border-radius:var(--hb-radius);padding:clamp(18px,2.4vw,28px);box-shadow:var(--hb-shadow)}
.hb-focus-card h2,.hb-focus-card h3{letter-spacing:-.025em}.hb-focus-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:18px}.hb-focus-count{min-width:32px;height:32px;border-radius:999px;display:grid;place-items:center;font-weight:800;background:rgba(245,158,11,.16);color:#92400e}
.hb-attention-list,.hb-timeline-list,.hb-activity-list{display:grid;gap:10px}.hb-attention-item,.hb-timeline-item,.hb-activity-item{display:flex;gap:12px;align-items:flex-start;padding:13px 14px;border:1px solid var(--hb-border);border-radius:16px;text-decoration:none;color:inherit;background:rgba(148,163,184,.045)}
.hb-attention-item:hover,.hb-timeline-item:hover{transform:translateY(-1px);border-color:rgba(37,99,235,.35)}.hb-attention-dot{width:10px;height:10px;margin-top:7px;border-radius:50%;flex:0 0 auto}.is-overdue .hb-attention-dot{background:#dc2626}.is-warning .hb-attention-dot{background:#f59e0b}.is-info .hb-attention-dot{background:#2563eb}.is-done .hb-attention-dot{background:#16a34a}
.hb-item-title{font-weight:750}.hb-item-meta{font-size:.84rem;color:var(--muted,#64748b);margin-top:2px}.hb-item-value{margin-left:auto;font-weight:800;white-space:nowrap}
.hb-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hb-quick-action{display:flex;align-items:center;gap:10px;min-height:58px;padding:13px;border:1px solid var(--hb-border);border-radius:16px;text-decoration:none;color:inherit;font-weight:700}.hb-quick-action:hover{background:rgba(37,99,235,.06);border-color:rgba(37,99,235,.3)}.hb-quick-icon{font-size:1.25rem}
.hb-mini-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:16px}.hb-mini-stat{padding:14px;border-radius:16px;background:rgba(148,163,184,.08)}.hb-mini-stat strong{display:block;font-size:1.35rem}.hb-mini-stat span{font-size:.78rem;color:var(--muted,#64748b)}
.hb-all-records{border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--card,#fff);overflow:hidden;margin-top:24px}.hb-all-records>summary{list-style:none;cursor:pointer;padding:18px 22px;font-weight:800;display:flex;align-items:center;justify-content:space-between}.hb-all-records>summary::-webkit-details-marker{display:none}.hb-all-records>summary:after{content:'＋';font-size:1.3rem}.hb-all-records[open]>summary:after{content:'−'}.hb-all-records-body{padding:0 18px 18px}.hb-all-records-note{font-size:.86rem;color:var(--muted,#64748b);font-weight:500}
.hb-section-label{font-size:.75rem;text-transform:uppercase;letter-spacing:.1em;font-weight:800;color:#64748b;margin-bottom:8px}.hb-empty-compact{padding:18px;text-align:center;border:1px dashed var(--hb-border);border-radius:16px;color:var(--muted,#64748b)}
@media(max-width:991px){.hb-focus-grid{grid-template-columns:1fr}.hb-focus-side{display:grid;grid-template-columns:1fr 1fr;gap:var(--hb-space)}}
@media(max-width:680px){.hb-focus-side{grid-template-columns:1fr}.hb-assistant-inline{display:grid}.hb-quick-actions{grid-template-columns:1fr 1fr}.hb-mini-stats{grid-template-columns:1fr}.hb-focus-card{padding:18px}.hb-focus-hero{padding:22px}.hb-item-value{font-size:.9rem}.hb-all-records-body{padding:0 10px 10px}}

/* HouseBoard v2 UX system */
:root{--hb-radius:18px;--hb-border:#dbe3ee;--hb-muted:#64748b;--hb-surface:#fff;--hb-bg:#f5f7fb;--hb-shadow:0 12px 30px rgba(15,23,42,.07)}
.card,.hb-focus-card,.hb-payment-schedule{border:1px solid var(--hb-border)!important;border-radius:var(--hb-radius)!important;box-shadow:var(--hb-shadow);background:var(--hb-surface)}
.btn{border-radius:12px;font-weight:750}.form-control,.form-select{border-radius:12px;min-height:44px}.table-responsive{border-radius:14px}
.hb-attention-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin:1rem 0}.hb-attention-item{transition:transform .18s ease,box-shadow .18s ease}.hb-attention-item:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(15,23,42,.08)}
.hb-payment-schedule{padding:1.5rem;margin-bottom:1.5rem}.hb-section-toolbar{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:1rem}.hb-count-pill{background:#eef4ff;color:#2563eb;border-radius:999px;padding:.35rem .7rem;font-weight:800}.hb-plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem}.hb-plan-card{border:1px solid var(--hb-border);border-radius:16px;padding:1rem;background:#fff}.hb-plan-card.is-paused{opacity:.78}.hb-plan-top{display:flex;justify-content:space-between;gap:1rem}.hb-plan-top h3{font-size:1rem;margin:0}.hb-plan-top p{font-size:.84rem;color:var(--hb-muted);margin:.2rem 0}.hb-status-chip{height:max-content;padding:.3rem .6rem;border-radius:999px;font-size:.75rem;font-weight:800}.hb-status-chip.is-active{background:#dcfce7;color:#166534}.hb-status-chip.is-paused{background:#e2e8f0;color:#475569}.hb-plan-facts{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;margin:1rem 0}.hb-plan-facts div{background:#f8fafc;border-radius:12px;padding:.75rem}.hb-plan-facts span{display:block;font-size:.75rem;color:var(--hb-muted)}.hb-plan-facts strong{font-size:1rem}.hb-record-payment{border-top:1px solid var(--hb-border);padding-top:.8rem}.hb-record-payment summary{cursor:pointer;color:#2563eb;font-weight:800}.hb-payment-form{display:grid;gap:.8rem;padding-top:.8rem}.hb-payment-form label{font-size:.82rem;font-weight:750}.hb-inline-note{background:#f8fafc;border-radius:10px;padding:.65rem;color:var(--hb-muted);font-size:.8rem}.hb-plan-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:1rem}.hb-plan-actions form{margin:0}
.hb-weather-now{display:flex;align-items:end;gap:.7rem;margin:.8rem 0}.hb-weather-now strong{font-size:2.2rem;line-height:1}.hb-weather-now span{color:var(--hb-muted)}.hb-weather-meta{display:flex;gap:.45rem;flex-wrap:wrap}.hb-weather-meta span{background:#f1f5f9;padding:.35rem .55rem;border-radius:999px;font-size:.75rem}.hb-weather-days{display:grid;grid-template-columns:repeat(5,1fr);gap:.4rem;margin-top:1rem}.hb-weather-days div{background:#f8fafc;border-radius:10px;padding:.55rem;text-align:center}.hb-weather-days span,.hb-weather-days small{display:block;color:var(--hb-muted);font-size:.7rem}.hb-weather-days strong{display:block}.hb-weather-loading{color:var(--hb-muted);padding:.8rem 0}
.hb-call-shell{min-height:calc(100vh - 130px);display:grid;place-items:center;padding:1rem}.hb-call-card{width:min(760px,100%);background:linear-gradient(160deg,#111827,#1e293b);color:#fff;border-radius:28px;padding:2rem;text-align:center;box-shadow:0 24px 70px rgba(15,23,42,.35)}.hb-call-avatar{width:92px;height:92px;border-radius:50%;display:grid;place-items:center;background:#2563eb;margin:auto;font-size:2.2rem;font-weight:900}.hb-call-card h1{margin:.8rem 0 .2rem}.hb-call-card p{color:#cbd5e1}.hb-video-stage{position:relative;aspect-ratio:16/9;background:#020617;border-radius:20px;overflow:hidden;margin:1.2rem 0}.hb-video-stage.voice-only{aspect-ratio:3/1;background:radial-gradient(circle at center,#334155,#020617)}.hb-video-stage video#remoteVideo{width:100%;height:100%;object-fit:cover}.hb-video-stage video#localVideo{position:absolute;right:14px;bottom:14px;width:24%;border-radius:12px;border:2px solid rgba(255,255,255,.7)}.voice-only video{display:none}.hb-call-controls{display:flex;justify-content:center;gap:1rem}.hb-call-control{border:0;border-radius:50%;width:68px;height:68px;background:#334155;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.hb-call-control span{font-size:.68rem}.hb-call-control.is-end{background:#dc2626}.hb-call-control.is-off{background:#f59e0b}.hb-call-note{font-size:.75rem;margin-top:1rem}
@media(max-width:700px){.hb-section-toolbar{align-items:flex-start}.hb-plan-grid{grid-template-columns:1fr}.hb-weather-days{grid-template-columns:repeat(3,1fr)}.hb-weather-days div:nth-child(n+4){display:none}.hb-call-card{padding:1.2rem}.hb-video-stage{aspect-ratio:4/5}.hb-call-control{width:60px;height:60px}.table-responsive{overflow-x:auto} }

/* v2.1: complete dark-mode coverage for newly added dashboard, weather and payment UX */
[data-theme="dark"]{
  --hb-border:#334155;
  --hb-muted:#a9b7cc;
  --hb-surface:#111a2c;
  --hb-bg:#0b1220;
  --hb-shadow:0 14px 34px rgba(0,0,0,.28);
}
[data-theme="dark"] .hb-focus-hero{
  background:linear-gradient(135deg,#111a2c,#17233a);
  border-color:#334155;
  color:#eef6ff;
}
[data-theme="dark"] .hb-focus-card,
[data-theme="dark"] .hb-payment-schedule,
[data-theme="dark"] .hb-all-records,
[data-theme="dark"] .hb-plan-card,
[data-theme="dark"] .card{
  background:#111a2c!important;
  border-color:#334155!important;
  color:#eef6ff;
}
[data-theme="dark"] .hb-attention-item,
[data-theme="dark"] .hb-timeline-item,
[data-theme="dark"] .hb-activity-item,
[data-theme="dark"] .hb-quick-action,
[data-theme="dark"] .hb-mini-stat{
  background:#162238;
  border-color:#334155;
  color:#eef6ff;
}
[data-theme="dark"] .hb-attention-item:hover,
[data-theme="dark"] .hb-timeline-item:hover,
[data-theme="dark"] .hb-quick-action:hover{
  background:#1b2b46;
  border-color:#4f6f9f;
}
[data-theme="dark"] .hb-plan-facts div,
[data-theme="dark"] .hb-inline-note,
[data-theme="dark"] .hb-weather-meta span,
[data-theme="dark"] .hb-weather-days div{
  background:#0f172a;
  color:#e2e8f0;
}
[data-theme="dark"] .hb-weather-now span,
[data-theme="dark"] .hb-weather-days span,
[data-theme="dark"] .hb-weather-days small,
[data-theme="dark"] .hb-plan-top p,
[data-theme="dark"] .hb-plan-facts span,
[data-theme="dark"] .hb-inline-note,
[data-theme="dark"] .hb-item-meta,
[data-theme="dark"] .hb-mini-stat span,
[data-theme="dark"] .hb-weather-loading,
[data-theme="dark"] .hb-section-label{
  color:#a9b7cc!important;
}
[data-theme="dark"] .hb-record-payment{border-color:#334155}
[data-theme="dark"] .hb-status-chip.is-active{background:#123b2a;color:#86efac}
[data-theme="dark"] .hb-status-chip.is-paused{background:#253247;color:#cbd5e1}
[data-theme="dark"] .hb-count-pill{background:#172554;color:#93c5fd}
[data-theme="dark"] .hb-focus-count{background:#422006;color:#fcd34d}
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="file"]{
  background:#0f172a!important;
  color:#eef6ff!important;
  border-color:#3b4b63!important;
  color-scheme:dark;
}
[data-theme="dark"] .form-control::placeholder{color:#7f8da3}
[data-theme="dark"] .btn-outline-secondary{color:#d5deea;border-color:#53657d}
[data-theme="dark"] .btn-outline-secondary:hover{background:#26354b;color:#fff}
[data-theme="dark"] .text-dark{color:#eef6ff!important}
[data-theme="dark"] .bg-light{background:#253247!important;color:#eef6ff!important}
.hb-dashboard-weather{margin-top:0}
@media(min-width:992px){.hb-dashboard-weather{max-width:none}}

/* ===== HouseBoard final call UX ===== */
.hb-call-controls{flex-wrap:wrap}
.hb-call-card{transition:width .25s ease,transform .25s ease,border-radius .25s ease,padding .25s ease}
body.hb-call-minimized .hb-call-shell{place-items:end;padding:18px;pointer-events:none}
body.hb-call-minimized .hb-call-card{pointer-events:auto;width:min(390px,calc(100vw - 24px));padding:1rem;border-radius:22px;text-align:left}
body.hb-call-minimized .hb-call-avatar{width:48px;height:48px;font-size:1.1rem;margin:0;float:left;margin-right:.75rem}
body.hb-call-minimized .hb-call-card h1{font-size:1rem;margin:.2rem 0 0}
body.hb-call-minimized .hb-call-card p#callStatus{font-size:.78rem;margin:0}
body.hb-call-minimized .hb-video-stage{height:150px;aspect-ratio:auto;margin:.8rem 0;clear:both}
body.hb-call-minimized .hb-video-stage.voice-only{height:0;margin:.55rem 0 0;min-height:0}
body.hb-call-minimized .hb-call-control{width:48px;height:48px}
body.hb-call-minimized .hb-call-control span{display:none}
body.hb-call-minimized .hb-call-note{display:none}
@media(max-width:575.98px){
  .hb-call-shell{min-height:calc(100dvh - 120px);padding:.5rem}
  .hb-call-card{border-radius:22px;padding:1rem;width:100%}
  .hb-call-card h1{font-size:1.35rem}
  .hb-call-controls{gap:.55rem}
  .hb-call-control{width:52px;height:52px;font-size:1rem}
  .hb-call-control span{font-size:.58rem;line-height:1.05}
  body.hb-call-minimized .hb-call-shell{position:fixed;inset:0;z-index:2050;padding:10px;align-items:end}
  body.hb-call-minimized .hb-call-card{width:100%}
}


/* Final member dashboard and responsive field fixes */
.hb-dashboard-weather{display:block!important;width:100%;margin:0 0 1.5rem!important}
.hb-attention-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;column-gap:.75rem;row-gap:.2rem}
.hb-attention-copy{min-width:0;display:flex;flex-direction:column;gap:.15rem}
.hb-attention-item .hb-item-title,.hb-attention-item .hb-item-meta{white-space:normal;overflow-wrap:anywhere}
.hb-attention-item .hb-item-value{white-space:nowrap;padding-left:.4rem}
.owner-payment-quick-form input[type="date"],
form input[type="date"]{min-width:145px;width:100%}
.owner-payment-quick-form .col-auto{min-width:155px}
@media(max-width:767.98px){
  .hb-attention-item{grid-template-columns:auto minmax(0,1fr)}
  .hb-attention-item .hb-item-value{grid-column:2;padding-left:0;margin-top:.2rem}
  .owner-payment-quick-form .col-auto{width:100%;min-width:0}
  form input[type="date"]{min-width:0;width:100%}
}

/* Final production polish: dashboards, calendars, records and responsive forms */
.hb-weather-location{font-weight:800;color:var(--hb-text);margin-top:.75rem;overflow-wrap:anywhere}.hb-dashboard-weather{margin-top:.75rem!important}.hb-focus-hero h1{overflow-wrap:anywhere}
.hb-empty-compact{border:1px dashed var(--hb-line);border-radius:16px;padding:1rem;background:var(--hb-soft);color:var(--hb-muted)}
.table-responsive{scrollbar-width:thin;scrollbar-color:#94a3b8 transparent}.table-responsive::-webkit-scrollbar,.cal-week-scroll::-webkit-scrollbar{height:8px;width:8px}.table-responsive::-webkit-scrollbar-thumb,.cal-week-scroll::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:999px}
input[type=date],input[type=time],select.form-select{min-width:0}.card,.hb-focus-card{min-width:0}.row>*{min-width:0}
@media(max-width:1100px){.owner-payment-quick-form .col-auto{flex:1 1 180px}.owner-payment-quick-form .form-control{width:100%}}
@media(max-width:800px){.hb-focus-grid{grid-template-columns:1fr!important}.hb-mini-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.hb-weather-days{overflow-x:auto;grid-template-columns:repeat(5,minmax(95px,1fr));padding-bottom:.35rem}.hb-weather-days div:nth-child(n){display:block!important}}
@media(max-width:560px){.hb-mini-stats{grid-template-columns:1fr}.hb-focus-card,.card{border-radius:18px}.hb-weather-now{align-items:center}.hb-weather-now strong{font-size:1.9rem}}

/* Context-aware weather and Smart Brief */
.hb-weather-card{position:relative;overflow:hidden;isolation:isolate;transition:background .35s ease,color .35s ease,border-color .35s ease}
.hb-weather-card>*{position:relative;z-index:2}.hb-weather-card::before,.hb-weather-card::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:1}
.hb-weather-main-icon{font-size:2rem;line-height:1}.hb-weather-local-time{font-weight:600;opacity:.78;margin-left:.35rem;font-size:.82rem}
.hb-location-off{display:flex;flex-direction:column;align-items:flex-start;gap:.45rem;padding:.75rem 0}.hb-location-off span{color:var(--hb-muted);font-size:.86rem}
.weather-sunny{background:linear-gradient(135deg,#eff6ff 0%,#fff7d6 100%);border-color:#bfdbfe}.weather-sunny::before{width:170px;height:170px;inset:-70px -50px auto auto;border-radius:50%;background:radial-gradient(circle,rgba(250,204,21,.35),rgba(250,204,21,0) 68%)}
.weather-cloudy,.weather-fog{background:linear-gradient(135deg,#f8fafc,#dbeafe);border-color:#cbd5e1}.weather-cloudy::before,.weather-fog::before{background:radial-gradient(ellipse at 85% 20%,rgba(255,255,255,.9) 0 12%,transparent 13%),radial-gradient(ellipse at 75% 34%,rgba(255,255,255,.7) 0 15%,transparent 16%)}
.weather-rain{background:linear-gradient(135deg,#334155,#1d4ed8);color:#fff;border-color:#60a5fa}.weather-rain::after{opacity:.18;background-image:repeating-linear-gradient(112deg,transparent 0 21px,rgba(255,255,255,.9) 22px 23px,transparent 24px 45px);animation:hbRain 1.15s linear infinite}
.weather-storm{background:linear-gradient(135deg,#111827,#312e81);color:#fff;border-color:#6366f1}.weather-storm::before{background:linear-gradient(115deg,transparent 58%,rgba(255,255,255,.18) 59%,transparent 61%);animation:hbFlash 5s infinite}
.weather-night{background:linear-gradient(135deg,#0f172a,#1e3a8a);color:#fff;border-color:#334155}.weather-night::before{background-image:radial-gradient(circle at 82% 24%,#fff 0 2px,transparent 3px),radial-gradient(circle at 72% 40%,#fff 0 1px,transparent 2px),radial-gradient(circle at 92% 55%,#fff 0 1.5px,transparent 2.5px)}
.weather-snow{background:linear-gradient(135deg,#eff6ff,#e0f2fe);border-color:#bae6fd}.weather-snow::after{background-image:radial-gradient(circle,#fff 0 2px,transparent 3px);background-size:38px 38px;opacity:.75;animation:hbSnow 5s linear infinite}
.weather-rain .hb-section-label,.weather-rain .hb-weather-now span,.weather-rain .hb-weather-days span,.weather-rain .hb-weather-days small,.weather-rain .hb-weather-location,.weather-storm .hb-section-label,.weather-storm .hb-weather-now span,.weather-storm .hb-weather-days span,.weather-storm .hb-weather-days small,.weather-storm .hb-weather-location,.weather-night .hb-section-label,.weather-night .hb-weather-now span,.weather-night .hb-weather-days span,.weather-night .hb-weather-days small,.weather-night .hb-weather-location{color:rgba(255,255,255,.9)}
.weather-rain .hb-weather-meta span,.weather-rain .hb-weather-days div,.weather-storm .hb-weather-meta span,.weather-storm .hb-weather-days div,.weather-night .hb-weather-meta span,.weather-night .hb-weather-days div{background:rgba(255,255,255,.13);color:#fff;backdrop-filter:blur(6px)}
.hb-smart-brief{margin-top:1rem;padding:1rem 1.05rem;border-radius:16px;background:rgba(255,255,255,.72);border:1px solid rgba(148,163,184,.35);box-shadow:0 8px 24px rgba(15,23,42,.08);color:#172033;backdrop-filter:blur(8px)}
.hb-smart-brief-title{font-size:.72rem;letter-spacing:.09em;text-transform:uppercase;font-weight:900;color:#2563eb;margin-bottom:.35rem}.hb-smart-brief-heading{font-weight:850;font-size:1rem}.hb-smart-brief-copy{margin-top:.2rem;color:#475569;line-height:1.45}
@keyframes hbRain{from{transform:translateY(-35px)}to{transform:translateY(35px)}}@keyframes hbSnow{from{transform:translateY(-18px)}to{transform:translateY(20px)}}@keyframes hbFlash{0%,92%,100%{opacity:0}93%{opacity:.65}94%{opacity:.05}95%{opacity:.45}96%{opacity:0}}
@media(prefers-reduced-motion:reduce){.hb-weather-card::before,.hb-weather-card::after{animation:none!important}}
@media(max-width:560px){.hb-weather-location{display:flex;flex-wrap:wrap;gap:.15rem .3rem}.hb-weather-local-time{width:100%;margin-left:0}.hb-smart-brief{padding:.9rem}}


/* Final role dashboard workspace: navigation only, never duplicated metrics. */
.hb-role-workspace{background:var(--card,#fff);border:1px solid var(--border,#dbe3ef);border-radius:22px;padding:24px;box-shadow:0 14px 36px rgba(15,23,42,.055)}
.hb-role-workspace-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.hb-role-kicker{text-transform:uppercase;letter-spacing:.12em;font-size:.73rem;font-weight:800;color:var(--muted,#64748b);margin-bottom:5px}
.hb-role-tool-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.hb-role-tool-grid-owner{grid-template-columns:repeat(4,minmax(0,1fr))}
.hb-role-tool-grid>a{display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;min-height:94px;padding:15px;border:1px solid var(--border,#dbe3ef);border-radius:17px;text-decoration:none;color:var(--text,#182235);background:linear-gradient(145deg,var(--card,#fff),rgba(37,99,235,.025));transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.hb-role-tool-grid>a:hover{transform:translateY(-2px);border-color:rgba(37,99,235,.45);box-shadow:0 12px 24px rgba(37,99,235,.09)}
.hb-role-tool-grid>a>span{grid-row:1/3;font-size:1.55rem;line-height:1;text-align:center}
.hb-role-tool-grid>a>strong{font-size:.98rem;line-height:1.2}
.hb-role-tool-grid>a>small{color:var(--muted,#64748b);line-height:1.3;margin-top:3px}
@media(max-width:1100px){.hb-role-tool-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hb-role-tool-grid-owner{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.hb-role-workspace{padding:18px;border-radius:18px}.hb-role-tool-grid,.hb-role-tool-grid-owner{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.hb-role-tool-grid>a{grid-template-columns:34px 1fr;min-height:82px;padding:12px}.hb-role-tool-grid>a>span{font-size:1.3rem}.hb-role-tool-grid>a>strong{font-size:.9rem}.hb-role-tool-grid>a>small{font-size:.73rem}}

/* Final command-centre dashboard summaries */
.hb-summary-section{margin-top:1rem}.hb-summary-heading{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:1rem}.hb-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.hb-summary-card{display:flex;gap:13px;align-items:center;padding:18px;border:1px solid var(--border,#dbe4f0);border-radius:18px;background:var(--card,#fff);text-decoration:none;color:inherit;box-shadow:0 12px 30px rgba(15,23,42,.05);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.hb-summary-card:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(15,23,42,.09);border-color:rgba(37,99,235,.35)}.hb-summary-icon{font-size:1.55rem;flex:0 0 auto}.hb-summary-card span:last-child{min-width:0;display:flex;flex-direction:column}.hb-summary-card small{color:var(--muted,#64748b);font-weight:700}.hb-summary-card strong{font-size:1.5rem;line-height:1.2;overflow-wrap:anywhere}.hb-summary-card em{font-size:.78rem;color:var(--muted,#64748b);font-style:normal;margin-top:3px}@media(max-width:991.98px){.hb-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:575.98px){.hb-summary-grid{grid-template-columns:1fr}.hb-focus-grid{display:block}.hb-focus-side{margin-top:14px}.hb-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Final single-chapter dashboard split: preserves all existing dashboard content. */
.hb-dashboard-chapter{margin:1.5rem 0 0;border:1px solid var(--border,#d9e2ef);border-radius:22px;background:var(--card,#fff);box-shadow:0 12px 34px rgba(15,23,42,.07);overflow:hidden}
.hb-dashboard-chapter>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.15rem 1.35rem;user-select:none;background:linear-gradient(135deg,var(--card,#fff),rgba(37,99,235,.045));border-bottom:1px solid transparent}
.hb-dashboard-chapter>summary::-webkit-details-marker{display:none}
.hb-dashboard-chapter>summary>span{display:flex;flex-direction:column;gap:.18rem;min-width:0}
.hb-dashboard-chapter>summary strong{font-size:1.18rem;line-height:1.2;color:var(--text,#172033)}
.hb-dashboard-chapter>summary .hb-all-records-note{font-size:.84rem;color:var(--muted,#64748b);font-weight:500}
.hb-dashboard-chapter>summary::after{content:'+';display:grid;place-items:center;flex:0 0 2.35rem;width:2.35rem;height:2.35rem;border-radius:999px;border:1px solid rgba(37,99,235,.25);background:#fff;color:#2563eb;font-size:1.45rem;font-weight:700;line-height:1}
.hb-dashboard-chapter[open]>summary{border-bottom-color:var(--border,#d9e2ef)}
.hb-dashboard-chapter[open]>summary::after{content:'−'}
.hb-dashboard-chapter>.hb-all-records-body{padding:1.35rem;background:transparent}
@media(max-width:767.98px){.hb-dashboard-chapter{border-radius:18px}.hb-dashboard-chapter>summary{padding:1rem}.hb-dashboard-chapter>.hb-all-records-body{padding:1rem}.hb-dashboard-chapter>summary strong{font-size:1.05rem}.hb-dashboard-chapter>summary .hb-all-records-note{font-size:.78rem}}


/* Final command-centre components: keep shortcuts and upcoming items readable */
.hb-tool-hint{color:var(--hb-muted,#64748b);font-size:.78rem;font-weight:700;white-space:nowrap}
.hb-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.hb-tool-grid>a{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;align-items:center;min-width:0;padding:13px 14px;border:1px solid var(--hb-border,#dbe4f0);border-radius:16px;background:var(--card,#fff);color:var(--hb-text,#172033);text-decoration:none;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease}
.hb-tool-grid>a:hover{transform:translateY(-1px);border-color:rgba(37,99,235,.38);background:rgba(37,99,235,.045);box-shadow:0 10px 22px rgba(15,23,42,.07)}
.hb-tool-grid>a>span{grid-row:1/3;font-size:1.25rem;line-height:1}
.hb-tool-grid>a>strong{min-width:0;overflow-wrap:anywhere;font-size:.95rem;line-height:1.2}
.hb-tool-grid>a>small{min-width:0;color:var(--hb-muted,#64748b);font-size:.75rem;line-height:1.25;overflow-wrap:anywhere}
.hb-upcoming-list,.hb-activity-list{display:grid;gap:10px;margin-top:12px}
.hb-upcoming-list>a,.hb-activity-item{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:13px 14px;border:1px solid var(--hb-border,#dbe4f0);border-radius:15px;background:rgba(248,250,252,.82);color:var(--hb-text,#172033);text-decoration:none}
.hb-upcoming-list>a:hover{border-color:rgba(37,99,235,.38);background:rgba(37,99,235,.045)}
.hb-upcoming-list a>span,.hb-activity-item>span:last-child{display:flex;flex-direction:column;min-width:0}
.hb-upcoming-list strong,.hb-activity-item .hb-item-title{overflow-wrap:anywhere;line-height:1.3}
.hb-upcoming-list small,.hb-activity-item .hb-item-meta{color:var(--hb-muted,#64748b);font-size:.76rem;line-height:1.3}
.hb-upcoming-list b{flex:0 0 auto;white-space:nowrap;font-size:.9rem}
.hb-dashboard-chapter>summary{cursor:pointer;user-select:none}
.hb-dashboard-chapter>summary::after{content:'−';display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:rgba(37,99,235,.09);color:#2563eb;font-size:1.2rem;font-weight:900;flex:0 0 auto}
.hb-dashboard-chapter:not([open])>summary::after{content:'+'}
[data-theme="dark"] .hb-tool-grid>a,[data-theme="dark"] .hb-upcoming-list>a,[data-theme="dark"] .hb-activity-item{background:rgba(15,23,42,.42);color:var(--hb-text,#e5e7eb)}
@media(max-width:575.98px){.hb-tool-grid{grid-template-columns:1fr 1fr}.hb-tool-grid>a{padding:12px 10px;column-gap:8px}.hb-upcoming-list>a{align-items:flex-start}.hb-upcoming-list b{padding-top:2px}.hb-dashboard-chapter>summary{align-items:flex-start}}
@media(max-width:390px){.hb-tool-grid{grid-template-columns:1fr}}

/* Final dashboard polish: stable shortcuts and informative single-chapter headers */
.hb-focus-side .hb-tool-grid,.hb-focus-side .hb-quick-actions{width:100%}
.hb-focus-side .hb-tool-grid>a,.hb-focus-side .hb-quick-action{min-width:0;overflow:hidden}
.hb-dashboard-chapter>summary{min-height:82px}
.hb-dashboard-chapter>summary .hb-all-records-note{max-width:900px;line-height:1.45}
@media(max-width:575.98px){.hb-dashboard-chapter>summary{min-height:74px}.hb-dashboard-chapter>summary .hb-all-records-note{padding-right:.25rem}}

/* Admin House centre: resident/bond/settlement glance */
.hb-admin-glance{border:1px solid var(--hb-border,#dfe5ef);border-radius:22px;padding:20px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(247,249,253,.98));box-shadow:0 12px 34px rgba(32,45,75,.06)}
.hb-admin-glance-head,.hb-glance-panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.hb-admin-glance-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.35fr);gap:16px;margin-top:16px}
.hb-glance-panel{min-width:0;border:1px solid var(--hb-border,#e0e5ee);border-radius:18px;background:var(--bs-body-bg,#fff);padding:16px}
.hb-glance-panel-head>div{display:flex;align-items:center;gap:9px}.hb-glance-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:rgba(59,130,246,.11)}
.hb-status-pill,.hb-bond-chip{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:.75rem;font-weight:700;background:rgba(59,130,246,.1);white-space:nowrap}
.hb-bond-chip.is-good{background:rgba(34,197,94,.13);color:#15803d}.hb-bond-chip.is-warning{background:rgba(245,158,11,.14);color:#9a5b00}
.hb-settlement-list,.hb-resident-glance-list{display:grid;gap:9px;margin-top:13px}
.hb-settlement-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;padding:11px 12px;border-radius:13px;background:rgba(100,116,139,.07)}
.hb-settlement-people{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:wrap}.hb-settlement-people span{font-size:.76rem;color:var(--bs-secondary-color,#667085)}.hb-settlement-amount{font-weight:800}.hb-settlement-row small{grid-column:1/-1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--bs-secondary-color,#667085)}
.hb-resident-glance{border:1px solid var(--hb-border,#e1e6ef);border-radius:14px;overflow:hidden;background:var(--bs-body-bg,#fff)}
.hb-resident-glance>summary{list-style:none;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:11px;padding:12px;cursor:pointer}.hb-resident-glance>summary::-webkit-details-marker{display:none}
.hb-resident-avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#e0e7ff,#dbeafe);font-weight:800;color:#334155}.hb-resident-name{display:grid;min-width:0}.hb-resident-name small{color:var(--bs-secondary-color,#667085);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hb-row-toggle{font-size:1.25rem;font-weight:700}.hb-row-toggle .when-open{display:none}.hb-resident-glance[open] .hb-row-toggle .when-closed{display:none}.hb-resident-glance[open] .hb-row-toggle .when-open{display:inline}
.hb-resident-glance-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 12px 13px;border-top:1px solid var(--hb-border,#e1e6ef);padding-top:12px}.hb-resident-glance-details>div{display:grid;gap:2px;padding:9px 10px;border-radius:11px;background:rgba(100,116,139,.065)}.hb-resident-glance-details span,.hb-resident-glance-details small{font-size:.75rem;color:var(--bs-secondary-color,#667085)}.hb-resident-contact{grid-column:1/-1}.hb-resident-glance-details>a{justify-self:start}
@media(max-width:900px){.hb-admin-glance-grid{grid-template-columns:1fr}.hb-resident-glance>summary{grid-template-columns:auto minmax(0,1fr) auto}.hb-bond-chip{grid-column:2;justify-self:start}.hb-row-toggle{grid-column:3;grid-row:1/3}.hb-resident-glance-details{grid-template-columns:1fr}}
[data-bs-theme="dark"] .hb-admin-glance{background:linear-gradient(180deg,rgba(26,32,44,.98),rgba(17,24,39,.98))}

/* Final dashboard polish: prevent clipped quick actions and support shared-bond records. */
.hb-quick-action{min-width:0;white-space:normal;line-height:1.2;overflow-wrap:anywhere}
.hb-quick-icon{flex:0 0 auto}.hb-bond-chip.is-shared{background:#f3e8ff;color:#7e22ce;border-color:#d8b4fe}
@media(min-width:901px){.hb-focus-side .hb-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Owner overview UX refresh */
.hb-owner-summary-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hb-owner-summary-cards>div,.hb-owner-resident-detail>div{display:grid;gap:3px;padding:12px;border-radius:14px;background:rgba(100,116,139,.07)}.hb-owner-summary-cards span,.hb-owner-resident-detail span{font-size:.75rem;color:var(--bs-secondary-color,#64748b)}.hb-owner-summary-cards strong{font-size:1.05rem}.hb-owner-payment-list{display:grid;gap:8px}.hb-owner-payment-list>div{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid var(--hb-border,#e2e8f0)}.hb-owner-payment-list span{display:grid}.hb-owner-payment-list small{color:var(--bs-secondary-color,#64748b)}.hb-owner-empty-inline{padding:12px;border-radius:12px;background:rgba(34,197,94,.08);color:#15803d;font-weight:700}.hb-key-date-list,.hb-owner-resident-list,.hb-owner-document-list{display:grid;gap:10px}.hb-key-date-item,.hb-owner-document{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;border:1px solid var(--hb-border,#e2e8f0);border-radius:14px}.hb-key-date-item>span:nth-child(2),.hb-owner-document>span:nth-child(2){display:grid;min-width:0}.hb-key-date-item small,.hb-owner-document small{color:var(--bs-secondary-color,#64748b);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hb-date-icon,.hb-doc-icon{font-size:1.25rem}.hb-owner-empty-state{display:grid;place-items:center;text-align:center;gap:5px;min-height:150px;padding:20px;border:1px dashed var(--hb-border,#cbd5e1);border-radius:16px;color:var(--bs-secondary-color,#64748b)}.hb-owner-empty-state>span{font-size:2rem}.hb-owner-resident{border:1px solid var(--hb-border,#e2e8f0);border-radius:14px;overflow:hidden}.hb-owner-resident>summary{list-style:none;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:12px;cursor:pointer}.hb-owner-resident>summary::-webkit-details-marker{display:none}.hb-owner-resident>summary>span:nth-child(2){display:grid;min-width:0}.hb-owner-resident>summary small{color:var(--bs-secondary-color,#64748b);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hb-owner-resident-detail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border-top:1px solid var(--hb-border,#e2e8f0)}.hb-owner-resident-detail .wide{grid-column:1/-1}.hb-doc-actions{display:flex;gap:6px}
@media(max-width:640px){.hb-owner-summary-cards,.hb-owner-resident-detail{grid-template-columns:1fr}.hb-owner-resident-detail .wide{grid-column:auto}.hb-key-date-item,.hb-owner-document{grid-template-columns:auto minmax(0,1fr)}.hb-key-date-item>.hb-status-pill,.hb-owner-document>.hb-doc-actions,.hb-owner-document>a{grid-column:2;justify-self:start}.hb-owner-resident>summary{grid-template-columns:auto minmax(0,1fr) auto}.hb-owner-resident>summary>.hb-status-pill{grid-column:2;justify-self:start}.hb-owner-resident>summary>span:last-child{grid-column:3;grid-row:1/3}}

/* Shared files centre + safe horizontal sliders for narrow screens */
.scroll-strip,
.table-scroll,
.responsive-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
  overscroll-behavior-inline: contain;
}
.scroll-strip::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar,
.responsive-table-wrap::-webkit-scrollbar { height: 8px; }
.scroll-strip::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb,
.responsive-table-wrap::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 999px; }

.shared-filter-strip { display:flex; gap:.65rem; padding:.2rem 0 .65rem; }
.shared-filter { flex:0 0 auto; border:1px solid #cbd5e1; background:#fff; border-radius:999px; padding:.55rem .9rem; font-weight:700; color:#334155; }
.shared-filter.active { background:#2563eb; border-color:#2563eb; color:#fff; }
.shared-filter span { margin-left:.3rem; opacity:.82; }
.shared-member-stack { display:grid; gap:1rem; }
.shared-member-card { padding:1.2rem; min-width:0; }
.shared-member-head { display:flex; align-items:center; gap:.75rem; margin-bottom:1rem; }
.resident-avatar { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; background:#e8f0ff; color:#1e3a8a; font-weight:800; flex:0 0 auto; }
.shared-files-slider { display:flex; gap:1rem; padding:.15rem .05rem .85rem; scroll-snap-type:x proximity; }
.shared-file-card { flex:0 0 min(330px, 86vw); min-width:0; border:1px solid #dbe4f0; border-radius:18px; padding:1rem; background:#fff; box-shadow:0 10px 25px rgba(15,23,42,.05); scroll-snap-align:start; }
.shared-file-card h4 { font-size:1rem; margin:.8rem 0 .3rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shared-category { display:inline-flex; border-radius:999px; padding:.28rem .58rem; font-size:.72rem; font-weight:800; background:#eef2ff; color:#3730a3; }
.category-grocery { background:#ecfdf5; color:#047857; }
.category-cleaning { background:#fff7ed; color:#c2410c; }
.category-concerns { background:#fef2f2; color:#b91c1c; }
.shared-time { color:#64748b; font-size:.75rem; white-space:nowrap; }
.shared-amount { font-size:1.1rem; font-weight:800; margin:.25rem 0; }
.shared-file-name { color:#64748b; font-size:.78rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shared-empty-state { text-align:center; padding:3rem 1.25rem; }
.shared-empty-icon { font-size:2.5rem; margin-bottom:.5rem; }
.min-w-0 { min-width:0; }

/* Any existing wide dashboard table gets a visible swipe/slider area on mobile. */
@media (max-width: 768px) {
  .table-responsive, .owner-overview-table-wrap, .dashboard-table-wrap { overflow-x:auto !important; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
  .table-responsive > table, .owner-overview-table-wrap > table, .dashboard-table-wrap > table { min-width:720px; }
  .shared-member-card { padding:1rem; }
  .shared-file-card { flex-basis:88vw; }
}

/* Owner overview card sliders: prevent resident/document/key-date content being clipped. */
@media (max-width: 900px) {
  .hb-owner-resident-list,
  .hb-owner-document-list,
  .hb-key-date-list {
    display:flex !important;
    gap:.85rem;
    overflow-x:auto !important;
    overflow-y:hidden;
    max-width:100%;
    padding:.2rem .05rem .8rem;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    scrollbar-width:thin;
    scrollbar-color:#94a3b8 transparent;
  }
  .hb-owner-resident-list > *,
  .hb-owner-document-list > *,
  .hb-key-date-list > * {
    flex:0 0 min(360px, 88vw);
    min-width:min(360px, 88vw);
    scroll-snap-align:start;
  }
  .hb-owner-resident-list::-webkit-scrollbar,
  .hb-owner-document-list::-webkit-scrollbar,
  .hb-key-date-list::-webkit-scrollbar { height:8px; }
  .hb-owner-resident-list::-webkit-scrollbar-thumb,
  .hb-owner-document-list::-webkit-scrollbar-thumb,
  .hb-key-date-list::-webkit-scrollbar-thumb { background:#94a3b8; border-radius:999px; }
}

/* Record Verification Centre */
.hb-verification-chapter{margin-top:1rem}
.hb-record-centre{max-width:1180px;margin:0 auto}
.hb-record-card{transition:transform .15s ease,box-shadow .15s ease}
.hb-record-card:hover{transform:translateY(-1px)}
.hb-record-id{font-size:.88rem;padding:.28rem .48rem;border-radius:.45rem;background:#f1f5f9;color:#0f172a}
@media(max-width:767px){.hb-record-card .form-select{width:100%!important}.hb-record-card form{width:100%}.hb-record-card form .btn{width:100%}}
