:root{--blue:#0f47f1;--blue2:#0e41d9;--ink:#031c69;--muted:#667085;--line:#dee4f0;--pale:#e5eefd;--bg:#f9fbff;--yellow:#f2e002;--shadow:0 8px 24px #081c6910;--sidebar-width:246px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;}body{background:var(--bg);color:var(--ink);font-family:Inter,"Segoe UI",Lato,Arial,sans-serif;font-size:15px;line-height:1.45}button,input,select{font:inherit;color:inherit}button{cursor:pointer;border:0;background:none}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #89a8ff;outline-offset:2px}h1,h2,h3,h4,p{margin:0}h2{font-size:20px;line-height:1.3}h3{font-size:16px}small{font-size:12px}hr{border:0;border-top:1px solid var(--line);margin:17px 0}.shell{min-height:100vh;display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr)}.sidebar{background:white;border-right:1px solid var(--line);padding:24px 16px 16px;display:flex;flex-direction:column;position:sticky;top:0;max-height:100vh;min-height:100vh;z-index:40}.brand{display:flex;align-items:center;gap:10px;padding:0 6px}.brand-mark{background:var(--blue);color:white;border-radius:13px;width:40px;height:40px;display:grid;place-items:center;font-weight:900;font-size:23px;letter-spacing:-3px;padding-right:3px;box-shadow:0 6px 16px #0f47f13a}.brand strong{font-size:20px;display:block;letter-spacing:.7px;line-height:1.1}.brand small{display:block;font-size:11px;letter-spacing:3px;color:var(--muted);font-weight:700}.sidebar-label{font-size:11px;text-transform:uppercase;letter-spacing:1.7px;color:#9ca8bd;margin:40px 10px 14px;font-weight:700}.nav{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:12px;text-align:left;width:100%;padding:12px 11px;border-radius:11px;font-size:15px;min-height:45px;color:#41516e}.nav-item:hover{background:#f1f6ff}.nav-item.active{color:var(--blue);font-weight:750;background:var(--pale)}.nav-icon{display:inline-grid;place-items:center;font-size:21px;line-height:1;width:24px;height:24px;flex-shrink:0;font-family:"Segoe UI Symbol","Segoe UI",sans-serif}.nav-chevron{margin-left:auto;font-size:19px;color:#b3bed1}.sidebar-bottom{margin-top:auto;border-radius:16px;background:#071e63;color:#fff;padding:16px;display:grid;gap:9px;overflow:hidden}.sidebar-bottom strong{font-size:17px}.sidebar-bottom p{font-size:12px;color:#d1dcff;line-height:1.5}.support-art{height:74px;display:flex;justify-content:center;align-items:flex-end;gap:8px;border-radius:12px;background:linear-gradient(135deg,#558af5,#b9d0ff)}.support-art span{background:#0f47f1;color:#fff;padding:15px 6px 5px;border-radius:7px 7px 0 0;font-size:23px}.support-art span:nth-child(2){height:63px;background:#dae6ff;color:#0e41d9}.support-art span:nth-child(3){height:36px;background:#031c69}.workspace{min-width:0;display:flex;flex-direction:column;min-height:100vh}.topbar{height:79px;background:#fff;border-bottom:1px solid var(--line);padding:0 26px;display:flex;align-items:center;gap:14px;position:sticky;top:0;z-index:20}.top-title{margin-right:auto;min-width:0}.top-title h1{font-size:22px;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-title p{font-size:11px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-actions{display:flex;align-items:center;gap:12px}.demo-pill{font-size:11px;font-weight:750;border:1px solid #f5e298;background:#fffae3;border-radius:8px;padding:5px 9px;color:#80640c;letter-spacing:1px}.language-switch{display:flex;padding:3px;background:#f4f7ff;border:1px solid var(--line);border-radius:11px}.lang{border-radius:7px;padding:6px 8px;font-size:12px;font-weight:700;min-width:34px;color:var(--muted)}.lang.active{background:var(--blue);color:white}.profile-button{display:flex;gap:9px;align-items:center;border:1px solid var(--line);padding:9px 11px;border-radius:10px;background:#fff;font-size:13px;font-weight:700}.profile-button:hover{border-color:#b1c4ee;background:#f6f8ff}.profile-button .nav-icon{font-size:19px;width:17px}.mobile-toggle{display:none;font-size:23px;width:35px}.content{padding:22px 24px 14px;width:100%;max-width:1720px;margin:0 auto;flex:1;min-width:0}.page-stack{display:grid;gap:16px}.card{background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow);min-width:0}.btn{background:var(--blue);color:#fff;border-radius:10px;padding:10px 14px;font-size:13px;font-weight:750;min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap}.btn:hover:not(:disabled){background:var(--blue2)}.btn.outline{background:#fff;color:var(--blue);border:1px solid #c6d6fb}.btn.outline:hover{background:var(--pale)}.btn.ghost{background:#eaf6f0;color:#0b8a60}.btn.ghost:hover{background:#dcf1e7}.btn.wide{width:100%}.sidebar-button{background:white;color:#0d3cbd;padding:9px;font-size:12px}.sidebar-button:hover{background:#e5eefd!important}.hero{min-height:190px;display:grid;grid-template-columns:1.55fr 1fr;overflow:hidden;border:0;background:linear-gradient(110deg,#fff 55%,#e5eefd)}.hero>div:first-child{padding:30px 29px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:10px}.eyebrow{color:var(--blue);font-size:12px;font-weight:750;letter-spacing:.4px}.hero h2{font-size:29px;letter-spacing:-.6px}.hero p{color:#65718a;font-size:14px}.hero-actions{display:flex;gap:10px;margin-top:9px;flex-wrap:wrap}.hero-art{min-height:188px;position:relative;background:linear-gradient(120deg,#f2f6ff 0%,#bdd2fe 100%);overflow:hidden}.tower{position:absolute;bottom:0;background:#0f47f1;border-radius:9px 9px 0 0;display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:17px 12px}.tower i{background:#aaccff;border-radius:4px;min-width:23px;min-height:20px}.tower.one{height:142px;width:94px;left:15%;background:#5d8ce9}.tower.two{height:189px;width:125px;left:37%;background:#193c9c;gap:12px}.tower.three{height:119px;width:109px;left:68%;background:#3674ef}.ground{position:absolute;bottom:0;height:8px;background:#031c69;width:100%}.kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px}.kpi-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.kpi{min-height:116px;padding:17px;display:flex;flex-direction:column;gap:9px;position:relative;overflow:hidden}.kpi:before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:var(--blue)}.kpi.pale{background:#ecf3ff}.kpi.yellow{background:#fffbd8}.kpi.yellow:before{background:#e0d000}.kpi-label{font-size:13px;color:#596985}.kpi-val{font-size:25px;font-weight:800;white-space:nowrap;letter-spacing:-.7px}.kpi-sub{font-size:11px;color:#6d7792;margin-top:auto}.two-cards{display:grid;grid-template-columns:1.05fr 1fr;gap:14px;align-items:start}.summary-card,.table-card{padding:19px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:13px;flex-wrap:wrap}.section-head p{font-size:12px;color:var(--muted);margin-top:4px}.section-head .btn{min-height:34px}.summary-amount{font-size:34px;font-weight:800;letter-spacing:-1px;margin-top:24px}.summary-amount small{font-weight:500;font-size:13px;color:var(--muted);margin-left:10px;letter-spacing:0}.meter{width:100%;height:9px;background:#e6ecfa;border-radius:10px;overflow:hidden;margin:21px 0 10px}.meter span{display:block;background:var(--blue);height:100%;border-radius:10px}.summary-stats{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);gap:10px}.device-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0f8;padding:15px 2px}.device-row:last-child{border:0;padding-bottom:0}.device-row>div{display:flex;align-items:center;gap:10px;min-width:0}.device-row strong{font-size:13px}.device-row small{color:var(--muted)}.device-icon{background:var(--pale);border-radius:10px;display:grid;place-items:center;width:35px;height:35px;color:var(--blue);font-size:23px}.tag{font-size:11px;font-weight:700;display:inline-flex;align-items:center;gap:4px;white-space:nowrap;padding:5px 8px;border-radius:8px;line-height:1.2}.tag.green{color:#16835b;background:#e5f6ed}.tag.amber{color:#a97604;background:#fff1c9}.tag.muted{color:#687991;background:#eff2f8}.table-scroller{width:100%;overflow-x:auto;min-width:0}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}thead{background:#f7f9ff}th{font-size:11px;color:#78849b;text-transform:uppercase;letter-spacing:.35px;font-weight:750;white-space:nowrap;padding:13px 12px}td{padding:14px 12px;border-bottom:1px solid #eff2f8;vertical-align:middle}tbody tr:last-child td{border-bottom:0}tbody tr.clickable{cursor:pointer}tbody tr.clickable:hover,tbody tr.row-selected{background:#f2f6ff}.text-action{color:var(--blue);font-weight:700;white-space:nowrap}.empty{color:var(--muted);text-align:center;padding:42px 16px}.top-space{padding:5px 1px}.button-group{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.building-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(195px,1fr));gap:12px}.building-card{text-align:left;padding:18px;display:flex;gap:15px;align-items:center}.building-card:hover,.building-card.selected{border-color:var(--blue);background:#f2f6ff}.building-icon{font-size:26px;background:var(--pale);border-radius:12px;width:48px;height:48px;display:grid;place-items:center;flex-shrink:0}.building-card span:last-child{display:grid;gap:3px;min-width:0}.building-card strong{font-size:15px}.building-card small{color:var(--muted)}.list-and-detail{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(310px,.9fr);overflow:hidden;box-shadow:var(--shadow)}.list-part{padding:18px;min-width:0}.detail-panel{border:0;border-left:1px solid var(--line);border-radius:0;padding:20px;box-shadow:none}.detail-head{display:flex;justify-content:space-between;align-items:start;gap:10px;flex-wrap:wrap}.detail-head h2{font-size:29px;margin-top:2px}.detail-head h2 small{font-weight:500;color:var(--muted);font-size:14px}.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:18px 0}.detail-grid>div{display:flex;flex-direction:column;gap:5px;background:#f5f8ff;border-radius:11px;padding:12px}.detail-grid small,.info-line span{color:var(--muted)}.detail-grid strong{font-size:19px}.info-line{display:flex;justify-content:space-between;gap:10px;font-size:13px;padding:9px 0;border-bottom:1px solid #eff2f8}.info-line strong{text-align:right;overflow-wrap:anywhere}.panel-group{margin-top:19px}.panel-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.panel-title h3{font-size:14px}.tiny-btn{background:#edf3ff;border:1px solid #cddcfb;color:var(--blue);border-radius:8px;min-width:27px;min-height:27px;padding:4px 7px;font-size:13px;font-weight:700}.tiny-btn:hover{background:#dce8ff}.mini-list{display:grid;gap:5px}.mini-row{display:flex;align-items:center;gap:8px;padding:7px 4px;font-size:12px}.mini-row span:nth-child(2){flex:1}.mini-dot{background:#edf3ff;border-radius:50%;width:26px;height:26px;display:grid;place-items:center;color:var(--blue);font-size:14px}.detail-actions{display:grid;gap:9px;margin-top:23px}.filters{display:flex;gap:8px;align-items:center;margin:16px 0 13px;flex-wrap:wrap}.filters select,.filters input,.resident-select-label select{border:1px solid var(--line);border-radius:9px;padding:9px 11px;outline-color:#9bb8ff;background:#fff;color:#415170;font-size:12px;max-width:210px;min-height:39px}.filters .input-wrap{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 10px;min-height:39px;flex:1;min-width:150px;color:var(--blue)}.filters .input-wrap input{border:0;padding:6px 0;width:100%;min-width:0;outline:0}.access-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:13px}.tab-bar{display:flex;gap:4px;background:#edf2fe;border-radius:12px;padding:5px;width:max-content;max-width:100%;overflow-x:auto}.tab{padding:11px 15px;border-radius:9px;color:#62708f;font-size:13px;white-space:nowrap;font-weight:700}.tab.selected{background:#fff;color:var(--blue);box-shadow:0 2px 8px #081c6914}.access-card{padding:20px}.access-card-top{display:flex;align-items:center;justify-content:space-between}.access-symbol{font-size:25px;color:var(--blue);display:grid;place-items:center;background:var(--pale);width:45px;height:45px;border-radius:10px}.access-card h3{font-size:18px;margin:17px 0 6px}.access-card p{color:var(--muted);font-size:12px}.access-card small{color:var(--blue);margin-top:12px;display:block}.placeholder-note{color:var(--muted);font-size:11px;background:#f6f8fc;padding:11px;border-radius:9px;margin-top:16px;line-height:1.6}.empty-card{grid-column:1/-1;text-align:center;padding:45px;color:var(--muted)}.giant-icon{font-size:52px;color:var(--blue)}.audit-row{padding:14px 0;border-bottom:1px solid var(--line);font-size:12px;display:grid;grid-template-columns:160px 100px 1fr;gap:12px}.audit-row span{color:var(--muted)}.staff-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:19px 0}.staff-row>div{flex:1;display:grid}.staff-row small{color:var(--muted)}.avatar{height:37px;width:37px;background:var(--pale);border-radius:50%;display:grid;place-items:center;font-weight:800;color:var(--blue)}.subdued{color:var(--muted);font-size:12px}.option-list{display:grid;gap:8px;margin-top:13px}.option{padding:12px;border:1px solid var(--line);border-radius:10px;color:#7e889b;font-size:13px}.option.selected{color:var(--blue);background:#eaf1ff;border-color:#b8cbff;font-weight:700}.option.disabled{opacity:.48}.status-line{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid #edf2f8;font-size:13px}.footer{padding:16px 24px 23px;color:#93a0b5;display:flex;justify-content:space-between;gap:12px;font-size:11px;max-width:1720px;width:100%;margin:0 auto}.warning-strip{margin-top:20px;border:1px solid #f4e8bc;background:#fffcf2;border-radius:11px;padding:10px 15px;color:#92721f;font-size:12px}.resident-mode{grid-template-columns:minmax(0,1fr)}.resident-wrap{max-width:620px;margin:24px auto;display:grid;gap:16px}.resident-upper{display:grid;gap:5px}.resident-upper h2{font-size:26px}.resident-select-label{display:flex;flex-direction:column;align-items:start;gap:6px;margin-top:10px;color:var(--muted);font-size:11px}.resident-select-label select{max-width:100%;font-size:13px;min-width:220px}.resident-card,.resident-widget{padding:23px}.resident-number{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:24px;font-weight:800}.resident-card>p{color:var(--muted);font-size:13px;margin-top:6px}.resident-card hr{margin:19px 0}.resident-balance{font-weight:800;font-size:34px;letter-spacing:-.7px;margin:10px 0}.resident-invoice{display:flex;justify-content:space-between;align-items:center;margin-top:25px;border-top:1px solid #ecf0f7;padding-top:17px;color:var(--muted);font-size:12px}.resident-invoice strong{color:var(--ink);font-size:13px}.resident-widget{display:grid;gap:14px}.widget-head{display:flex;gap:12px;align-items:center}.widget-symbol{background:var(--pale);padding:7px 13px;border-radius:12px;font-size:30px;color:var(--blue)}.resident-widget p{font-size:13px;color:var(--muted)}.resident-payment{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.resident-payment:last-child{border:0}.resident-payment>div{display:grid;gap:4px}.resident-payment small{color:var(--muted)}.resident-foot{text-align:center;color:var(--muted);font-size:11px}.modal{width:min(500px,calc(100vw - 32px));border:1px solid var(--line);padding:0;border-radius:19px;box-shadow:0 16px 70px #031c6960;color:var(--ink)}.modal::backdrop{background:#0615498c;backdrop-filter:blur(2px)}.modal-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:18px 22px}.modal-head h2{font-size:19px}.modal-head button{font-size:28px;line-height:1;padding:3px}.modal-body{padding:22px;display:grid;gap:15px}.field{display:grid;gap:7px;color:#4a5c83;font-size:12px;font-weight:700}.field input,.field select{padding:12px;border:1px solid var(--line);border-radius:10px;background:#fdfefe;font-weight:500;font-size:14px;width:100%;min-width:0}.modal-info{font-size:13px;background:var(--pale);border-radius:10px;padding:12px}.modal-actions{border-top:1px solid var(--line);padding:15px 22px;display:flex;gap:10px;justify-content:flex-end}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:min(500px,90vw);padding:13px 21px;background:#031c69;color:#fff;box-shadow:0 8px 30px #031c6940;border-radius:11px;font-size:13px;z-index:100;text-align:center}.toast[hidden]{display:none}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.backdrop{display:none}
@media(max-width:1350px){:root{--sidebar-width:228px}.content{padding:18px}.topbar{padding:0 18px}.hero h2{font-size:26px}.kpi-grid{gap:9px}.kpi{padding:13px}.kpi-val{font-size:22px}.list-and-detail{grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr)}}
@media(max-width:1100px){.kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.two-cards{grid-template-columns:1fr}.list-and-detail{display:block}.detail-panel{border-left:0;border-top:1px solid var(--line);border-radius:0}.hero h2{font-size:25px}.demo-pill{display:none}.profile-button{font-size:12px}}
@media(max-width:860px){.shell{grid-template-columns:1fr}.sidebar{position:fixed;transform:translateX(-104%);width:min(275px,calc(100vw - 32px));transition:transform .2s}.sidebar.open{transform:translateX(0)}.backdrop.visible{display:block;background:#031c696c;position:fixed;inset:0;z-index:30}.mobile-toggle{display:block}.top-title h1{font-size:19px}.topbar{height:70px}.top-title p{display:none}.resident-mode{grid-template-columns:1fr}}
@media(max-width:610px){.topbar{padding:0 12px;gap:8px}.top-title h1{font-size:17px}.top-actions{gap:5px}.profile-button{padding:7px}.profile-button span:nth-child(2){display:none}.language-switch{padding:2px}.lang{min-width:29px;font-size:10px;padding:6px 4px}.content{padding:13px}.hero{grid-template-columns:1fr}.hero>div:first-child{padding:20px}.hero-art{height:100px;min-height:100px}.tower.two{height:110px}.tower.one{height:75px}.tower.three{height:65px}.hero h2{font-size:24px}.kpi-grid,.kpi-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi{min-height:110px}.kpi-val{font-size:21px}.kpi-label{font-size:11px}.section-head{align-items:flex-start}.button-group{width:100%}.button-group .btn{flex:1}.summary-card,.table-card,.list-part,.detail-panel{padding:14px}.filters{align-items:stretch}.filters>label{flex:1;min-width:0}.filters select{width:100%;max-width:none}.filters .input-wrap{flex-basis:100%}.tab-bar{width:100%}.tab{padding:10px 11px}.footer{padding:15px;display:block}.footer span{display:block;margin-top:4px}.resident-wrap{margin:0 auto}.resident-card,.resident-widget{padding:16px}.audit-row{grid-template-columns:1fr;gap:3px}}

/* B-02 · Full-width workspace, viewport scrolling and interactive KPI system */
@media(min-width:861px){
 html,body{height:100%;overflow:hidden}
 .shell{height:100dvh;min-height:0}
 .sidebar{height:100dvh;min-height:0;overflow-y:auto}
 .workspace{height:100dvh;min-height:0;overflow:hidden}
 .content{overflow-x:hidden;overflow-y:auto;min-height:0;max-width:none;margin:0;width:100%;overscroll-behavior:contain}
 .topbar,.footer{flex-shrink:0}
 .objects-page .list-and-detail{height:clamp(290px,calc(100dvh - 490px),850px);min-height:0}
 .objects-page .list-part,.objects-page .detail-panel{overflow-y:auto;overscroll-behavior:contain;min-height:0}
}
.page-stack,.section-head,.two-cards,.access-grid{min-width:0}
.kpi-grid{align-items:stretch}
.kpi{width:100%;height:100%;min-height:119px;align-items:flex-start;text-align:left;line-height:1.3;transition:box-shadow .15s,border-color .15s,transform .15s}
.kpi:hover{border-color:#9cbbff;box-shadow:0 9px 25px #0f47f120;transform:translateY(-1px)}
.kpi:focus-visible{outline-offset:3px}
.kpi.kpi-selected{border-color:#0f47f1;box-shadow:0 0 0 2px #0f47f13c}
.kpi-val{max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:clamp(18px,1.8vw,25px)}
.kpi-label{font-weight:600}
.kpi-sub{width:100%;display:flex;justify-content:space-between;align-items:end;gap:7px;text-align:left}
.kpi-sub span{font-size:15px;color:var(--blue);font-weight:700}
.dashboard-summaries{align-items:stretch}
.dashboard-summaries>.summary-card{height:100%;min-height:320px;display:flex;flex-direction:column}
.dashboard-summaries .summary-card .summary-stats{margin-top:auto}
.dashboard-summaries .summary-card .device-list{display:flex;flex-direction:column;flex:1;justify-content:space-between}
.dashboard-summaries .summary-card .device-row{padding:12px 2px;min-height:59px}
.dashboard-summaries .summary-card .section-head{min-height:65px;align-items:flex-start}
.detail-panel .panel-group .mini-list{max-height:210px;overflow-y:auto;overscroll-behavior:contain}
.pass-time{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.mini-row:has(.pass-time)>span:nth-child(2){min-width:0;overflow-wrap:anywhere}
.qr-dot{border-radius:9px}
.filter-hint{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px}
.access-page .access-grid{max-height:calc(100dvh - 390px);overflow-y:auto;overscroll-behavior:contain;align-content:start;padding:2px 4px 10px}
.access-page .audit-scroll{max-height:calc(100dvh - 400px);overflow-y:auto}
.finance-page .kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.finance-page .two-cards,.users-page .two-cards{align-items:stretch}
.finance-page .table-scroller,.users-page .table-scroller{max-height:calc(100dvh - 365px);min-height:210px;overflow:auto;overscroll-behavior:contain}
.finance-page thead th,.users-page thead th,.objects-page thead th,.access-page thead th{position:sticky;top:0;z-index:1;background:#f7f9ff}
.segmented{display:flex;align-items:center;flex-wrap:wrap;gap:4px;background:#edf2fe;border-radius:11px;padding:4px;width:fit-content;max-width:100%}
.segment{border-radius:8px;padding:8px 13px;font-size:12px;color:var(--muted);font-weight:700}
.segment.selected{background:#fff;color:var(--blue);box-shadow:0 2px 8px #081c6914}
.dimmed-card{opacity:.88}
.check-field{display:flex;gap:11px;align-items:center;color:#4a5c83;font-size:13px;font-weight:650}
.check-field input{width:18px;height:18px;accent-color:var(--blue)}
.objects-page .building-strip{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.objects-page .list-part{display:flex;flex-direction:column}
.objects-page .list-part>.table-scroller{flex:1;min-height:0;overflow:auto}
@media(max-width:1100px){.finance-page .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:860px){.content{max-width:none}.objects-page .list-part>.table-scroller{max-height:470px;overflow:auto}.detail-panel{overflow:visible}.access-page .access-grid{max-height:600px}.finance-page .table-scroller,.users-page .table-scroller{max-height:430px;min-height:0}.dashboard-summaries>.summary-card{min-height:270px}}
@media(max-width:610px){.finance-page .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi{min-height:111px}.kpi-val{font-size:20px}.segment{flex:1}.objects-page .list-and-detail{overflow:visible}.objects-page .list-part{max-width:100%;overflow:hidden}.objects-page .list-part>.table-scroller{max-height:420px}.dashboard-summaries>.summary-card{min-height:0}}

/* B-03: readable, independently accountable utilities and parking columns. */
.apartment-table{min-width:920px;table-layout:auto}
.apartment-table th,.apartment-table td{white-space:nowrap}
.apartment-table th{font-size:12px}
.apartment-table td{font-size:12px}
.table-secondary{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.service-panel{background:#f8faff;border:1px solid var(--line);border-radius:12px;padding:12px;margin-block:8px}
.service-panel .info-line{align-items:center;min-width:0}
.service-panel .info-line strong{max-width:65%;overflow-wrap:anywhere}
.service-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.service-actions .tiny-btn{min-height:35px;max-width:100%}
.finance-service-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.finance-service-tabs{margin-block:5px 2px}
.finance-service-tabs .segment{min-width:180px}
.finance-page .table-card .section-head{gap:8px;flex-wrap:wrap}
.finance-page .table-card .section-head h2{min-width:0;font-size:16px}
@media(max-width:1350px){.objects-page .list-and-detail{grid-template-columns:minmax(0,1.48fr) minmax(290px,.9fr)}.apartment-table{min-width:880px}}
@media(max-width:1100px){.finance-service-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:610px){.finance-service-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.finance-service-tabs{width:100%}.finance-service-tabs .segment{min-width:0;flex:1}.apartment-table{min-width:850px}}

@media(min-width:1101px){.objects-page .kpi-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
/* B-04: distinct tariff cards and stacked parking spaces */
.tariff-list{display:grid;gap:8px;margin:14px 0;max-height:340px;overflow-y:auto;overscroll-behavior:contain}
.tariff-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 10px;border:1px solid var(--line);border-radius:12px;background:var(--bg);min-width:0}
.tariff-row>div{min-width:0;flex:1}
.tariff-row small{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.tariff-row>strong{white-space:nowrap;font-size:13px}
.parking-spot{border:1px solid var(--line);border-radius:12px;padding:12px;margin-block:10px;background:#fff}
.parking-spot>.info-line:first-child{padding-top:0}
.parking-spot .service-actions{margin-top:8px}
.service-panel .panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
@media(max-width:610px){.tariff-row{flex-wrap:wrap}.tariff-row>div{flex-basis:100%}}

/* B-05 mobile-first resident PWA. Admin layouts remain unchanged. */
.resident-mode{background:#f6f8fe;color:#111f46}
.resident-mode .workspace{height:100dvh;min-height:0;overflow:hidden}
.resident-mode .content{padding:0;max-width:none;flex:1;overflow:auto;overscroll-behavior-y:contain}
.resident-appbar{height:70px;min-height:70px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));border-bottom:1px solid #e7ebf6;gap:12px;flex-shrink:0}
.resident-brand{display:flex;align-items:center;gap:9px;text-decoration:none}
.resident-logo{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#0f47f1;color:#fff;font-size:23px;font-weight:900;box-shadow:0 4px 10px #0f47f135}
.resident-brand strong{font-size:18px;letter-spacing:1px;display:block;line-height:1.05}
.resident-brand small{display:block;font-size:10px;letter-spacing:2.1px;font-weight:750;color:#7885a8}
.resident-appbar-actions{display:flex;align-items:center;gap:8px}
.resident-install,.resident-demo-back{min-width:36px;height:36px;padding:4px;border:1px solid #dbe4fa;border-radius:12px;display:grid;place-items:center;color:#0f47f1;background:#f5f8ff;font-size:23px}
.resident-pwa{min-height:100%;display:flex;flex-direction:column;position:relative}
.resident-wrap{max-width:660px;width:100%;margin:0 auto;padding:20px 20px 20px;display:flex;flex-direction:column;gap:16px;flex:1}
.resident-preview-select{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:space-between;padding:10px 12px;border:1px dashed #cfddf6;border-radius:12px;font-size:11px;color:#687a9d;background:#fff}
.resident-preview-select select{border:1px solid #dce4f3;background:#fff;border-radius:9px;min-width:170px;padding:6px;font-size:12px;max-width:240px}
.resident-welcome,.resident-screen-header{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:5px 2px 0}
.resident-welcome h1,.resident-screen-header h1{font-size:27px;letter-spacing:-.7px;line-height:1.22;margin:4px 0}
.resident-welcome p,.resident-screen-header p{font-size:13px;color:#73819b}
.resident-building-art{width:63px;height:63px;flex-shrink:0;border-radius:17px;background:linear-gradient(140deg,#dbe7ff,#b8d0ff);display:grid;place-items:center;font-size:39px;color:#2454cd}
.resident-balance-hero{background:linear-gradient(115deg,#133dbb,#0f47f1 62%,#577dfb);border-radius:23px;padding:23px 23px 18px;box-shadow:0 12px 28px #0f47f12a;color:#fff}
.balance-overline{color:#d9e3ff;font-size:13px;font-weight:600}.balance-figure{font-weight:850;font-size:36px;margin:6px 0;letter-spacing:-1.1px}.balance-status{color:#eff4ff;font-size:12px}.resident-hero-foot{border-top:1px solid #ffffff30;margin-top:18px;padding-top:15px;display:flex;justify-content:space-between;align-items:center;font-size:12px}.resident-hero-foot .tag{background:#ffffff24;color:#fff}
.resident-ledgers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.resident-ledger{background:#fff;border:1px solid #e2eaf8;border-radius:17px;padding:14px 15px;display:flex;flex-direction:column;gap:7px;min-width:0;box-shadow:0 4px 17px #162d6908}
.ledger-icon{font-weight:800;border-radius:11px;height:37px;width:37px;display:grid;place-items:center;font-size:22px}.ledger-icon.blue{background:#e8efff;color:#1e53e5}.ledger-icon.pale{background:#fff4db;color:#9d690b}
.resident-ledger small{font-size:12px;color:#7482a0;min-height:35px}.resident-ledger strong{font-size:20px;white-space:nowrap;letter-spacing:-.5px;overflow:hidden;text-overflow:ellipsis}.ledger-due,.ledger-ok{font-size:11px;font-weight:750}.ledger-due{color:#d18002}.ledger-ok{color:#198459}
.resident-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:4px}.resident-section-title h2{font-size:17px}.resident-section-title .tiny-btn{border-radius:9px;font-size:12px}
.resident-feature,.resident-qr-banner{display:grid;grid-template-columns:54px minmax(0,1fr) auto;gap:13px;align-items:center;background:#fff;border:1px solid #e1e8f6;box-shadow:0 3px 16px #13296509;border-radius:17px;padding:16px}
.feature-qr,.resident-banner-symbol{width:54px;height:54px;border-radius:15px;background:#e5eefd;display:grid;place-items:center;color:#0f47f1;font-size:31px}
.resident-feature h3,.resident-qr-banner h2{font-size:14px}.resident-feature p,.resident-qr-banner p{font-size:12px;color:#8290a6;margin-top:4px}.resident-create{padding:10px;white-space:nowrap}
.resident-history{padding:4px 15px;border-color:#e1e8f6;box-shadow:0 4px 17px #162d6907}.resident-transaction{display:flex;gap:12px;padding:14px 2px;align-items:center;border-bottom:1px solid #eef2fb}.resident-transaction:last-child{border:0}.transaction-icon,.spot-marker{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:#eaf0fe;color:#1f54dd;font-size:20px;flex-shrink:0}.transaction-desc{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.transaction-desc strong{font-size:13px}.transaction-desc small{font-size:11px;color:#7e8da7}.resident-transaction b{font-size:13px;white-space:nowrap;color:#187a55}
.resident-spots{padding:4px 16px}.spot-line{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #edf1f8;font-size:13px}.spot-line:last-child{border:0}.spot-line strong{flex:1}.spot-line>span:last-child{color:#687894;font-weight:700}
.resident-screen-header{display:block}.resident-screen-header h1{margin:5px 0 9px}.resident-screen-header p{line-height:1.55}.resident-filter-tabs{display:flex;gap:6px;border:1px solid #dce5f7;background:#eaf0fb;border-radius:13px;padding:4px}.resident-filter-tabs button{flex:1;min-width:0;border-radius:10px;padding:11px 8px;font-size:12px;font-weight:750;color:#687a9d}.resident-filter-tabs button.active{background:#fff;color:#0f47f1;box-shadow:0 2px 9px #14296212}
.resident-qr-banner{grid-template-columns:56px minmax(0,1fr);padding:18px}.resident-qr-banner>.btn{grid-column:1/-1}.resident-pass-list{display:grid;gap:10px}.resident-pass{display:flex;align-items:center;gap:13px;border:1px solid #e1e8f6;border-radius:15px;background:#fff;padding:14px}.pass-icon{height:42px;width:42px;display:grid;place-items:center;background:#eef3ff;border-radius:11px;color:#0f47f1;font-size:24px}.pass-details{min-width:0;display:grid;gap:4px;flex:1}.pass-details strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pass-details small{font-size:11px;color:#8290a6}.pass-state{font-size:11px;font-weight:750}.pass-state.active{color:#198459}.pass-state.scheduled{color:#4664bc}.pass-state.expired,.pass-state.revoked{color:#9d6b63}.resident-pass .tiny-btn{min-height:34px}
.resident-empty{padding:22px 12px;text-align:center;font-size:13px;color:#8290a6}.resident-note{color:#886a2a;font-size:12px;line-height:1.5;padding:12px;border-radius:10px;background:#fff9e9}.resident-foot{text-align:center;color:#94a1b5;font-size:11px;margin:3px auto 9px;max-width:520px}
.resident-nav{position:sticky;bottom:0;z-index:12;display:flex;justify-content:space-around;gap:3px;border-top:1px solid #e3e9f6;background:#fff;padding:6px max(13px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(13px,env(safe-area-inset-left));box-shadow:0 -4px 25px #132f6a10;flex-shrink:0}
.resident-nav-button{min-height:55px;max-width:170px;flex:1;display:grid;justify-items:center;align-content:center;gap:3px;color:#8591aa;border-radius:12px}.resident-nav-button span{font-size:25px;line-height:1}.resident-nav-button small{font-size:11px;font-weight:650}.resident-nav-button.active{background:#eef3ff;color:#0f47f1}
.qr-display{display:grid;gap:13px;padding:20px;text-align:center}.qr-modal-top{display:flex;justify-content:space-between;align-items:center;text-align:left}.qr-modal-top button{font-size:27px;line-height:1}.qr-display>p{font-size:13px;color:#66748f}.qr-picture{width:min(100%,290px);aspect-ratio:1;margin:0 auto;border:1px solid #e3eafa;border-radius:12px;padding:12px;background:#fff}.qr-picture svg{width:100%;height:100%;display:block}.qr-schedule{font-size:12px;color:#536687;line-height:1.9}.qr-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.qr-display .resident-note{font-size:11px;text-align:left}.resident-mode .modal{max-height:min(94dvh,700px);overflow:auto}
@media(min-width:861px){.resident-mode .resident-wrap{padding-top:28px}.resident-mode .content{overflow-y:auto}}
@media(max-width:610px){.resident-wrap{padding:14px 14px 12px;gap:14px}.resident-appbar{height:64px;min-height:64px;padding-inline:14px}.resident-brand strong{font-size:16px}.resident-brand small{font-size:9px}.resident-logo{width:35px;height:35px}.resident-welcome h1,.resident-screen-header h1{font-size:24px}.resident-balance-hero{padding:20px;border-radius:20px}.balance-figure{font-size:32px}.resident-ledger{padding:13px}.resident-ledger strong{font-size:19px}.resident-feature{grid-template-columns:46px 1fr;padding:14px;gap:10px}.feature-qr{width:46px;height:46px;font-size:27px}.resident-create{grid-column:1/-1}.resident-nav{margin-inline:0}.qr-actions{grid-template-columns:1fr 1fr}.resident-pass .tiny-btn{font-size:11px}}
@media(prefers-reduced-motion:reduce){.resident-mode *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* B-07: keep the resident app bar and bottom navigation OUTSIDE the scroll region.
   Touch input can scroll vertically, but browser pinch/double-tap page zoom is
   suppressed inside the resident PWA only. OS accessibility zoom is unaffected. */
html.resident-pwa-active,body.resident-pwa-active{height:100%;overflow:hidden;overscroll-behavior:none;touch-action:pan-y}
.resident-mode{height:100vh;height:100dvh;min-height:0;max-height:100dvh;overflow:hidden}
.resident-mode .workspace{height:100%;max-height:100%;min-height:0;overflow:hidden}
.resident-mode .content{flex:1 1 0;min-height:0;height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.resident-mode .resident-pwa{min-height:100%;height:auto}
.resident-mode .resident-appbar{position:relative;top:auto;z-index:20;height:calc(70px + env(safe-area-inset-top));min-height:calc(70px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);touch-action:pan-y}
.resident-mode .resident-nav{position:relative;bottom:auto;z-index:20;flex-shrink:0;touch-action:pan-y}
/* Prevent iOS Safari's automatic field-focus zoom for text below 16px. */
body.resident-pwa-active input,body.resident-pwa-active select,body.resident-pwa-active textarea{font-size:16px}
@media(max-width:610px){.resident-mode .resident-appbar{height:calc(64px + env(safe-area-inset-top));min-height:calc(64px + env(safe-area-inset-top))}}
