:root{--p:#1e3a8a;--p2:#172554;--bg:#f4f6f8;--card:#fff;--tx:#111827;--mu:#6b7280;--bd:#e5e7eb;--ok:#16a34a;--er:#dc2626;--wa:#d97706}
*{box-sizing:border-box}html,body{margin:0}body{font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--tx)}
h1,h2,h3{margin:0}.muted{color:var(--mu)}.r{margin-left:auto;text-align:right}.full{grid-column:1/-1}
.btn{border:1px solid var(--bd);background:#fff;color:var(--tx);padding:8px 14px;border-radius:8px;font:inherit;font-weight:600;cursor:pointer}
.btn.p{background:var(--p);border-color:var(--p);color:#fff}.btn.s{background:var(--p);border-color:var(--p);color:#fff}.btn.danger{color:var(--er)}.btn.sm{padding:4px 9px;font-size:12px}.btn:disabled{opacity:.6}
input,select,textarea{width:100%;padding:8px 10px;border:1px solid #d1d5db;border-radius:8px;font:inherit;background:#fff;color:var(--tx)}
label{display:block;font-size:12px;font-weight:600;color:var(--mu);margin-bottom:3px}
.fgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px}.fg.full{grid-column:1/-1}
@media(max-width:560px){.fgrid{grid-template-columns:1fr}}
.card{background:var(--card);border:1px solid var(--bd);border-radius:12px;padding:14px}
.app{display:flex;min-height:100vh}.side{width:220px;background:#0b1b3a;color:#dbeafe;padding:14px 10px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;flex:none}
.brand{font-weight:800;font-size:18px;color:#fff;padding:4px 8px 14px}.brand small{font-weight:500;color:#93c5fd;font-size:11px;display:block}
.side nav{flex:1;overflow:auto}.side nav a{display:block;padding:9px 10px;border-radius:8px;color:#dbeafe;text-decoration:none;margin-bottom:2px;cursor:pointer}
.side nav a.on,.side nav a:hover{background:#1d3566;color:#fff}.chip-plan{font-size:12px;padding:8px;background:#1d3566;border-radius:8px}
main{flex:1;min-width:0}.top{display:flex;align-items:center;gap:10px;padding:12px 18px;background:#fff;border-bottom:1px solid var(--bd);position:sticky;top:0;z-index:5}
.top h1{font-size:18px}#menu{display:none}#view{padding:16px 18px;max-width:1200px}
.bar{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.bar h2{font-size:17px;margin-right:auto}.bar input,.bar select{width:auto}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:14px}
.stat{background:#fff;border:1px solid var(--bd);border-radius:12px;padding:12px}.stat b{display:block;font-size:22px}.stat span{font-size:12px;color:var(--mu)}
.tw{overflow:auto;background:#fff;border:1px solid var(--bd);border-radius:12px}table{border-collapse:collapse;width:100%;min-width:560px}
th,td{padding:9px 11px;text-align:left;border-bottom:1px solid var(--bd);white-space:nowrap}th{font-size:12px;color:var(--mu);background:#f9fafb}td.r,th.r{text-align:left;margin-left:0}td.act,th.act{text-align:right}tr:last-child td{border-bottom:0}
.empty{padding:26px;text-align:center;color:var(--mu);background:#fff;border:1px dashed #d1d5db;border-radius:12px}
.tag{display:inline-block;padding:2px 8px;border-radius:99px;font-size:11px;font-weight:700;background:#e5e7eb}.tag.paid,.tag.active,.tag.vacant{background:#dcfce7;color:#166534}.tag.partial,.tag.maintenance{background:#fef3c7;color:#92400e}.tag.unpaid,.tag.occupied{background:#fee2e2;color:#991b1b}.tag.exited{background:#e5e7eb;color:#374151}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:800px){.grid2{grid-template-columns:1fr}}
.gc{background:#fff;border:1px solid var(--bd);border-radius:12px;padding:12px;margin-bottom:10px}.gh{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}
.chips{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid var(--bd);border-radius:10px;padding:8px 12px;min-width:104px;text-align:left;cursor:pointer;background:#fff;font:inherit}.chip small{display:block;color:var(--mu);font-size:11px}
.chip.vacant{border-color:#86efac;background:#f0fdf4}.chip.occupied{border-color:#fca5a5;background:#fef2f2}.chip.maintenance{border-color:#fcd34d;background:#fffbeb}
.bars{display:flex;align-items:flex-end;gap:10px;height:120px;margin-top:8px}.bars div{flex:1;text-align:center;font-size:11px;color:var(--mu)}.bars i{display:block;background:var(--p);border-radius:5px 5px 0 0;min-height:2px;margin-bottom:4px}
.bar2{height:8px;background:#e5e7eb;border-radius:9px;overflow:hidden}.bar2 i{display:block;height:100%;background:var(--p)}
.sd-ov{position:fixed;inset:0;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:12px;z-index:1000}
.sd-md{background:#fff;border-radius:14px;max-width:680px;width:100%;max-height:92vh;display:flex;flex-direction:column}
.sd-mh{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--bd);font-size:16px}.sd-mh .x{border:0;background:none;font-size:24px;cursor:pointer}
.sd-mb{padding:14px 16px;overflow:auto}.sd-mf{padding:12px 16px;border-top:1px solid var(--bd);display:flex;justify-content:flex-end;gap:8px}
.ul{padding-left:18px;margin:8px 0}.plans{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);padding:10px 16px;border-radius:9px;color:#fff;background:#111827;z-index:2000;max-width:92vw}.toast.ok{background:var(--ok)}.toast.err{background:var(--er)}
.sd-print{position:fixed;inset:0;background:#fff;z-index:3000;overflow:auto;padding:20px}.sd-print .np{text-align:right;margin-bottom:10px}
.doc{max-width:720px;margin:0 auto;font-size:13px}.doc h2{margin-bottom:2px}.doc table{min-width:0}.doc .tot td{font-weight:700}
@media print{body>*:not(.sd-print){display:none!important}.sd-print{position:static;padding:0}.np{display:none}}
.login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px;background:linear-gradient(160deg,#0b1b3a,#1e3a8a)}
.login .card{max-width:420px;width:100%;padding:24px}.role{display:flex;gap:10px;margin:14px 0}.role button{flex:1;padding:14px 8px;border:2px solid var(--bd);border-radius:12px;background:#fff;font:inherit;cursor:pointer;text-align:center}.role button b{display:block;font-size:15px}.role button.on{border-color:var(--p);background:#eff6ff}
@media(max-width:820px){.side{position:fixed;left:-240px;z-index:50;transition:left .2s}.side.open{left:0}#menu{display:block}}
.wsw{display:flex;align-items:center;gap:6px;margin-left:auto}.wsw select{width:auto;max-width:260px;font-weight:600;border-color:#c7d2fe;background:#eff6ff;color:#1e3a8a}
.wsw .btn{padding:6px 9px}
@media(max-width:560px){.wsw select{max-width:42vw}.top h1{font-size:15px}}
.one td,.one th{white-space:nowrap}.one .btn{padding:5px 10px}
.one td.r{text-align:left}.one td.act{text-align:right}

/* dashboard occupancy card + stat tiles */
.stat{display:flex;flex-direction:column-reverse;gap:3px}.stat span{font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:600}
.occ{margin-bottom:12px}.occ-top{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;flex-wrap:wrap}.occ-l{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:600;color:var(--mu)}
.occ-p{font-size:30px;line-height:1.1}.occ-s{color:var(--mu);font-size:13px;padding-bottom:3px}
.occbar{display:flex;height:10px;background:#e5e7eb;border-radius:99px;overflow:hidden;margin:10px 0 12px}.occbar i{display:block;height:100%}.occbar .o{background:var(--p)}.occbar .m{background:#f59e0b}
.occk{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.occk span{font-size:12px;color:var(--mu);display:flex;flex-direction:column;gap:2px}.occk b{font-size:18px;color:var(--tx)}
.occk .d{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px}.d.o{background:var(--p)}.d.v{background:#d1d5db}.d.m{background:#f59e0b}.d.t{background:#0b1b3a}
#bnav{display:none}
/* ===== mobile ===== */
@media(max-width:820px){
 main{padding-bottom:76px}
 #bnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:40;background:#fff;border-top:1px solid var(--bd);padding:4px 2px calc(4px + env(safe-area-inset-bottom))}
 #bnav a{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:1px;padding:5px 0;border-radius:10px;color:var(--mu);font-size:10px;font-weight:600;cursor:pointer}
 #bnav a i{font-style:normal;font-size:19px;line-height:1.1}#bnav a.on{color:var(--p);background:#eff6ff}
 .side.open{box-shadow:0 0 0 100vmax rgba(15,23,42,.45)}
}
@media(max-width:640px){
 #view{padding:12px}.top{padding:10px 12px;gap:8px}
 .stats{grid-template-columns:repeat(2,1fr);gap:8px}.stat{padding:10px}.stat b{font-size:18px}
 .occ-p{font-size:26px}.occk{gap:4px}.occk span{font-size:11px}.occk b{font-size:16px}
 .bar{gap:8px}.bar h2{flex-basis:100%}.bar input,.bar select{flex:1 1 130px;width:auto}
 input,select,textarea{font-size:16px}.btn{min-height:40px}.btn.sm{min-height:34px}
 .chip{min-width:calc(50% - 4px);flex:1 1 calc(50% - 4px)}
 .sd-ov{align-items:flex-end;padding:0}.sd-md{max-width:none;border-radius:16px 16px 0 0;max-height:94vh}.sd-mf{padding-bottom:calc(12px + env(safe-area-inset-bottom))}.sd-mf .btn{flex:1}
 .one td,.one th{white-space:nowrap}
}

@media(max-width:640px){
 .app .tw,.sd-md .tw{background:#fff;border:1px solid var(--bd);border-radius:12px;overflow-x:auto}
 .app .tw table,.sd-md .tw table{display:table;width:100%;min-width:0}.app .tw thead,.sd-md .tw thead{display:table-header-group}.app .tw tbody,.sd-md .tw tbody{display:table-row-group}
 .app .tw tr,.sd-md .tw tr{display:table-row;background:none;border:0;border-radius:0;padding:0;margin:0}
 .app .tw th,.sd-md .tw th{display:table-cell;padding:8px 8px;font-size:11px;text-align:left}
 .app .tw td,.sd-md .tw td{display:table-cell;border:0;border-top:1px solid #eef0f3;padding:9px 8px;font-size:13px;text-align:left!important;white-space:nowrap;font-weight:400}
 .app .tw td:first-child,.sd-md .tw td:first-child{font-weight:600}
 .app .tw td::before,.sd-md .tw td::before{display:none!important}
 .app .tw td.r,.sd-md .tw td.r{text-align:left!important}.app .tw td.act,.sd-md .tw td.act{text-align:right!important}
 .app .tw th.r,.sd-md .tw th.r{text-align:left}.app .tw th.act,.sd-md .tw th.act{text-align:right}
}
@media(max-width:640px){.app .tw td,.sd-md .tw td{padding:9px 6px;font-size:12px}.app .tw th,.sd-md .tw th{padding:8px 6px}.app .tw .btn,.sd-md .tw .btn{min-height:30px;padding:4px 8px;font-size:12px}}
.fg .chk{display:flex;align-items:center;gap:8px;font-weight:600;color:var(--tx);cursor:pointer;padding:6px 0}.fg .chk input{width:18px;height:18px;margin:0;accent-color:var(--p)}
.plan-row{display:flex;align-items:stretch;gap:8px;margin-top:auto}.plan-row .chip-plan{flex:1;min-width:0}
.so{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:#1d3566;color:#fff;border:0;border-radius:8px;padding:6px 10px;font-size:18px;line-height:1;cursor:pointer}.so span{font-size:10px;font-weight:600}.so:hover{background:#7f1d1d}

@media(min-width:641px){
 .dep table{table-layout:fixed;width:100%;min-width:0}.dep th,.dep td{padding:9px 8px;overflow:hidden;text-overflow:clip}
 .dep td:nth-child(2),.dep td:nth-child(3){white-space:normal}
 .dep table th:nth-child(1){width:10%}.dep table th:nth-child(2){width:20%}.dep table th:nth-child(3){width:16%}.dep table th:nth-child(4),.dep table th:nth-child(5),.dep table th:nth-child(6){width:8%}
 .dep-r table th:nth-child(7),.dep-r table th:nth-child(8),.dep-r table th:nth-child(9){width:8%}
 .dep td.act{overflow:visible;white-space:nowrap}
}

/* legal pages */
body.legal{background:#fff}.lg{max-width:780px;margin:0 auto;padding:20px 18px 40px;line-height:1.65;color:#1f2937}.lg h1{font-size:28px;margin:6px 0}.lg h2{font-size:18px;margin:26px 0 6px;color:var(--p)}.lg ul,.lg ol{padding-left:22px}.lg li{margin:4px 0}.lg table{width:100%;min-width:0;border-collapse:collapse;font-size:14px;margin:8px 0;display:block;overflow-x:auto}.lg th,.lg td{border:1px solid #e5e7eb;padding:8px;text-align:left;vertical-align:top;white-space:normal}.lg th{background:#f3f4f6}
.lnk{background:none;border:0;padding:0;color:var(--p);text-decoration:underline;cursor:pointer;font:inherit}
/* help assistant */
.hb-fab{position:fixed;right:16px;bottom:18px;z-index:60;width:52px;height:52px;border-radius:50%;border:0;background:var(--p);color:#fff;font-size:24px;box-shadow:0 6px 18px rgba(15,23,42,.35);cursor:pointer;display:flex;align-items:center;justify-content:center}
.hb-fab:hover{background:#1d4ed8}
.hp{position:fixed;right:16px;bottom:80px;z-index:61;width:370px;max-width:calc(100vw - 24px);height:520px;max-height:calc(100vh - 110px);background:#fff;border:1px solid var(--bd);border-radius:16px;box-shadow:0 12px 40px rgba(15,23,42,.3);display:none;flex-direction:column;overflow:hidden}
.hp.on{display:flex}
.hh{background:var(--p);color:#fff;padding:10px 14px;display:flex;align-items:center;justify-content:space-between}.hh small{display:block;font-size:11px;opacity:.85;font-weight:400}.hh button{background:none;border:0;color:#fff;font-size:18px;cursor:pointer;padding:4px 8px}
.hmsgs{flex:1;overflow-y:auto;padding:12px;background:#f8fafc}
.hm{display:flex;margin-bottom:10px}.hm.me{justify-content:flex-end}
.hb{max-width:88%;padding:9px 12px;border-radius:14px;font-size:13.5px;line-height:1.5;background:#fff;border:1px solid var(--bd);color:var(--tx)}.hm.me .hb{background:var(--p);color:#fff;border-color:var(--p)}
.hb a{color:var(--p);text-decoration:underline}.hm.me .hb a{color:#fff}
.hchips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.hchip{border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;border-radius:99px;padding:5px 10px;font-size:12px;cursor:pointer}
.hacts{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.hgo{display:inline-block;background:var(--p);color:#fff!important;text-decoration:none!important;border:0;border-radius:8px;padding:6px 10px;font-size:12px;font-weight:600;cursor:pointer}
.hsm{font-size:11px;color:var(--mu);margin-top:8px}
.hf{display:flex;gap:8px;padding:10px;border-top:1px solid var(--bd);background:#fff}.hf input{flex:1;min-width:0}
@media(max-width:820px){.hb-fab{bottom:78px;right:12px;width:48px;height:48px}.hp{right:8px;left:8px;width:auto;max-width:none;bottom:136px;height:calc(100vh - 220px)}}
@media print{#hw{display:none}}
tr.mr{display:none}
.tw .more{text-align:center;padding:10px 0 2px}
.tw .more .btn{width:100%;max-width:320px;justify-content:center}
/* icons + home tiles */
svg.ic{width:20px;height:20px;flex:none}
.side nav a{display:flex;align-items:center;gap:10px}
#bnav a svg.ic{width:22px;height:22px}
.hero{background:linear-gradient(135deg,#172554,#1e3a8a 60%,#3b4fb8);color:#fff;border-radius:20px;padding:18px 20px;margin-bottom:16px}
.hero small{color:#c7d2fe;font-size:13px;display:block}.hero h1{margin:4px 0 2px;font-size:26px;line-height:1.15}
.hero-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.hero-out{width:42px;height:42px;border-radius:50%;border:0;background:rgba(255,255,255,.14);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.hero-st{display:flex;gap:10px;margin-top:14px;align-items:stretch;flex-wrap:wrap}
.hero-pill{flex:1;min-width:160px;background:rgba(255,255,255,.14);border-radius:12px;padding:12px 14px;font-weight:600}
.hero-ok{display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.14);border-radius:12px;padding:12px 16px;font-weight:700}
.hero-ok i{width:9px;height:9px;border-radius:50%;background:#4ade80}.hero-ok.warn i{background:#fb923c}
.sec-l{font-size:12px;letter-spacing:.06em;text-transform:uppercase;font-weight:700;color:var(--mu);margin:4px 2px 10px}
.tiles{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:16px}
.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:118px;padding:14px 8px;border-radius:16px;border:1px solid var(--bd);background:#fff;color:var(--tx);font:inherit;font-weight:700;font-size:14px;text-align:center;cursor:pointer;line-height:1.2}
.tile svg.ic{width:34px;height:34px;color:var(--tc,#2563eb);stroke-width:1.7}
.tile:hover{box-shadow:0 4px 14px rgba(30,58,138,.12);transform:translateY(-1px)}
.tile.prim{background:#1e3a8a;border-color:#1e3a8a;color:#fff;font-size:16px}.tile.prim svg.ic{color:#fff}
@media(max-width:900px){.tiles{grid-template-columns:repeat(3,1fr);gap:10px}.tile{min-height:104px;font-size:13px}.tile.prim{font-size:14px}.hero h1{font-size:22px}}
@media(max-width:380px){.tile{font-size:12px}}
/* brand logo */
.brand{display:flex;align-items:center;gap:10px}
.brand .bl{width:38px;height:38px;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:center;flex:none}
.brand .bl img{width:28px;height:28px;object-fit:contain}
.brand .bt{line-height:1.15}

/* voice commands */
.vfab{bottom:82px;background:#0d9488}.vfab:hover{background:#0f766e}.vfab.on{background:#dc2626}
.vp{bottom:146px;height:auto;max-height:calc(100vh - 170px)}
.vbody{padding:14px 16px 18px;text-align:center;overflow-y:auto}
.vlang{display:flex;justify-content:center;gap:8px;margin-bottom:14px}.vlang button{border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;border-radius:99px;padding:6px 14px;font-size:13px;cursor:pointer;font-weight:600}.vlang button.on{background:#1e3a8a;color:#fff;border-color:#1e3a8a}
.vmic{width:72px;height:72px;border-radius:50%;border:0;background:#0d9488;color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 6px 18px rgba(13,148,136,.35)}.vmic svg{width:32px;height:32px}.vmic.on{background:#dc2626;animation:vpulse 1.2s infinite}
@keyframes vpulse{0%{box-shadow:0 0 0 0 rgba(220,38,38,.45)}70%{box-shadow:0 0 0 16px rgba(220,38,38,0)}100%{box-shadow:0 0 0 0 rgba(220,38,38,0)}}
.vstat{margin-top:12px;font-weight:600;color:var(--tx)}.vstat.on{color:#dc2626}
.vheard{margin-top:6px;min-height:20px;color:var(--mu);font-size:14px}.vheard small{display:block;font-size:11px}
.vex{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:10px}.vex span{background:#f1f5f9;border-radius:99px;padding:5px 11px;font-size:12.5px;color:#334155}
.vact{display:flex;gap:8px;justify-content:center;margin-top:12px;flex-wrap:wrap}.vgh{background:#fff!important;color:var(--p)!important;border:1px solid var(--p)!important}
@media(max-width:820px){.vfab{bottom:134px}.vp{bottom:190px;left:8px;right:8px;width:auto;max-width:none}}
/* refer & earn */
.refcode{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:32px;font-weight:800;letter-spacing:.14em;color:var(--p);text-align:center;margin:6px 0 12px}
.reflink{width:100%;text-align:center;background:#f8fafc}
.refbtns{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.refbtns .btn{flex:1;min-width:140px;justify-content:center}.refwa{background:#16a34a!important;border-color:#16a34a!important}
.refenter{display:flex;gap:10px}.refenter input{flex:1;min-width:0;text-transform:uppercase}
.xsel{max-width:120px}

tr.fh{display:none}.tsb{padding:8px 10px;border-bottom:1px solid var(--bd)}.tsb .tsrch{width:100%;max-width:360px}.tw .tnone{padding:14px;text-align:center}

.fold-t{border:0;background:#eef2ff;color:var(--p,#1e3a8a);width:28px;height:28px;border-radius:8px;font-size:15px;line-height:1;cursor:pointer;margin-right:8px;flex:none}
.fold-t:hover{background:#dde5ff}.fold-c{display:none!important}.bar.fold-h,.card>h3.fold-h{opacity:.9}
.card>h3 .fold-t{margin-right:8px}
