/* HouseBoard V6 — structural product redesign. Keeps backend logic; replaces visual system. */
:root{
  --hb-bg:#f3f5f2;--hb-surface:#ffffff;--hb-surface-2:#eef2ee;--hb-ink:#17211d;--hb-muted:#6d7973;
  --hb-line:#dce3de;--hb-brand:#234f43;--hb-brand-2:#183b32;--hb-brand-soft:#e4eee9;
  --hb-warn:#a66a20;--hb-danger:#b24545;--hb-success:#2f7155;--hb-radius:18px;--hb-shadow:0 8px 28px rgba(25,48,40,.065);
}
[data-theme="dark"]{--hb-bg:#101713;--hb-surface:#17201b;--hb-surface-2:#1d2922;--hb-ink:#edf5f0;--hb-muted:#9eaea5;--hb-line:#2d3a33;--hb-brand:#79a995;--hb-brand-2:#9bc4b2;--hb-brand-soft:#20352c;--hb-shadow:0 12px 36px rgba(0,0,0,.28)}
html,body{background:var(--hb-bg)!important;color:var(--hb-ink)!important}
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;background-image:none!important}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background:linear-gradient(135deg,rgba(35,79,67,.035),transparent 33%);z-index:-1}
/* App shell */
.hb-navbar{height:68px!important;min-height:68px!important;border:0!important;border-bottom:1px solid var(--hb-line)!important;background:color-mix(in srgb,var(--hb-surface) 94%,transparent)!important;box-shadow:none!important;padding:0!important}
.hb-navbar .container-fluid{max-width:none!important;padding:0 26px!important}
.hb-logo{width:38px!important;height:38px!important;border-radius:12px!important;box-shadow:none!important;animation:none!important;overflow:hidden}
.hb-logo svg{width:38px!important;height:38px!important}.hb-wordmark{font-size:1.3rem!important;color:var(--hb-ink)!important}.hb-wordmark span{color:var(--hb-brand)!important}
.brand-chip{border:1px solid var(--hb-line)!important;background:var(--hb-surface-2)!important;color:var(--hb-ink)!important;border-radius:999px!important;padding:.38rem .65rem!important}
.theme-toggle,.hb-navbar .btn{border-radius:12px!important;box-shadow:none!important}
.hb-navbar .btn-outline-warning{border-color:var(--hb-line)!important;color:var(--hb-ink)!important;background:var(--hb-surface)!important}
.hb-navbar .btn-outline-primary{border-color:var(--hb-line)!important;color:var(--hb-ink)!important;background:var(--hb-surface)!important}
.container-fluid.px-4.py-4{max-width:none!important;padding:22px 26px 40px!important}
.container-fluid.px-4.py-4>.row{--bs-gutter-x:22px!important}
.desktop-side{width:248px!important;flex:0 0 248px!important}.col-lg-10{width:calc(100% - 248px)!important;flex:0 0 calc(100% - 248px)!important;min-width:0}
.sidebar{position:sticky!important;top:90px!important;height:calc(100vh - 112px);overflow:auto;padding:10px!important;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important}
.section-label{margin:18px 12px 7px!important;font-size:.67rem!important;letter-spacing:.13em!important;color:var(--hb-muted)!important}
.sidebar-link{min-height:42px;padding:10px 12px!important;margin:2px 0!important;border-radius:12px!important;color:var(--hb-muted)!important;font-weight:650!important;gap:10px!important;transform:none!important}
.sidebar-link:hover{background:var(--hb-surface-2)!important;color:var(--hb-ink)!important}.sidebar-link.active,.sidebar-link[aria-current="page"]{background:var(--hb-brand-soft)!important;color:var(--hb-brand)!important;font-weight:800!important}
/* Typography + page rhythm */
h1,.page-title{font-size:clamp(1.8rem,3vw,2.45rem)!important;line-height:1.08!important;letter-spacing:-.045em!important;margin:0 0 20px!important;color:var(--hb-ink)!important}
h2{letter-spacing:-.035em!important}h3,h4,h5{letter-spacing:-.025em!important}.soft,.text-muted{color:var(--hb-muted)!important}
main,.col-lg-10{min-width:0}.col-lg-10>p.soft:first-of-type{display:none}
/* Surfaces */
.card{border:1px solid var(--hb-line)!important;background:var(--hb-surface)!important;color:var(--hb-ink)!important;border-radius:var(--hb-radius)!important;box-shadow:none!important;transition:border-color .16s ease,transform .16s ease,box-shadow .16s ease}
.card:hover{box-shadow:var(--hb-shadow)!important;border-color:color-mix(in srgb,var(--hb-brand) 25%,var(--hb-line))!important}
.card.p-4{padding:22px!important}.card.p-3{padding:18px!important}.bg-light{background:var(--hb-surface-2)!important}
.alert{border-radius:15px!important;border:1px solid var(--hb-line)!important;box-shadow:none!important}
/* Buttons */
.btn{border-radius:11px!important;font-weight:750!important;min-height:40px;padding:.55rem .85rem!important;box-shadow:none!important}
.btn-primary{background:var(--hb-brand)!important;border-color:var(--hb-brand)!important;color:#fff!important}.btn-primary:hover{background:var(--hb-brand-2)!important;border-color:var(--hb-brand-2)!important;transform:translateY(-1px)}
.btn-outline-primary{color:var(--hb-brand)!important;border-color:color-mix(in srgb,var(--hb-brand) 36%,var(--hb-line))!important;background:transparent!important}.btn-outline-primary:hover{background:var(--hb-brand-soft)!important;color:var(--hb-brand)!important;border-color:var(--hb-brand)!important}
.btn-outline-secondary{border-color:var(--hb-line)!important;color:var(--hb-muted)!important}.btn-danger,.btn-outline-danger:hover{background:var(--hb-danger)!important;border-color:var(--hb-danger)!important}
/* Forms */
.form-control,.form-select{border:1px solid var(--hb-line)!important;border-radius:11px!important;background:var(--hb-surface)!important;color:var(--hb-ink)!important;min-height:44px!important;box-shadow:none!important}.form-control:focus,.form-select:focus{border-color:var(--hb-brand)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--hb-brand) 14%,transparent)!important}.form-label{font-size:.82rem!important;font-weight:750!important;color:var(--hb-ink)!important}
.form-section{border:1px solid var(--hb-line)!important;border-radius:16px!important;background:var(--hb-surface-2)!important;padding:18px!important;margin-bottom:14px!important}.section-chip{background:var(--hb-brand)!important;color:#fff!important;box-shadow:none!important}
/* Tables become calm data workspaces */
.table-responsive{border:1px solid var(--hb-line)!important;border-radius:15px!important;background:var(--hb-surface)!important}.table{margin:0!important}.table thead th{background:var(--hb-surface-2)!important;border-bottom:1px solid var(--hb-line)!important;color:var(--hb-muted)!important;padding:12px 14px!important;font-size:.68rem!important}.table td{padding:14px!important;border-color:var(--hb-line)!important}.table tbody tr:hover{background:color-mix(in srgb,var(--hb-brand-soft) 45%,transparent)!important}
.badge{border-radius:999px!important;padding:.42em .68em!important}.text-bg-warning,.bg-warning{background:#f1e3cf!important;color:#76501d!important}.text-bg-success,.bg-success{background:#dcece3!important;color:#245a43!important}.text-bg-danger,.bg-danger{background:#f2dede!important;color:#873838!important}
/* Page-specific structural changes */
body[data-hb-endpoint="bills"] .col-lg-5{width:42%;position:sticky;top:90px;align-self:flex-start;max-height:calc(100vh - 112px);overflow:auto}body[data-hb-endpoint="bills"] .col-lg-7{width:58%}
body[data-hb-endpoint="members"] .row.g-4>.col-lg-5{width:38%}body[data-hb-endpoint="members"] .row.g-4>.col-lg-7{width:62%}
body[data-hb-endpoint="messenger"] .messenger-chat-card{height:calc(100vh - 115px)!important}.messenger-thread{max-height:none!important;min-height:0!important;flex:1}.messenger-chat-card{display:flex;flex-direction:column}
body[data-hb-endpoint="house_calendar"] .calendar-hero,body[data-hb-endpoint="house_calendar"] .card{box-shadow:none!important}
/* Modal / accordion / details */
.modal-content{border:1px solid var(--hb-line)!important;border-radius:20px!important;background:var(--hb-surface)!important;color:var(--hb-ink)!important;box-shadow:0 24px 80px rgba(18,38,31,.2)!important}.accordion-item{border:1px solid var(--hb-line)!important;background:var(--hb-surface)!important;border-radius:14px!important;overflow:hidden;margin-bottom:10px}.accordion-button{background:var(--hb-surface)!important;color:var(--hb-ink)!important;font-weight:800!important;box-shadow:none!important}.accordion-button:not(.collapsed){background:var(--hb-brand-soft)!important;color:var(--hb-brand)!important}
/* Login: completely new spatial treatment */
body[data-hb-endpoint="login"] .container-fluid.px-4.py-4{padding:0!important}body[data-hb-endpoint="login"]>.container-fluid>.row{margin:0!important}body[data-hb-endpoint="login"] .col-12{padding:0!important}
body[data-hb-endpoint="login"]{background:linear-gradient(120deg,#e7ede8 0 52%,#f8faf8 52%)!important}body[data-hb-endpoint="login"] .hb-login-shell{min-height:calc(100vh - 68px);max-width:1320px!important;margin:0 auto!important;padding:clamp(30px,5vw,72px)!important;grid-template-columns:1.15fr .85fr!important}
body[data-hb-endpoint="login"] .hb-login-story{padding:0 7vw 0 0!important}body[data-hb-endpoint="login"] .hb-login-kicker{background:var(--hb-brand)!important;border:0!important;box-shadow:none!important}
body[data-hb-endpoint="login"] .hb-login-story h1 span{background:none!important;color:var(--hb-brand)!important}body[data-hb-endpoint="login"] .hb-login-feature{background:rgba(255,255,255,.68)!important;color:var(--hb-ink)!important;border:1px solid rgba(35,79,67,.12)!important;box-shadow:none!important}
body[data-hb-endpoint="login"] .hb-login-card{border:0!important;border-radius:24px!important;box-shadow:0 28px 70px rgba(31,58,48,.14)!important;padding:34px!important}body[data-hb-endpoint="login"] .hb-login-panel:before{display:none!important}
/* Mobile */
@media(max-width:991.98px){.desktop-side{display:none!important}.col-lg-10{width:100%!important;flex:0 0 100%!important}.container-fluid.px-4.py-4{padding:14px 14px 88px!important}.hb-navbar .container-fluid{padding:0 14px!important}.mobile-only{display:block!important}.mobile-only>.card{border-radius:14px!important;background:var(--hb-surface)!important}.mobile-scroll{flex-wrap:nowrap!important;overflow:auto!important}.mobile-scroll .btn{white-space:nowrap!important}body[data-hb-endpoint="bills"] .col-lg-5,body[data-hb-endpoint="bills"] .col-lg-7,body[data-hb-endpoint="members"] .row.g-4>.col-lg-5,body[data-hb-endpoint="members"] .row.g-4>.col-lg-7{width:100%!important;position:static!important;max-height:none!important;overflow:visible!important}body[data-hb-endpoint="login"]{background:var(--hb-bg)!important}body[data-hb-endpoint="login"] .hb-login-shell{padding:18px!important;display:block!important;min-height:auto}body[data-hb-endpoint="login"] .hb-login-card{padding:24px!important}}
@media(max-width:575px){h1,.page-title{font-size:1.75rem!important;margin-bottom:14px!important}.card.p-4,.card.p-3{padding:16px!important}.table-responsive{border:0!important;border-radius:0!important}.table thead{display:none}.table,.table tbody,.table tr,.table td{display:block;width:100%}.table tr{border:1px solid var(--hb-line);border-radius:14px;margin-bottom:10px;padding:9px;background:var(--hb-surface)}.table td{border:0!important;padding:6px 8px!important}.table td:empty{display:none}.hb-navbar{height:60px!important;min-height:60px!important}.hb-wordmark{font-size:1.15rem!important}.hb-logo,.hb-logo svg{width:34px!important;height:34px!important}}
