:root{--ink:#182947;--green:#2458d5;--muted:#596d89;--line:#e2e9f4;--bg:#f3f6fc}*{box-sizing:border-box}body{margin:0;font:16px/1.5 "Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--ink)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin:0}h1{font-size:34px;line-height:1.2;letter-spacing:-1px;font-weight:650}h2{font-size:22px;line-height:1.3;letter-spacing:-.4px}h3{font-size:18px}small{font-size:13px;color:var(--muted)}[hidden]{display:none!important}input,select,textarea{width:100%;min-width:0;border:1px solid #cbd5da;border-radius:9px;padding:11px 12px;background:white;color:var(--ink)}textarea{min-height:100px;resize:vertical}label{display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:600}input:focus,select:focus,textarea:focus{outline:2px solid #4ba780;outline-offset:1px}button:focus-visible,a:focus-visible{outline:3px solid #4ba780;outline-offset:3px}.brand{display:flex;align-items:center;gap:12px;font-size:30px;font-weight:750;letter-spacing:-1px}.brand b{display:grid;place-items:center;width:43px;height:43px;border-radius:12px;background:#183b33;color:#9be6ba;font-size:26px}.green{color:var(--green)}aside{position:fixed;inset:0 auto 0 0;width:240px;background:white;padding:32px 22px;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:3}.caption{font-size:11px;font-weight:700;letter-spacing:1.5px;color:#84949c;margin:38px 12px 14px}.nav-button{border:0;background:none;color:var(--muted);width:100%;display:flex;align-items:center;gap:13px;text-align:left;border-radius:10px;padding:12px 14px;margin-bottom:5px;font-size:15px;font-weight:550}.nav-button.active{background:#e8f5ee;color:var(--green)}.nav-button:hover{background:#f0f5f6}.nav-button svg{width:20px;height:20px;flex-shrink:0}.building-link{display:flex;align-items:center;gap:9px;width:100%;text-align:left;background:none;border:0;border-radius:8px;font-size:14px;color:var(--muted);padding:9px 12px}.building-link.active{color:var(--green);background:#f0f7f3}.building-link svg{width:17px;flex-shrink:0}.building-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-buildings{overflow:auto}.account{margin-top:auto;border-top:1px solid var(--line);padding-top:22px;display:flex;gap:9px;align-items:center;font-size:13px}.account small,.account strong{display:block}.account button{margin-left:auto}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;font-size:12px;font-weight:700;background:#ecf1f4}.account .avatar{font-size:14px}main{margin-left:240px;min-height:100vh}header{height:78px;display:flex;justify-content:space-between;align-items:center;padding:0 40px;background:#fff9;border-bottom:1px solid var(--line);font-size:14px;color:var(--muted)}header strong{color:var(--ink);font-weight:500}.divider{margin:0 14px;color:#adbcc4}.private{font-size:13px;border:1px solid var(--line);border-radius:40px;padding:5px 13px}.workspace{padding:38px 40px 24px;max-width:1680px;margin:auto}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:27px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:1.4px;color:var(--green);margin-bottom:9px}.muted{color:var(--muted)}#subtitle{font-size:15px;margin-top:10px}.actions{display:flex;align-items:center;gap:12px}.primary,.secondary,.danger{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 16px;border:0;border-radius:9px;min-height:43px;font-weight:650;font-size:14px}.primary{background:var(--green);color:white}.primary:hover{background:#12583f}.primary svg{width:17px;height:17px}.secondary{background:#f1f5f7;color:var(--ink);border:1px solid var(--line)}.danger{color:#a43333;background:#ffeded}.text-button{background:none;border:0;font-size:14px;font-weight:600;color:var(--green);padding:7px}.month-selector{display:flex;align-items:center;background:white;border:1px solid var(--line);border-radius:10px;padding:4px}.month-selector button{border:0;background:none;font-size:22px;min-width:30px;color:var(--muted)}.month-selector input{width:145px;border:0;font-size:14px;padding:5px}.scope{display:flex;align-items:center;gap:18px;color:var(--muted);font-size:14px;margin-bottom:24px}.scope label{display:flex;align-items:center;flex-direction:row;font-weight:500;gap:10px}.scope select{width:auto;max-width:300px;padding:8px 12px;font-size:14px;border-color:var(--line)}.scope>.text-button{margin-left:auto}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}.stat{background:white;border:1px solid var(--line);border-radius:16px;padding:22px}.stat-label{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:var(--muted);margin-bottom:15px}.stat-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#f0f5f7;color:#67838e}.stat-icon svg{width:17px}.stat-value{font-size:31px;font-weight:650;letter-spacing:-1px;white-space:nowrap}.stat small{display:block;margin-top:5px}.stat.collected .stat-value{color:var(--green)}.stat.pending .stat-value{color:#996321}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:24px;align-items:start}.panel{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden}.panel-head{padding:23px 24px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-head h2{font-size:18px}.panel-head p{font-size:13px;color:var(--muted);margin-top:4px}.table-wrap{overflow-x:auto}table{width:100%;text-align:left;border-collapse:collapse;font-size:14px;white-space:nowrap}th{background:#f9fbfc;font-size:12px;letter-spacing:.3px;color:#768992;font-weight:650;padding:14px 19px}td{padding:17px 19px;border-top:1px solid #edf1f4}.number{text-align:right}.person{display:flex;align-items:center;gap:10px}.person strong,.person small{display:block}.person strong{font-weight:650;font-size:14px}.person small{font-size:12px;margin-top:2px}.breakdown{display:block;font-size:12px;color:var(--muted);margin-top:3px}.badge{display:inline-flex;align-items:center;border-radius:30px;padding:5px 9px;font-size:12px;line-height:1.3;font-weight:650;background:#eff2f4;color:#65757d}.badge.paid{background:#e4f5e9;color:#287747}.badge.partial{background:#fff2d9;color:#956019}.badge.unpaid{background:#fcecec;color:#a64343}.badge.bank{background:#eaf1fb;color:#406b9e}.badge.cash{background:#edf5ed;color:#437551}.right-stack{display:grid;gap:18px}.collection{border-radius:16px;padding:24px;background:#163c34;color:white}.collection .eyebrow{color:#abd8bf}.collection h2{font-size:19px}.collection-number{font-size:48px;font-weight:650;letter-spacing:-2px;margin:23px 0 5px;line-height:1.2}.collection p{font-size:13px;color:#bfdacc;margin-top:8px}.collection progress{width:100%;height:8px;display:block;border:0;border-radius:20px;overflow:hidden;background:#ffffff25;accent-color:#96e2b7;margin-top:22px}.collection progress::-webkit-progress-bar{background:#ffffff25;border-radius:20px}.collection progress::-webkit-progress-value{background:#96e2b7;border-radius:20px}.collection progress::-moz-progress-bar{background:#96e2b7;border-radius:20px}.collection-foot{display:flex;justify-content:space-between;font-size:12px;color:#c4dbce;margin-top:10px}.mini-panel{padding:22px}.mini-panel h3{font-size:15px;margin-bottom:12px}.mini-row{display:flex;justify-content:space-between;gap:10px;font-size:14px;padding:11px 0}.mini-row+.mini-row{border-top:1px solid var(--line)}.mini-row span{display:flex;align-items:center;gap:8px;color:var(--muted)}.mini-row svg{width:17px}.empty{padding:50px 25px;text-align:center}.empty-icon{display:grid;place-items:center;width:58px;height:58px;border-radius:17px;background:#edf7f1;color:var(--green);margin:0 auto 18px}.empty-icon svg{width:25px}.empty p{max-width:420px;margin:10px auto 22px;font-size:14px;color:var(--muted)}.building-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.building-card .panel-head{align-items:start}.building-card .panel-head h2{font-size:21px;overflow-wrap:anywhere}.building-heading{display:flex;gap:12px;align-items:center}.building-heading .stat-icon{width:42px;height:42px;background:#e8f5ed;color:var(--green);flex-shrink:0}.unit-list{padding:4px 22px}.unit{display:flex;justify-content:space-between;align-items:start;gap:14px;padding:18px 0;border-bottom:1px solid var(--line)}.unit:last-child{border:0}.unit h3{font-size:15px;overflow-wrap:anywhere}.unit p{font-size:13px;color:var(--muted);white-space:pre-line;overflow-wrap:anywhere;margin-top:5px}.unit-rate{white-space:nowrap}.unit-rate strong{font-size:16px}.unit-rate button{display:block;margin:5px 0 0 auto}.card-foot{padding:13px 22px;display:flex;justify-content:space-between;align-items:center;background:#fafcfc;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}.row-actions{display:flex;justify-content:flex-end;gap:5px}.row-actions button,.row-actions a{font-size:13px}.pdf{display:flex;align-items:center;gap:12px}.pdf-mark{background:#fff0ec;color:#b9624a;border-radius:8px;padding:12px 7px;font-size:10px;font-weight:750}.pdf strong{white-space:normal;overflow-wrap:anywhere}.pdf small{display:block}footer{padding:20px 40px 28px;display:flex;justify-content:space-between;font-size:12px;color:#83939c}.mobile-logout{display:none}dialog{padding:0;border:0;border-radius:20px;width:min(580px,calc(100% - 28px));max-height:90vh;color:var(--ink);box-shadow:0 25px 80px #12372f40}dialog::backdrop{background:#142d3d70;backdrop-filter:blur(3px)}.modal-head{padding:25px 27px 20px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:12px}.modal-head h2{font-size:22px}.modal-head .eyebrow{margin-bottom:5px}.close{border:0;background:none;color:var(--muted);font-size:29px;min-width:35px}#modal-body{padding:24px 27px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.full{grid-column:1/-1}.hint{font-size:13px;color:var(--muted);font-weight:400}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}.error{font-size:14px;color:#a33333;margin-top:12px}.error:empty{display:none}.total{background:#eef7f2;border:1px solid #d6e9dd;border-radius:12px;padding:16px 20px;display:flex;justify-content:space-between;align-items:center;font-size:14px}.total strong{font-size:25px;color:var(--green)}fieldset{border:0;padding:0;margin:0;display:flex;gap:12px}legend{font-size:14px;font-weight:600;margin-bottom:9px}fieldset label{flex:1;flex-direction:row;align-items:center;padding:12px;border:1px solid var(--line);border-radius:10px}fieldset input{width:auto;accent-color:var(--green)}.auth{display:grid;place-items:center;min-height:100vh;padding:24px;background:radial-gradient(ellipse at 20% 20%,#dbeee4,transparent 65%),var(--bg)}.auth-card{max-width:100%;width:440px;padding:40px;background:white;border:1px solid var(--line);border-radius:22px;box-shadow:0 20px 70px #183b330c}.auth-card .brand{margin-bottom:35px}.auth-card h1{font-size:28px;letter-spacing:-.6px}.auth-card p{font-size:14px;color:var(--muted);margin:12px 0 24px}.auth-card .primary{width:100%;margin-top:20px}.auth-card>small{display:block;text-align:center;border-top:1px solid var(--line);padding-top:23px;margin-top:30px;font-size:12px}.auth-card .error{color:#a33333;margin:10px 0 0}.loader{text-align:center;padding:50px;color:var(--muted)}.error-panel{padding:25px;background:#fff0f0;border-radius:12px;color:#a33333}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:calc(100% - 30px);background:var(--ink);color:white;padding:13px 22px;border-radius:10px;font-size:14px;z-index:100}.detail{padding:18px;background:#f1f5f6;border-radius:12px}.detail p{margin-top:6px;font-size:14px;color:var(--muted);overflow-wrap:anywhere}.detail-heading{font-size:15px;margin:22px 0 12px}.detail-item{padding:12px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:10px;font-size:14px}.detail-item small{display:block}.detail-item span{overflow-wrap:anywhere}
@media(max-width:1200px){.workspace{padding:28px}.page-head{flex-direction:column;align-items:start}.dashboard-grid{grid-template-columns:1fr}.right-stack{grid-template-columns:1fr 1fr}.stat{padding:18px}.stat-value{font-size:26px}.building-grid{grid-template-columns:1fr}}@media(max-width:800px){aside{position:static;width:100%;padding:17px 20px;border-bottom:1px solid var(--line);border-right:0}aside>.caption,.sidebar-buildings,.account{display:none}aside .brand{font-size:26px}aside .brand b{width:35px;height:35px;font-size:23px;border-radius:9px}#nav{display:flex;overflow-x:auto;gap:4px;margin:15px -5px -5px}.nav-button{white-space:nowrap;width:auto;flex-shrink:0;font-size:13px;padding:9px 11px;gap:7px}.nav-button svg{width:17px}main{margin-left:0}header{height:54px;padding:0 20px}.private{display:none}.workspace{padding:25px 20px}h1{font-size:30px}.actions{flex-wrap:wrap;width:100%}.actions>.primary{flex:1}.stats{grid-template-columns:1fr 1fr}.stat-value{font-size:28px}.scope{flex-wrap:wrap;gap:10px}.scope select{max-width:240px}.panel-head{padding:18px}td,th{padding:14px}.unit{flex-wrap:wrap}footer{padding:15px 20px}.mobile-logout{display:block}.form-grid{gap:15px}#modal-body,.modal-head{padding:22px}}@media(max-width:480px){.workspace{padding:23px 15px}.stat{padding:15px}.stat-label{font-size:12px;margin-bottom:10px}.stat-icon{display:none}.stat-value{font-size:24px}.stat small{font-size:12px}.right-stack{grid-template-columns:1fr}.scope label{width:100%}.scope select{flex:1;max-width:none}.scope>span{font-size:12px}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.unit{display:block}.unit-rate{display:flex;align-items:center;justify-content:space-between;margin-top:12px}.unit-rate button{margin:0}.panel-head{flex-wrap:wrap}footer>span{display:none}.actions{gap:8px}.actions>.primary{font-size:13px;padding:10px}.month-selector input{width:133px}#subtitle{font-size:14px}.auth-card{padding:30px}.row-actions{gap:0}.row-actions button{padding:5px}.breadcrumb{font-size:13px}}

/* Palette Loyer : bleu électrique, turquoise, orange et violet. */
body{background:radial-gradient(ellipse at 90% 0%,#e9efff 0%,transparent 50%),var(--bg);font-family:"Segoe UI Variable","Segoe UI",Arial,sans-serif}
aside{background:#e0eaff;border-color:#d1def8;padding:32px 18px}
.brand{color:#132b50;letter-spacing:-1.4px}
.brand b{background:linear-gradient(145deg,#315df2,#2447bd);color:white;border-radius:14px;box-shadow:0 5px 14px #315df230}
.brand .green{color:#ff8a36}
aside .brand{padding-left:8px}
.caption{color:#4f6893;font-size:12px;margin-top:35px}
.nav-button{border-radius:12px;color:#334e7d;padding:11px 12px;gap:11px;margin-bottom:7px;transition:background .18s,box-shadow .18s,transform .18s}
.nav-button svg{width:34px;height:34px;padding:8px;border-radius:10px;background:#c5d7ff;color:#2257d9;stroke-width:1.8}
.nav-button[data-page="buildings"] svg{background:#ffdfc5;color:#a54813}
.nav-button[data-page="tenants"] svg{background:#e2d5ff;color:#6c38bd}
.nav-button[data-page="payments"] svg{background:#c0efe4;color:#137258}
.nav-button[data-page="documents"] svg{background:#ffd8de;color:#ac3450}
.nav-button:hover{background:#f4f7ff;transform:translateX(2px)}
.nav-button.active{background:#2a5be6;color:white;box-shadow:0 7px 18px #2a5be62b}
.nav-button.active svg{background:#ffffff24;color:white}
.nav-button.active:hover{background:#224fce}
.building-link{padding:11px 12px;border-radius:10px;color:#3e5c8a;font-size:14px}
.building-link.active{background:white;color:#244fc5;box-shadow:0 4px 14px #244fc510}
.building-link:hover{background:#f7faff}
.sidebar-buildings>div>small{padding:0 12px;color:#50678c;display:block}
.account{border-color:#becfed;padding-top:20px;color:#203a68}
.account small{color:#52688f}
.account .avatar{background:#294eb7;color:white;box-shadow:0 4px 10px #294eb71a}
.account .text-button{color:#244db5}
header{background:#162b50;border:0;color:#c5d4ef;height:76px}
header strong{color:white;font-weight:600}
.divider{color:#7995bc}
.private{background:#284570;color:#cde9ff;border:1px solid #3c5b8b;font-size:13px}
.workspace{padding-top:36px}
h1{font-size:36px;letter-spacing:-1.2px;font-weight:720}
.eyebrow{color:#3b60b6;font-size:12px;letter-spacing:1.3px}
.page-head{padding-bottom:24px;border-bottom:1px solid #d9e3f3;margin-bottom:24px}
#subtitle{color:#59708d;margin-top:12px}
.primary{border-radius:11px;background:#295be3;box-shadow:0 5px 12px #295be323;transition:background .16s,box-shadow .16s,transform .16s}
.primary:hover{background:#204dc9;box-shadow:0 7px 18px #295be331;transform:translateY(-1px)}
.primary:active{transform:translateY(0)}
.primary:disabled{transform:none}
.secondary{background:#edf2ff;border-color:#dce5fc;color:#2850a2;border-radius:11px}
.text-button{color:#2859cf;border-radius:8px;transition:background .16s}
.text-button:hover{background:#edf3ff}
.danger{background:#ffe3e9;color:#9e2844;border-radius:11px}
input,select,textarea{border-color:#d3deef;border-radius:10px}
input:focus,select:focus,textarea:focus{outline-color:#7296ef;border-color:#507be0}
button:focus-visible,a:focus-visible{outline-color:#5b8cf2}
.month-selector{box-shadow:0 3px 9px #1e488f08;border-color:#d7e2f4;border-radius:12px}
.month-selector button{color:#3764ba;border-radius:8px}
.month-selector button:hover{background:#ecf2ff}
.scope select{border-color:#d6e1f3;box-shadow:0 2px 5px #25468605}
.stats{gap:17px}
.stat{border-radius:19px;border:1px solid transparent;padding:24px;box-shadow:0 7px 22px #293b6306;transition:box-shadow .18s,transform .18s}
.stat:hover{transform:translateY(-2px);box-shadow:0 10px 24px #293b6310}
.stat-label{font-weight:600;font-size:14px;gap:7px}
.stat-icon{width:37px;height:37px;border-radius:11px}
.stat-icon svg{width:19px}
.stat-value{font-size:33px;font-weight:720;letter-spacing:-1.2px}
.stat:nth-child(1){background:#e3edff;border-color:#d1def9}
.stat:nth-child(1) .stat-label,.stat:nth-child(1) small{color:#446191}
.stat:nth-child(1) .stat-value{color:#234fb6}
.stat:nth-child(1) .stat-icon{background:#bed4ff;color:#254fb6}
.stat.collected{background:#daf6ec;border-color:#c2ecdc}
.stat.collected .stat-label,.stat.collected small{color:#386e5d}
.stat.collected .stat-value{color:#12654c}
.stat.collected .stat-icon{background:#ace6d2;color:#15684e}
.stat.pending{background:#fff0d9;border-color:#f9dfb6}
.stat.pending .stat-label,.stat.pending small{color:#876134}
.stat.pending .stat-value{color:#9d4c0b}
.stat.pending .stat-icon{background:#ffdaad;color:#9b4b09}
.stat:nth-child(4){background:#eee5ff;border-color:#dfd1f6}
.stat:nth-child(4) .stat-label,.stat:nth-child(4) small{color:#6b5293}
.stat:nth-child(4) .stat-value{color:#6939a6}
.stat:nth-child(4) .stat-icon{background:#d5bef9;color:#6737a4}
.panel{border-radius:19px;border-color:#dfe7f3;box-shadow:0 5px 20px #182f6005}
.panel-head{background:linear-gradient(105deg,#ffffff,#f7f9ff);padding:23px 24px;border-color:#e3eaf5}
.panel-head h2{font-weight:700;color:#1d355d}
th{background:#eff4fc;color:#506987;font-size:12px;padding-top:16px;padding-bottom:16px}
td{border-color:#e9eff7}
tbody tr{transition:background .15s}
tbody tr:hover{background:#f6f9ff}
.person .avatar{background:#dce9ff;color:#315caf}
tbody tr:nth-child(3n+2) .person .avatar{background:#eee1ff;color:#7d46b6}
tbody tr:nth-child(3n+3) .person .avatar{background:#d9f4e9;color:#227353}
.badge{padding:6px 10px;font-size:12px;background:#e6edf8;color:#425d82}
.badge.paid{background:#c9f3df;color:#146548}
.badge.partial{background:#ffe6b4;color:#865009}
.badge.unpaid{background:#ffdce4;color:#a52d49}
.badge.bank{background:#dce8ff;color:#2855ad}
.badge.cash{background:#cfefdf;color:#1c6b47}
.collection{background:linear-gradient(135deg,#234aab 0%,#254fd1 60%,#4775e9 100%);border-radius:19px;padding:25px;box-shadow:0 10px 28px #244fc120}
.collection .eyebrow{color:#d1e0ff}
.collection h2{font-weight:650}
.collection-number{font-size:54px;font-weight:700;letter-spacing:-2px}
.collection p{color:#dce7ff}
.collection-foot{color:#dbe7ff}
.collection progress{height:9px;background:#ffffff30;accent-color:#b8f178}
.collection progress::-webkit-progress-bar{background:#ffffff30}
.collection progress::-webkit-progress-value{background:#b8f178}
.collection progress::-moz-progress-bar{background:#b8f178}
.mini-panel h3{color:#27446d}
.mini-row:first-of-type{color:#305fbe}
.mini-row:last-of-type{color:#197051}
.mini-row span svg{background:#e4edff;color:#315dba;padding:6px;width:29px;height:29px;border-radius:8px}
.mini-row:last-of-type span svg{background:#d9f3e5;color:#21744b}
.empty-icon{background:#e3edff;color:#2a5dd0;width:64px;height:64px;border-radius:20px}
.empty{background:radial-gradient(ellipse at 50% 0%,#f0f5ff,transparent 75%)}
.building-card:nth-child(3n+1) .panel-head{background:#e9f1ff}
.building-card:nth-child(3n+2) .panel-head{background:#f0e8ff}
.building-card:nth-child(3n+3) .panel-head{background:#ddf5ee}
.building-heading .stat-icon{background:#c6d9ff;color:#315cbb;width:46px;height:46px;border-radius:13px}
.building-card:nth-child(3n+2) .building-heading .stat-icon{background:#ddc7fc;color:#743fad}
.building-card:nth-child(3n+3) .building-heading .stat-icon{background:#bde9da;color:#216d55}
.unit h3 .badge{margin-left:6px}
.card-foot{background:#f4f7fd;border-color:#e3eaf6}
.pdf-mark{background:#ffe0e7;color:#a63451;box-shadow:inset 0 0 0 1px #f6c7d3;border-radius:10px}
.total{background:#e5efff;border-color:#cbdcf8}
.total strong{color:#2858c5}
fieldset input{accent-color:#2b5fd4}
fieldset label:has(input:checked){background:#eaf1ff;border-color:#91b0f2;color:#2857b5}
input[type="file"]::file-selector-button{border:0;border-radius:6px;background:#e3edff;color:#2c55a4;padding:7px 10px;margin-right:10px;font:inherit;cursor:pointer}
dialog{border-radius:21px;box-shadow:0 28px 100px #11265040}
dialog::backdrop{background:#14284980;backdrop-filter:blur(5px)}
.modal-head{background:#edf3ff;border-color:#dbe5f7}
.modal-head h2{color:#224681}
.detail{background:#edf3ff}
.auth{background:radial-gradient(ellipse at 20% 20%,#345de8,transparent 65%),radial-gradient(ellipse at 90% 90%,#7147ae,transparent 65%),#142b51}
.auth-card{border:1px solid #ffffff99;box-shadow:0 22px 90px #07173040;border-radius:24px;border-top:5px solid #8facff}
.auth-card .brand b{background:#2b59d8;color:white}
.auth-card h1{color:#203a64}
#toast{background:#183d81;border:1px solid #4d72ba;box-shadow:0 8px 28px #193a7d20}
footer{color:#64799a}
@media(max-width:1200px){.stat{padding:19px}.stat-value{font-size:28px}.collection-number{font-size:46px}}
@media(max-width:800px){aside{padding:17px 20px;background:#e0eaff}.nav-button{padding:7px 10px;gap:6px;margin-bottom:2px}.nav-button svg{width:26px;height:26px;padding:5px;border-radius:7px}.nav-button:hover{transform:none}header{height:54px;padding:0 20px}.workspace{padding:25px 20px}h1{font-size:31px}.page-head{padding-bottom:20px}.stats{gap:13px}.stat-value{font-size:29px}.stat{padding:19px}.panel-head{padding:18px}.collection-number{font-size:44px}}
@media(max-width:480px){.workspace{padding:23px 15px}.page-head{margin-bottom:20px}.stat{padding:16px}.stat-label{font-size:13px;margin-bottom:10px}.stat-value{font-size:25px}.stat small{font-size:12px}.stat-icon{display:none}.panel{border-radius:16px}.auth-card{padding:30px}.modal-head{padding:22px}.collection{padding:23px}.building-heading .stat-icon{display:grid}.brand{font-size:27px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}.primary:hover,.stat:hover,.nav-button:hover{transform:none}}
.building-grid{align-items:start}
@media(max-width:600px){
  .dashboard-grid .table-wrap table,.dashboard-grid .table-wrap tbody{display:block;width:100%}
  .dashboard-grid .table-wrap thead{display:none}
  .dashboard-grid .table-wrap tbody{padding:0 17px}
  .dashboard-grid .table-wrap tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:13px 16px;padding:19px 0;border-bottom:1px solid #e2eaf7}
  .dashboard-grid .table-wrap tr:last-child{border-bottom:0}
  .dashboard-grid .table-wrap td{display:block;min-width:0;white-space:normal;padding:0;border:0;text-align:left}
  .dashboard-grid .table-wrap td:first-child{grid-column:1/-1;padding-bottom:3px}
  .dashboard-grid .table-wrap td:nth-child(2)::before{content:'À régler';display:block;font-size:13px;color:#5b6f8d;margin-bottom:5px}
  .dashboard-grid .table-wrap td:nth-child(3)::before{content:'Paiement reçu';display:block;font-size:13px;color:#5b6f8d;margin-bottom:5px}
  .dashboard-grid .table-wrap td:nth-child(3){font-weight:650}
  .dashboard-grid .table-wrap td:nth-child(3) .breakdown{font-weight:400}
  .dashboard-grid .table-wrap td:nth-child(5){text-align:right}
  .dashboard-grid .table-wrap td .breakdown{font-size:12px}
  .dashboard-grid .table-wrap .person small{white-space:normal;overflow-wrap:anywhere;font-size:12px}
  .dashboard-grid .table-wrap tr:hover{background:none}
}
.initial-rate{padding:18px;border:1px solid #cbdcf8;border-radius:14px;background:#f0f5ff}
.initial-rate h3{font-size:16px;color:#254a8c;margin-bottom:7px}
.initial-rate>.hint{margin-bottom:16px;line-height:1.6}
.initial-rate .total{margin-top:15px;padding:12px 14px}
.initial-rate .total strong{font-size:22px}
.document-link{display:flex;align-items:center;gap:12px;text-align:left;background:transparent;border:0;padding:4px;border-radius:9px;color:#254b92;font:inherit;max-width:440px}
.document-link:hover{background:#edf3ff}
.document-link strong{display:block;white-space:normal;overflow-wrap:anywhere;font-weight:650}
.document-link small{display:block;color:var(--muted);margin-top:3px}
.document-name-link{border:0;background:none;padding:4px 0;color:#2859cf;font:inherit;font-weight:600;text-align:left;overflow-wrap:anywhere;min-width:0}
.document-name-link:hover{text-decoration:underline}
.document-detail{align-items:center}
.selected-files{padding:14px 17px;border:1px solid #d7e3f7;border-radius:12px;background:#f5f8ff;font-size:14px}
.selected-files ul{list-style:none;padding:0;margin:10px 0 0;max-height:185px;overflow:auto}
.selected-files li{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid #e0e8f6}
.selected-files li span{min-width:0;overflow-wrap:anywhere}
.selected-files li small{white-space:nowrap}
#document-viewer{width:min(1120px,calc(100% - 32px));max-height:94vh;height:min(880px,94vh);padding:0;border-radius:18px;overflow:hidden}
#document-viewer[open]{display:flex;flex-direction:column}
.viewer-head{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;gap:18px;padding:20px 24px;background:#edf3ff;border-bottom:1px solid #dbe5f7}
.viewer-head>div:first-child{min-width:0}
.viewer-head h2{font-size:20px;overflow-wrap:anywhere;max-height:72px;overflow:auto}
.viewer-head .eyebrow{margin-bottom:5px}
.viewer-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
#viewer-body{flex:1;min-height:0;overflow:auto;background:#e5eaf2}
.pdf-preview{display:block;width:100%;height:100%;border:0;background:#e5eaf2}
.image-preview{display:flex;align-items:center;justify-content:center;height:100%;padding:22px;min-height:200px}
.image-preview img{display:block;max-height:100%;max-width:100%;object-fit:contain;border-radius:8px;box-shadow:0 5px 24px #14294c15}
#viewer-body>.empty{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#f5f8ff}
@media(max-width:600px){#document-viewer{width:calc(100% - 16px);height:94vh;border-radius:14px}.viewer-head{padding:15px;gap:10px}.viewer-head h2{font-size:16px;max-height:65px}.viewer-head .eyebrow{font-size:10px}.viewer-actions{gap:5px}.viewer-actions .secondary{font-size:12px;padding:9px}.document-detail{flex-wrap:wrap}.document-link{max-width:245px}.image-preview{padding:10px}}
.auto-number{display:flex;flex-direction:column;gap:6px;background:#eaf1ff;border:1px solid #cddcf7;padding:14px 17px;border-radius:12px}
.auto-number span{font-size:13px;color:#566f99}
.auto-number strong{font-size:17px;color:#2855b4}
.unit .unit-custom-name{color:#36568b;font-weight:600;margin-top:7px}
.pdf-reader{display:flex;flex-direction:column;height:100%;min-height:0}
.pdf-toolbar{display:flex;align-items:center;justify-content:center;gap:20px;padding:10px 16px;background:#f5f8ff;border-bottom:1px solid #d3dff3;flex-shrink:0;font-size:14px}
.pdf-toolbar button{padding:8px 14px;min-height:35px;font-size:13px}
#pdf-pages{flex:1;min-height:0;overflow:auto;text-align:center;padding:18px;background:#e0e6f0}
#pdf-canvas{background:white;display:block;margin:0 auto;box-shadow:0 4px 22px #18335026;max-width:100%;height:auto}
@media(max-width:600px){.pdf-toolbar{gap:10px;padding:8px}.pdf-toolbar button{font-size:12px;padding:7px 10px}.pdf-toolbar strong{font-size:12px;white-space:nowrap}#pdf-pages{padding:12px}}.index-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;background:linear-gradient(120deg,#15396f,#315ded);color:white;padding:28px;border-radius:20px;margin-bottom:24px}.index-intro p{color:#e6edff}.index-intro .eyebrow{color:#bad6ff}.index-intro a{white-space:nowrap;background:#fff}.index-checks{display:grid;gap:10px}.index-checks label,.index-consent{display:flex;align-items:flex-start;gap:12px}.index-checks input,.index-consent input{width:18px;height:18px;flex-shrink:0;margin-top:2px}.index-amounts{display:flex;align-items:center;justify-content:space-between;background:#eef4ff;border-radius:16px;padding:20px;gap:14px;margin:18px 0}.index-amounts strong{display:block;font-size:26px;color:#2756d9}.index-amounts small{color:#526789}.index-facts{display:grid;grid-template-columns:1fr auto;gap:12px;font-size:14px}.index-facts dd{margin:0;font-weight:650}.index-facts dt{color:#536887}.index-impact{padding:16px;background:#fff4df;border-radius:12px;font-size:14px;margin:18px 0}.index-review form{margin-top:24px}.index-consent{font-size:14px;line-height:1.5}@media(max-width:650px){.index-intro{display:block;padding:20px}.index-intro a{display:inline-block;margin-top:10px}.index-amounts{padding:15px}.index-amounts strong{font-size:21px}.index-facts{grid-template-columns:1fr auto;font-size:12px}}
.report-period{display:flex;align-items:flex-end;gap:14px;margin-bottom:22px}.report-period label{max-width:210px;flex:1}.report-period button{min-height:46px}.expense-summary{display:grid;grid-template-columns:1fr 1.5fr;gap:22px;margin-top:24px}.expense-category-list{padding:20px}.expense-category-list>div{display:grid;grid-template-columns:1fr auto;gap:10px;margin-bottom:18px}.expense-category-list progress{grid-column:1/-1;width:100%;height:8px;accent-color:#4665e9}.report-note{margin:18px 0}.report-receipts{margin-top:24px}.expense-file{display:block;text-align:left;max-width:200px;overflow-wrap:anywhere}.expense-existing-files{padding:12px;background:#f0f5ff;border-radius:12px}.receipt-empty{padding:20px}#expense-reading:not(:empty){padding:14px;background:#e9f4ff;border-radius:12px;color:#244e83}input[list]{width:100%}@media(max-width:850px){.expense-summary{grid-template-columns:1fr}.report-period{flex-wrap:wrap}.report-period label{max-width:none}.report-period button{width:100%}}
/* Miniatures PDF et images, générées localement. */
.file-thumbnail{display:flex;align-items:center;justify-content:center;flex:0 0 80px;width:80px;height:104px;overflow:hidden;background:#fff;border:1px solid #dce5f5;border-radius:10px;box-shadow:0 3px 10px #18345110;transition:transform .18s,box-shadow .18s}
.file-thumbnail>img{display:block;width:100%;height:100%;object-fit:contain;background:white}
.file-thumbnail-fallback{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;color:#6580ae;background:linear-gradient(145deg,#f8faff,#e8efff);width:100%;height:100%}
.file-thumbnail-fallback svg{width:30px;height:30px}.file-thumbnail-fallback small{font-size:10px;font-weight:750;letter-spacing:.6px;margin:0;color:#456394}
.file-thumbnail[data-thumbnail-state="loading"] .file-thumbnail-fallback{opacity:.6}
.document-link:hover .file-thumbnail{transform:translateY(-2px);box-shadow:0 5px 16px #2857cf22}.document-link:focus-visible{outline:3px solid #799cff;outline-offset:3px}.document-detail-link{flex:1;min-width:0;max-width:100%}.document-detail-link>span:last-child{min-width:0}.document-detail .row-actions{flex-shrink:0}
.document-link.expense-file{display:flex;align-items:center;gap:10px;max-width:250px;margin:5px 0;padding:4px}.expense-file .file-thumbnail{flex-basis:60px;width:60px;height:78px}.expense-file strong{font-size:12px;font-weight:600;line-height:1.4}.expense-existing-files{display:flex;gap:12px;flex-wrap:wrap}
.selected-files ul.selected-file-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:12px;max-height:300px;padding:2px;margin-top:12px}.selected-file-cards li{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:10px;min-width:0;border:1px solid #dee7f6;padding:12px;border-radius:12px;background:#fff}.selected-file-cards .file-thumbnail{flex:none;width:88px;height:112px}.selected-file-name{display:block;width:100%;font-size:12px;font-weight:600;text-align:center;line-height:1.4;overflow-wrap:anywhere}.selected-file-name small{display:block;margin-top:4px;color:#7890b2;font-weight:400}
@media(max-width:600px){.file-thumbnail{flex-basis:64px;width:64px;height:84px}.document-link{gap:9px}.document-detail .row-actions{margin-left:auto}.document-detail-link{max-width:100%}.selected-files ul.selected-file-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.document-link.expense-file{max-width:220px}.selected-file-cards .file-thumbnail{width:76px;height:98px}}
.icon-button{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;min-width:40px;padding:9px!important;background:#eff4ff;border:1px solid #dbe5fa;border-radius:11px;color:#345bc2;text-decoration:none;transition:background .15s,transform .15s;cursor:pointer;vertical-align:middle}.icon-button svg{display:block;width:20px;height:20px;flex:none}.icon-button:hover{background:#dce8ff;transform:translateY(-1px)}.icon-button:focus-visible{outline:3px solid #769aff;outline-offset:2px}.icon-button[data-action^="remove-"]{color:#b45353;background:#fff3f2;border-color:#f7dfdc}.icon-button[data-action^="remove-"]:hover{background:#ffe3df}.icon-count{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 4px;display:grid;place-items:center;border-radius:10px;background:#2959df;border:2px solid white;color:white;font-size:9px;font-weight:750;line-height:1}.client-action-bar{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin:18px 0 22px}.client-action-bar .icon-button{width:44px;height:44px;flex-basis:44px}.payment-detail{align-items:center}.payment-detail-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-shrink:0}.payment-detail>div:first-child{min-width:0}.payment-detail small{font-size:12px;line-height:1.5;color:#60779b}.tenant-document-grid{display:grid;gap:12px;margin-top:16px}.tenant-document-card{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #dbe5f7;background:#f8faff;padding:12px;border-radius:14px}.tenant-document-card .document-link{min-width:0;flex:1;max-width:none}.tenant-document-card .document-link>span:last-child{min-width:0}.tenant-document-card .row-actions{flex:none;gap:7px}.tenant-document-card strong{font-size:13px}.row-actions{align-items:center;gap:7px}@media(max-width:600px){.client-action-bar{gap:9px}.payment-detail-actions{gap:9px}.payment-detail-actions>strong{font-size:13px}.tenant-document-card{flex-wrap:wrap;padding:10px}.tenant-document-card .row-actions{margin-left:auto}.tenant-document-card .document-link{min-width:180px}.icon-button{width:38px;height:38px;min-width:38px;flex-basis:38px}}
/* Historique locataire : tableaux et totaux par année. */
#modal:has(.client-payment-history){width:min(780px,calc(100% - 28px))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.client-payment-history{min-width:0}.payment-year-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:12px 0 16px}.payment-year-controls label{display:flex;flex-direction:row;align-items:center;gap:10px;font-size:12px;color:#60779b;font-weight:500}.payment-year-controls select{width:auto;max-width:210px;padding:8px 11px;font-size:12px}.payment-year{overflow:hidden;border:1px solid #dbe5f7;border-radius:13px;background:white;margin-bottom:14px}.payment-year summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 17px;background:#edf3ff;cursor:pointer;list-style:none}.payment-year summary::-webkit-details-marker{display:none}.payment-year summary:before{content:'';flex:none;width:7px;height:7px;border-right:2px solid #6380b2;border-bottom:2px solid #6380b2;transform:rotate(-45deg);transition:transform .15s}.payment-year[open] summary:before{transform:rotate(45deg)}.payment-year-heading{display:flex;align-items:center;gap:12px;flex:1}.payment-year-heading>strong{font-size:17px;color:#254a92}.payment-year-heading small{font-size:11px}.payment-year-summary-total{font-size:15px;color:#2b56ba;white-space:nowrap}.payment-year .table-wrap{max-width:100%;min-width:0}.client-payments-table{width:100%;min-width:445px;font-size:12px}.client-payments-table th,.client-payments-table td{padding:11px 13px}.client-payments-table th{font-size:10px;letter-spacing:0;color:#60779b;background:#f8faff}.client-payments-table .icon-button{width:33px;height:33px;min-width:33px;padding:7px!important;border-radius:9px}.client-payments-table .icon-button svg{width:17px;height:17px}.client-payments-table .badge{font-size:10px;padding:4px 7px}.client-payments-table td:last-child{width:46px;padding-left:6px;padding-right:10px;text-align:right}.client-payments-table tfoot th,.client-payments-table tfoot td{background:#f3f7ff;border-top:1px solid #dce6f8;color:#2c518e;font-size:12px;font-weight:650}.payments-grand-total{display:flex;align-items:center;justify-content:space-between;gap:15px;background:#2455d6;border-radius:12px;padding:15px 18px;color:white;margin:18px 0 23px;font-size:13px}.payments-grand-total strong{font-size:20px;white-space:nowrap}@media(max-width:600px){.payment-year summary{padding:12px}.payment-year-heading{gap:8px}.payment-year-heading>strong{font-size:16px}.payment-year-summary-total{font-size:13px}.payment-year-controls{justify-content:flex-start}.payment-year-controls label{width:100%;justify-content:space-between}.payments-grand-total{padding:13px;font-size:12px}.payments-grand-total strong{font-size:17px}.client-payments-table th,.client-payments-table td{padding:10px 11px}}
.payment-year .table-wrap{position:relative;overflow-x:auto;overflow-y:hidden;width:100%;max-width:100%}.client-payments-table{position:relative}
/* Aperçus Office et réception des espèces. */
.payment-receiver{display:block;max-width:220px;white-space:normal;overflow-wrap:anywhere;color:#60779b;font-size:11px;line-height:1.45;margin-top:6px}
#cash-receiver-field{padding:15px 17px;border:1px solid #bde9d7;border-radius:13px;background:#f0fbf6}#cash-receiver-field label{color:#236f52}#cash-receiver-field input{background:#fff}
.office-reader{min-height:100%;background:#e5eaf2}.office-notice{padding:11px 20px;margin:0;background:#f4f7fd;color:#60779b;font-size:12px;line-height:1.5;border-bottom:1px solid #d8e3f4}
.word-page{width:min(820px,calc(100% - 40px));min-height:680px;margin:24px auto;padding:48px 56px;background:white;box-shadow:0 6px 28px #1b355422;color:#182b47;font-size:15px;line-height:1.7;overflow-wrap:anywhere}.word-page p{margin:0 0 16px}.word-page h1,.word-page h2,.word-page h3{margin:22px 0 12px;color:#254a92}.word-page h1{font-size:26px}.word-page h2{font-size:22px}.word-page h3{font-size:18px}.word-page ul,.word-page ol{padding-left:25px;margin-bottom:18px}.word-page img{max-width:100%;height:auto;display:block;margin:16px auto}.word-page table{display:block;overflow:auto;width:100%;border-collapse:collapse;margin:16px 0}.word-page td,.word-page th{border:1px solid #dbe3f0;padding:8px 12px;white-space:normal}.word-page th{background:#edf3ff}.word-page blockquote{margin:18px 0;padding:8px 18px;border-left:4px solid #7598eb;background:#f5f8ff}.word-page pre{white-space:pre-wrap}.word-page :last-child{margin-bottom:0}
.excel-reader{display:flex;flex-direction:column;height:100%;min-height:0}.excel-toolbar{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px 20px;background:#eef9f3;border-bottom:1px solid #cce4d6}.excel-toolbar label{display:flex;align-items:center;gap:12px;min-width:0;color:#287352;font-size:13px}.excel-toolbar select{max-width:250px;font-size:13px;padding:8px 12px;border-color:#c4e0d0;min-height:38px}.excel-pagination{display:flex;align-items:center;gap:14px}.excel-pagination button{font-size:12px;padding:8px 12px;min-height:35px}.excel-pagination strong{font-size:12px;color:#49745e;white-space:nowrap}.excel-table-wrap{flex:1;min-height:0;overflow:auto;background:#fff}.excel-grid{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:12px}.excel-grid th,.excel-grid td{padding:9px 12px;border-right:1px solid #e4eaf1;border-bottom:1px solid #e4eaf1;min-width:110px;max-width:340px;white-space:pre-wrap;overflow-wrap:anywhere;text-align:left;vertical-align:top}.excel-grid td.number{text-align:right}.excel-grid thead th{position:sticky;top:0;z-index:2;background:#e8f4ee;color:#27724e;text-align:center;font-weight:650}.excel-grid .excel-row-number{position:sticky;left:0;min-width:50px;max-width:50px;text-align:center;background:#f1f6fa;color:#668097;z-index:1}.excel-grid thead .excel-row-number{z-index:3;background:#e0eee7}.excel-grid tr:nth-child(even) td{background:#fbfdff}.office-error{padding:24px}
@media(max-width:650px){.word-page{width:calc(100% - 20px);padding:24px 20px;margin:12px auto;font-size:14px}.office-notice{font-size:11px;padding:10px 14px}.excel-toolbar{flex-wrap:wrap;padding:12px;gap:10px}.excel-toolbar label{width:100%}.excel-toolbar select{flex:1;max-width:none}.excel-pagination{width:100%;justify-content:space-between;gap:8px}.excel-pagination strong{font-size:11px}.excel-grid th,.excel-grid td{padding:8px;min-width:95px}.payment-receiver{font-size:10px;max-width:160px}}.expense-file-card{display:flex;align-items:center;gap:8px;max-width:310px}.expense-file-card .document-link{min-width:0;flex:1}.expense-file-card .icon-button{flex-shrink:0}.expense-existing-files .expense-file-card{padding:7px;border:1px solid #dbe5f7;border-radius:12px;background:#fff}#file-removal{width:min(520px,calc(100% - 28px));padding:0;border-radius:18px}#file-removal .modal-head h2{font-size:20px}.file-removal-body{padding:24px}.file-removal-body>p{margin-bottom:12px;overflow-wrap:anywhere;line-height:1.6}.file-removal-body .form-actions{flex-wrap:wrap}@media(max-width:600px){.file-removal-body{padding:18px}.expense-file-card{max-width:280px}.file-removal-body .form-actions button{flex:1}}/* Menu compact : boutons encadrés répartis sur plusieurs lignes. */
@media(max-width:800px){#nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:16px 0 0;overflow:visible;min-width:0}.nav-button{width:100%;min-width:0;min-height:60px;margin:0;padding:10px 12px;white-space:normal;overflow-wrap:anywhere;border:1px solid #c9d9f6;background:#f7faff;box-shadow:0 2px 5px #284f9a08;gap:7px;font-size:13px;line-height:1.35;align-items:center;flex-direction:column;justify-content:center;text-align:center}.nav-button.active{border-color:#7199f3;background:#fff;box-shadow:0 3px 10px #2d61d51c}.nav-button:hover{transform:none;background:#fff}.nav-button svg{width:32px;height:32px;flex:0 0 32px}aside{padding-bottom:18px}}
@media(max-width:480px){#nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.nav-button{flex-direction:column;justify-content:center;text-align:center;min-height:78px;padding:10px 8px;gap:7px}.nav-button svg{width:30px;height:30px;flex-basis:30px}}/* Nom du document intégré à la miniature. */
.file-thumbnail{position:relative}.file-thumbnail-title{position:absolute;inset:auto 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;padding:7px 6px;background:#ffffffed;border-top:1px solid #dbe5f7;color:#244c94;font-size:10px;font-weight:650;line-height:1.35;text-align:center;white-space:normal;overflow-wrap:anywhere;z-index:1}.document-link.document-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:max-content;max-width:100%;padding:4px}.document-tile .file-thumbnail{width:120px;height:150px;flex:none}.document-tile>small{font-size:11px;margin:0}.tenant-document-card .document-tile{flex:none;min-width:0}.document-link.expense-file.document-tile{max-width:130px;margin:0}.expense-file-card .document-tile{flex:none}.expense-file-card .file-thumbnail{width:110px;height:138px}.expense-file-card{max-width:180px}.document-tile .file-thumbnail-title{font-size:11px;padding:8px 7px}.tenant-document-card .row-actions{margin-left:auto}@media(max-width:600px){.document-tile .file-thumbnail{width:105px;height:136px}.document-tile .file-thumbnail-title{font-size:10px}.tenant-document-card .document-tile{min-width:0}.expense-file-card .file-thumbnail{width:100px;height:128px}.expense-file-card{max-width:155px}}@media(max-width:800px){#nav .nav-button.active{background:#315ee4;color:#fff;border-color:#315ee4;box-shadow:0 3px 10px #2d61d526}#nav .nav-button.active svg{background:#ffffff24;color:#fff}}/* Galerie de documents : uniquement trois colonnes de miniatures cliquables. */
.document-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;max-width:740px;margin:0 auto;padding:24px;min-width:0}.document-gallery .tenant-document-card{display:block;min-width:0;border:0;background:none;padding:0;border-radius:0}.document-gallery .document-link.document-tile{width:100%;max-width:none;min-width:0;margin:0;padding:0;background:none}.document-gallery .file-thumbnail{width:100%;max-width:160px;height:auto;aspect-ratio:4/5;flex:none;margin:0 auto}.document-gallery .file-thumbnail>img,.document-gallery .file-thumbnail-fallback{position:absolute;inset:0;width:100%;height:100%}.document-gallery .file-thumbnail-title{font-size:11px}.viewer-meta{font-size:12px;color:#60779b;margin-top:6px;line-height:1.4}.viewer-actions .icon-button{flex-shrink:0}@media(max-width:600px){.document-gallery{gap:12px;padding:18px}.document-gallery .file-thumbnail{max-width:150px}.document-gallery .file-thumbnail-title{font-size:10px;padding:6px 4px}.viewer-meta{font-size:10px}.viewer-actions .icon-button{width:35px;height:35px;min-width:35px;flex-basis:35px;padding:8px!important}}@media(max-width:380px){.document-gallery{gap:8px;padding:12px}.document-gallery .file-thumbnail-title{font-size:9px}.document-gallery .file-thumbnail-fallback svg{width:23px;height:23px}#modal .document-gallery{padding:12px 0}}.document-gallery>.hint{grid-column:1/-1}.tenant-balance{margin-top:18px;padding:20px;border:1px solid #cddcf7;border-radius:16px;background:#f1f6ff}.tenant-balance-heading{display:flex;justify-content:space-between;align-items:center;gap:14px}.tenant-balance-heading h3{font-size:17px}.tenant-balance .eyebrow{font-size:10px;margin-bottom:5px}.tenant-balance-amount{font-size:28px;white-space:nowrap;color:#2859d7}.tenant-balance.pending{background:#fff8ed;border-color:#f5dcb5}.tenant-balance.pending .tenant-balance-amount{color:#a36213}.tenant-balance.settled{background:#eefaf3;border-color:#c4e8d1}.tenant-balance.settled .tenant-balance-amount{color:#22734e}.tenant-balance-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.tenant-balance-totals strong,.tenant-balance-totals small{display:block}.tenant-balance-totals small{font-size:11px;margin-bottom:5px}.tenant-balance-totals strong{font-size:15px}.tenant-balance>.hint{font-size:12px;line-height:1.6;margin-top:10px}.tenant-balance-ledger{margin-top:16px}.tenant-balance-ledger summary{cursor:pointer;font-size:13px;font-weight:650;color:#31599b}.tenant-balance-ledger .table-wrap{margin-top:12px;max-height:340px;overflow:auto;border:1px solid #dce5f4;border-radius:10px;background:white}.tenant-balance-ledger th,.tenant-balance-ledger td{padding:10px;font-size:11px}.tenant-balance-ledger thead th{position:sticky;top:0;background:#eef4ff}.tenant-balance-ledger tfoot{font-weight:650;background:#eef4ff}.tenant-balance.incomplete{background:#fff4e4;border-color:#efd5a8}.tenant-balance.incomplete p{font-size:13px;margin-top:10px}@media(max-width:480px){.tenant-balance{padding:15px}.tenant-balance-heading{align-items:flex-start;flex-direction:column;gap:8px}.tenant-balance-amount{font-size:26px}.tenant-balance-totals{gap:7px}.tenant-balance-totals strong{font-size:12px}.tenant-balance-totals small{font-size:10px}}.tenant-balance-link{font-size:15px;font-weight:750;padding:4px 0;white-space:nowrap}/* En-tête fixe et défilement indépendant du contenu des fenêtres. */
#modal{overflow:hidden;max-height:90vh;max-height:90dvh}#modal[open]{display:flex;flex-direction:column}#modal>.modal-head{flex:0 0 auto;position:relative;z-index:2;box-shadow:0 3px 12px #2547780c}#modal>.modal-head>div{min-width:0}#modal-title{overflow-wrap:anywhere}#modal>#modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}#modal>.modal-head>.close{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;min-width:40px;padding:0;line-height:1;border:1px solid #d4e1f8;border-radius:12px;background:#fff;color:#385f9e;font-size:28px;transition:background .15s,box-shadow .15s}#modal>.modal-head>.close:hover{background:#dfeaff;box-shadow:0 2px 8px #2858cf16}#modal>.modal-head>.close:focus-visible{outline:3px solid #769aff;outline-offset:2px}@media(max-width:600px){#modal{max-height:94vh;max-height:94dvh}#modal>.modal-head{padding:16px 18px}#modal>.modal-head h2{font-size:20px}#modal>#modal-body{padding:18px}}
/* Mobile first: readable fields, compact touch controls, no wide data tables. */
main,.workspace,#content,.panel,.table-wrap,#modal-body{min-width:0}
@media(max-width:1000px){
 .table-wrap:has(>.responsive-table){overflow-x:visible}
 .responsive-table,.responsive-table tbody,.responsive-table tfoot{display:block;width:100%;white-space:normal}
 .responsive-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .responsive-table tbody tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;padding:16px!important;border-bottom:1px solid #e2eaf7}
 .responsive-table tbody td{display:block!important;min-width:0;padding:0!important;border:0!important;white-space:normal!important;overflow-wrap:anywhere;text-align:left!important}
 .responsive-table tbody td::before{content:attr(data-label)!important;display:block!important;color:#607493;font-size:10px;font-weight:600;margin:0 0 4px!important}
 .responsive-table tbody td:first-child{grid-column:1/-1;padding:0!important}
 .responsive-table tbody td:last-child:has(button){grid-column:1/-1}
 .responsive-table tbody td:has(.row-actions)::before,.responsive-table tbody td:has(>.icon-button)::before{display:none!important}
 .responsive-table .person small{white-space:normal;overflow-wrap:anywhere}
 .responsive-table .row-actions{flex-wrap:wrap;justify-content:flex-end}
 .responsive-table tfoot tr{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding:12px;background:#eef4ff}
 .responsive-table tfoot th,.responsive-table tfoot td{padding:0;border:0;font-size:12px;white-space:normal}
 .client-payments-table tbody tr{grid-template-columns:52px minmax(0,1fr) auto;gap:10px}
 .client-payments-table tbody td:first-child{grid-column:auto}
 .client-payments-table tbody td:nth-child(2){grid-column:2}
 .client-payments-table tbody td:nth-child(3){grid-column:1/3;grid-row:2}
 .client-payments-table tbody td:nth-child(4){grid-column:3;grid-row:1;text-align:right!important;font-size:12px}
 .client-payments-table tbody td:last-child:has(button){grid-column:3;grid-row:2;justify-self:end}
 .client-payments-table tbody td:nth-child(3)::before,.client-payments-table tbody td:nth-child(5)::before{display:none!important}
 .client-payments-table .breakdown{font-size:10px}
 .tenant-balance-ledger .table-wrap{overflow-y:auto;overflow-x:visible}
 .tenant-balance-ledger tbody td:first-child{grid-column:1/-1}
 .tenant-balance-ledger tfoot tr{gap:12px}
}
@media(max-width:800px){
 .workspace{padding:20px 12px}.page-head{align-items:flex-start;flex-wrap:wrap;gap:14px}.actions{flex-wrap:wrap;gap:8px;max-width:100%}
 h1{font-size:27px}h2{font-size:18px}#subtitle{font-size:13px}
 .primary,.secondary,.danger{min-height:40px;padding:9px 12px;font-size:12px;white-space:normal}
 .icon-button{width:40px;height:40px;min-width:40px;padding:10px;flex-shrink:0}
 .scope,.scope label{flex-wrap:wrap;min-width:0}.scope select{width:100%;max-width:100%}.scope label{flex:1}
 .panel-head{padding:16px;flex-wrap:wrap}.panel-head>div{min-width:0}.stats{gap:10px}.stat{padding:14px}.stat-value{font-size:clamp(18px,4.6vw,27px);white-space:normal;overflow-wrap:anywhere;letter-spacing:-.5px}
 .index-intro{flex-direction:column;align-items:flex-start;padding:20px}.index-amounts{flex-wrap:wrap}.index-amounts strong{font-size:22px}
 .report-period{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.report-period button{grid-column:1/-1;justify-self:start}
 .unit{flex-wrap:wrap}.unit>div{min-width:0}.unit-rate{margin-left:auto}.card-foot{flex-wrap:wrap;gap:8px}
 .payment-year-controls{flex-wrap:wrap}.payment-year-controls label{max-width:100%;flex-wrap:wrap}.payment-year-controls select{max-width:100%}
 .viewer-head{flex-wrap:wrap;gap:8px}.viewer-head>div:first-child{flex:1 1 150px}.viewer-actions{gap:6px}.viewer-actions .icon-button{width:40px;height:40px;min-width:40px}
 .tenant-balance-totals strong{overflow-wrap:anywhere;white-space:normal}.payments-grand-total{flex-wrap:wrap;gap:10px}
 #modal-body .form-actions{flex-wrap:wrap;gap:8px}#modal-body .form-actions button{flex:1 1 auto}
 input,select,textarea{font-size:16px}header{padding:0 12px;font-size:12px;gap:8px}header .private{font-size:10px;padding:4px 7px}
 .document-gallery{gap:10px;padding:12px}.expense-file-card{max-width:100%}.expense-file-card .file-thumbnail{max-width:100%}
 .word-page{overflow-wrap:anywhere}.word-page table{table-layout:fixed;white-space:normal}.word-page img{max-width:100%}
}
@media(max-width:380px){.client-payments-table tbody tr{padding:12px!important;gap:8px;grid-template-columns:40px minmax(0,1fr) auto}.client-payments-table tbody td{font-size:11px}.client-payments-table .badge{font-size:10px}.stat small{font-size:11px}.nav-button{min-height:68px;font-size:11px;padding:8px 5px}.nav-button svg{width:26px;height:26px;flex-basis:26px}.tenant-balance{padding:12px}#modal>#modal-body{padding:12px}}
@media(max-width:1000px){table.responsive-table{min-width:0!important;max-width:100%}.client-payments-table tbody td:last-child{width:auto}.client-payments-table .icon-button{width:40px;height:40px;min-width:40px}}
/* Versements : deux colonnes équilibrées et texte lisible. */
@media(max-width:1000px){
 .client-payments-table tbody tr{grid-template-columns:minmax(0,1fr) auto!important;gap:8px 14px!important;padding:14px!important;align-items:start}
 .client-payments-table tbody td:first-child{grid-column:1;grid-row:1;font-size:16px;font-weight:700;align-self:start}
 .client-payments-table tbody td:first-child::before{display:none!important}
 .client-payments-table tbody td:nth-child(2){grid-column:1;grid-row:2;font-size:14px;line-height:1.4}
 .client-payments-table tbody td:nth-child(2)::before{display:none!important}
 .client-payments-table tbody td:nth-child(2) br{display:none}
 .client-payments-table tbody td:nth-child(2) .breakdown{font-size:12px;line-height:1.4;margin:3px 0 9px;color:#425b80}
 .client-payments-table tbody td:nth-child(3){grid-column:1;grid-row:3}
 .client-payments-table tbody td:nth-child(4){grid-column:2;grid-row:1;font-size:16px;align-self:start}
 .client-payments-table tbody td:nth-child(4)::before{display:none!important}
 .client-payments-table tbody td:last-child:has(button){grid-column:2;grid-row:2;align-self:end;justify-self:end}
 .client-payments-table .badge{font-size:12px;padding:5px 9px}
 .client-payments-table .payment-receiver{font-size:12px}
 .payment-year-heading>strong{font-size:18px}.payment-year-heading small{font-size:12px}.payment-year-summary-total{font-size:16px}
 .payment-year-controls label,.payment-year-controls select{font-size:14px}
 .client-payment-history>.hint{font-size:13px;line-height:1.5;margin-bottom:12px}
 .client-payments-table tfoot th,.client-payments-table tfoot td{font-size:14px}
}

.payment-date-badge,.rent-month-badge{display:inline-flex;align-items:center;border:1px solid #d7e3f8;background:#edf3ff;color:#284d91;border-radius:9px;padding:5px 9px;line-height:1.35;white-space:normal}
.payment-date-badge{font-size:15px;font-weight:750;background:#dfeaff;border-color:#c6d9fb}
.rent-month-badge{font-size:13px;font-weight:600}
.payment-covered-month{display:block;margin:0 0 8px}.payment-covered-month:last-child{margin-bottom:0}
.payment-covered-month .breakdown{margin:4px 0 0!important}

/* Compact top navigation, one accessible icon per page. */
@media(max-width:800px){
 aside{padding:14px 10px 10px}
 #nav{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0;margin:12px 0 0;overflow:visible}
 #nav .nav-button,#nav .nav-button.active,#nav .nav-button:hover{border:0;background:transparent;box-shadow:none;min-height:44px;height:44px;padding:4px;margin:0;gap:0;justify-content:center;border-radius:9px;transform:none}
 #nav .nav-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #nav .nav-button svg{width:32px;height:32px;flex:0 0 32px;padding:6px;border-radius:9px}
 #nav .nav-button.active svg{background:#315ee4;color:white;box-shadow:0 3px 8px #315ee425}
 #nav .nav-button:hover svg{outline:2px solid #9bb9f4;outline-offset:1px}
}
/* Barre de navigation compacte persistante sur smartphone et tablette. */
@media(max-width:800px){
 #app>aside{position:sticky;top:0;z-index:20;padding:6px 10px;background:#e0eaff;border-bottom:1px solid #cbdaf4;box-shadow:0 3px 12px #183d8110}
 #app>aside>.brand{display:none}
 #nav{margin:0}
}

/* Titre de page dans le bandeau, couleur partagée avec la navigation active. */
.page-banner{background:#162b50;min-height:66px;height:auto;padding:16px 28px}
.page-banner #breadcrumb{color:white;font-size:28px;font-weight:750;line-height:1.2;letter-spacing:-.5px;overflow-wrap:anywhere}
.workspace>.page-head>div:first-child>.eyebrow{display:none}
.workspace>.page-head #subtitle{margin-top:0}
@media(max-width:800px){
 .page-banner{padding:14px 16px;min-height:60px}
 .page-banner #breadcrumb{font-size:26px}
 #nav .nav-button.active{background:#162b50;border-radius:10px 10px 0 0;box-shadow:none;color:white}
 #nav .nav-button.active svg{background:transparent;color:white;box-shadow:none}
 #app>aside{padding-bottom:0}
}
/* Versements compacts : date à gauche, mois au centre, montant à droite. */
@media(max-width:1000px){
 .client-payments-table tbody tr{grid-template-columns:auto minmax(0,1fr) auto!important;gap:8px 12px!important;padding:12px!important;align-items:start}
 .client-payments-table tbody td:first-child{grid-column:1;grid-row:1}
 .client-payments-table tbody td:nth-child(2){grid-column:2;grid-row:1 / span 2}
 .client-payments-table tbody td:nth-child(3){grid-column:1;grid-row:2;align-self:end}
 .client-payments-table tbody td:nth-child(4){grid-column:3;grid-row:1}
 .client-payments-table tbody td:last-child:has(button){grid-column:3;grid-row:2;align-self:end}
 .payment-covered-month{margin-bottom:6px}.rent-month-badge{font-size:12px;padding:4px 7px}
 .client-payments-table tbody td:nth-child(2) .breakdown{font-size:11px;margin:3px 0 0!important}
 .client-payments-table .payment-receiver{max-width:85px;overflow-wrap:anywhere;font-size:10px}
}
@media(max-width:380px){
 .client-payments-table tbody tr{gap:7px!important;padding:10px!important}
 .client-payments-table tbody td:nth-child(4){font-size:13px}
 .payment-date-badge{font-size:13px;padding:4px 6px}
 .rent-month-badge{font-size:11px;padding:4px 6px}
 .client-payments-table .badge{font-size:10px;padding:4px 6px}
}

/* Versements : en-tête court et couverture en pastilles sur la ligne suivante. */
@media(max-width:1000px){
 .client-payments-table tbody tr{grid-template-columns:auto minmax(0,1fr) auto auto!important;gap:7px 8px!important;padding:10px 12px!important;align-items:center}
 .client-payments-table tbody td:first-child{grid-column:1;grid-row:1;align-self:center}
 .client-payments-table tbody td:nth-child(3){grid-column:2;grid-row:1;align-self:center}
 .client-payments-table tbody td:nth-child(4){grid-column:3;grid-row:1;align-self:center;font-size:15px}
 .client-payments-table tbody td:last-child:has(button){grid-column:4;grid-row:1;align-self:center}
 .client-payments-table tbody td:nth-child(2){grid-column:1/-1;grid-row:2;display:flex!important;flex-wrap:wrap;gap:6px;font-size:12px}
 .payment-date-badge{font-size:13px;padding:4px 7px;background:#edf3ff;border:0;border-radius:7px}
 .client-payments-table .badge{font-size:10px;padding:4px 7px}
 .client-payments-table .icon-button{width:32px;height:32px;min-width:32px;padding:7px!important;background:transparent;border:0}
 .client-payments-table .payment-receiver{max-width:none;font-size:10px}
 .payment-covered-month{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px;margin:0;padding:4px 7px;background:#edf8f2;border:1px solid #d2eade;border-radius:7px;color:#216548}
 .payment-covered-month.coverage-partial{background:#fff6e8;border-color:#f3dfbd;color:#865b1d}
 .payment-covered-month .rent-month-badge{border:0;background:transparent;color:inherit;padding:0;font-size:12px;line-height:1.4}
 .client-payments-table tbody td:nth-child(2) .breakdown{display:inline;font-size:11px;margin:0!important;color:inherit}
 .payment-covered-month .breakdown:before{content:'· ';font-weight:600}
}
@media(max-width:380px){.client-payments-table tbody tr{padding:9px!important;gap:6px!important}.client-payments-table tbody td:nth-child(4){font-size:13px}.payment-covered-month .rent-month-badge{font-size:11px}}
/* Connexion proportionnée au téléphone, y compris avec le clavier ouvert. */
#auth{min-height:100vh;min-height:100dvh;padding:clamp(16px,5vw,40px);display:flex;align-items:center;justify-content:center}
#auth .auth-card{width:100%;max-width:420px;min-width:0;padding:clamp(22px,6vw,36px);margin:0;border-radius:20px}
#auth .brand{font-size:28px;gap:10px}
#auth .brand b{width:38px;height:38px;font-size:24px}
#auth-title{font-size:clamp(24px,6.5vw,30px);line-height:1.2;overflow-wrap:anywhere}
#auth-description{font-size:15px;line-height:1.5}
#auth-form{width:100%;min-width:0}
#auth-form input{font-size:16px;min-height:46px}
#auth-button{width:100%;min-height:46px;font-size:15px}
#auth-error{overflow-wrap:anywhere}
#auth .auth-card>small{font-size:12px}
@media(max-height:500px){#auth{align-items:flex-start;padding-top:16px;padding-bottom:16px}#auth .auth-card{padding:20px}#auth .brand{margin-bottom:16px}}
/* Navigation inférieure sur smartphone, avec prise en compte de la zone sûre. */
@media(max-width:600px){
 #app>aside{position:fixed;top:auto;bottom:0;left:0;right:0;width:100%;z-index:20;padding:6px 4px calc(6px + env(safe-area-inset-bottom,0px));border-top:1px solid #cbdaf4;border-bottom:0;box-shadow:0 -3px 16px #183d8118}
 #app>aside #nav{margin:0;grid-template-columns:repeat(7,minmax(0,1fr))}
 #nav .nav-button.active{border-radius:10px}
 #app>main{padding-bottom:calc(68px + env(safe-area-inset-bottom,0px))}
 #toast{bottom:calc(76px + env(safe-area-inset-bottom,0px))}
}

.document-folders{display:flex;flex-wrap:wrap;gap:8px;padding:16px}.folder-chip{display:inline-flex;align-items:center;gap:7px;border:1px solid #d6e2f7;border-radius:10px;background:#f2f6ff;padding:9px 11px;font-size:13px;color:#31538b}.folder-chip svg{width:18px;height:18px}.folder-chip.active{background:#285bd9;color:white;border-color:#285bd9}.folder-chip.active small{color:white}.folder-tools{display:flex;gap:10px;padding:0 16px}.viewer-folder{font-size:12px;margin-top:8px;max-width:260px}.viewer-folder select{font-size:14px;padding:6px 9px}

#mfa-form{display:grid;gap:14px;margin-top:20px}#mfa-form input{font-size:16px;min-height:44px}#mfa-form .primary,#recovery-done{width:100%;min-height:44px}#mfa-secret,#recovery-codes{font-family:monospace}#mfa-enrollment{padding:14px;background:#eff4ff;border:1px solid #d4e2fb;border-radius:12px}#mfa-enrollment p{font-size:13px;margin-bottom:12px}#mfa-enrollment label{margin-bottom:12px}#recovery-panel{display:grid;gap:14px;margin-top:18px}#recovery-panel p{font-size:13px}.permission-grid{display:grid;gap:10px}.permission-grid label{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:10px}.permission-grid select{width:160px}.user-list{display:grid;gap:12px;padding:16px}.user-card{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px;border:1px solid #dce5f5;border-radius:12px}.user-card>div{min-width:0;overflow-wrap:anywhere}.user-card small{display:block;margin-top:5px}.account-name{font-size:12px;color:#456593;margin-top:6px}.security-audit-list{display:grid;gap:10px}.security-audit-list article{padding:12px;border:1px solid #dce5f5;border-radius:9px;font-size:13px;overflow-wrap:anywhere}@media(max-width:800px){#nav{grid-template-columns:repeat(auto-fit,minmax(30px,1fr))!important}.permission-grid label{font-size:13px}.permission-grid select{width:145px}.user-list{padding:12px}}

#mfa-qr{display:block;width:min(240px,100%);height:auto;margin:12px auto 16px;background:white;border-radius:8px}#mfa-enrollment .authenticator-open{display:flex;text-align:center;justify-content:center;align-items:center;text-decoration:none;white-space:normal;font-size:14px;padding:10px 12px;min-height:44px;margin-bottom:12px}#mfa-enrollment{min-width:0}#mfa-open-help{line-height:1.5}

.payment-covered-month{display:block;min-width:0;padding:7px 9px;border-radius:8px;border:1px solid #d2eade;background:#edf8f2;color:#216548}.payment-covered-month.coverage-partial{background:#fff6e8;border-color:#f3dfbd;color:#865b1d}.allocation-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:3px 12px}.payment-covered-month .rent-month-badge{padding:0;border:0;background:transparent;color:inherit;font-size:13px}.allocation-amount{font-size:14px;white-space:nowrap}.allocation-amount small{font-size:11px;font-weight:500;color:inherit}.allocation-due{display:block;font-size:11px;color:inherit;margin-top:2px}.client-payments-table tbody td:nth-child(2){min-width:0}@media(max-width:800px){.client-payments-table tbody td:nth-child(2){display:grid!important;grid-template-columns:1fr;gap:5px}.payment-covered-month{margin:0;padding:5px 8px;width:100%}.allocation-heading{flex-wrap:nowrap}.allocation-amount{font-size:13px}.allocation-due{font-size:11px}}

.payment-options{padding:10px 12px;border:1px solid var(--line);border-radius:10px}.payment-options summary{font-size:13px;font-weight:600;cursor:pointer}.payment-options[open] summary{margin-bottom:12px}

.language-switch{position:fixed;right:12px;top:12px;z-index:8;display:flex;gap:2px;padding:3px;border:1px solid #cbd8ed;border-radius:9px;background:#fff;box-shadow:0 2px 8px #142b5114}.language-switch button{border:0;border-radius:6px;background:transparent;color:#385782;font-size:12px;font-weight:700;min-width:30px;height:28px;padding:2px 6px}.language-switch button[aria-pressed="true"]{background:#182947;color:#fff}.page-banner{padding-right:100px!important}#auth{padding-top:62px!important}@media(max-width:800px){.language-switch{top:max(8px,env(safe-area-inset-top));right:8px}.page-banner h1{font-size:clamp(20px,6vw,28px)}}

.payment-attachments .secondary{display:inline-flex;align-items:center;gap:7px}.payment-attachments svg,.payment-receipt-row svg{width:18px;height:18px;flex-shrink:0}.payment-attachments .hint{font-size:12px;margin-top:7px}.payment-receipts{min-width:0}.payment-receipts h3{font-size:15px;margin-bottom:8px}.payment-receipt-row{border:1px solid var(--line);border-radius:9px;padding:9px;margin-top:7px;overflow-wrap:anywhere}.payment-receipt-row>.text-button{display:flex;align-items:center;gap:6px;text-align:left}.payment-receipt-controls{display:flex;align-items:center;gap:12px;margin-top:6px}.payment-receipt-controls .secondary{font-size:12px;padding:6px 10px}.payment-receipt-controls label{flex-direction:row;align-items:center;font-size:12px}.payment-receipt-controls input{width:16px;height:16px}.payment-receipt-row small{font-size:12px}

.building-permissions{padding:12px;border:1px solid var(--line);border-radius:10px}.building-permissions label{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:13px}.building-permissions input{width:17px;height:17px;flex-shrink:0}.building-permissions-list{display:grid;gap:8px;margin-top:10px}.building-permissions .hint{margin-top:10px;font-size:12px}
fieldset.building-permissions{display:block;min-width:0;max-width:100%;width:100%}.building-permissions-list{display:grid;grid-template-columns:minmax(0,1fr);width:100%;min-width:0}.building-permissions label{width:100%;min-width:0;justify-content:flex-start;flex-wrap:nowrap;overflow-wrap:anywhere}.building-permissions .hint{width:100%}.permission-grid{min-width:0}.permission-grid label{display:grid;grid-template-columns:minmax(0,1fr) 145px;min-width:0}.permission-grid select{width:100%;min-width:0}@media(max-width:480px){.permission-grid label{grid-template-columns:minmax(0,1fr) 125px;font-size:12px}.building-permissions label{font-size:12px}}

.permission-grid select{font-size:12px;padding:9px 7px}

.building-rights-card{border:1px solid var(--line);border-radius:11px;margin-top:10px;min-width:0}.building-rights-card summary{padding:12px;cursor:pointer;background:#eef3ff;border-radius:10px}.building-rights-card summary label{display:flex;flex-direction:row;align-items:center;gap:8px}.building-rights-card summary input{width:17px;height:17px;flex-shrink:0}.building-rights-fields{padding:12px;min-width:0}
.building-card:nth-child(3n+1)>.panel-head{background:#213f73}.building-card:nth-child(3n+2)>.panel-head{background:#563a7d}.building-card:nth-child(3n+3)>.panel-head{background:#225f50}.building-card>.panel-head,.building-card>.panel-head h2,.building-card>.panel-head p,.building-card>.panel-head .text-button{color:#fff}.building-card>.panel-head .text-button:hover{background:#ffffff20}.building-card .panel-head .building-heading .stat-icon{background:#ffffff20;color:#fff}.building-card>.panel-head .text-button:focus-visible{outline-color:#fff}
.building-rights-fields .permission-grid label{grid-template-columns:minmax(0,1fr) 145px}

.water-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.water-heading h3{min-width:0;overflow-wrap:anywhere}.water-heading label{width:100px;flex-shrink:0}.water-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:16px 0}.water-stats>div{padding:12px;border-radius:10px;background:#edf3ff;min-width:0}.water-stats small{display:block;font-size:12px}.water-stats strong{display:block;font-size:20px;margin-top:6px;overflow-wrap:anywhere}.water-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.water-actions button{font-size:12px;padding:8px 10px}.water-readings article{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.water-readings small{display:block;overflow-wrap:anywhere}.water-settlement{padding:15px;border:1px solid var(--line);border-radius:12px;margin-top:12px}.water-settlement dl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 12px;font-size:13px}.water-settlement dt{color:var(--muted)}.water-settlement dd{margin:0;font-weight:600;text-align:right;white-space:nowrap}.water-settlement .total{font-size:14px}.water-explanation{font-size:12px;line-height:1.6;margin-top:16px}

.context-add{position:fixed;right:25px;bottom:25px;width:48px;height:48px;display:grid;place-items:center;border-radius:50%;padding:12px;z-index:5;box-shadow:0 4px 16px #183d6c33}.context-add svg{width:23px;height:23px}.settings-menu{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}.settings-menu button{display:flex;align-items:center;gap:8px;font-size:13px}.settings-menu svg{width:18px;height:18px}.settings-menu .active{background:#182c50;color:white;border-color:#182c50}.settings-panel>.hint{padding:18px}.settings-panel>.settings-menu{padding:0 18px 18px}.panel-head:has(.month-selector){flex-wrap:wrap;gap:12px}.panel-head .month-selector{font-size:12px;width:210px;max-width:100%}.payment-receipts{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end;margin-top:6px}.payment-receipt{padding:0;border:1px solid #cbdcf7;border-radius:5px;background:#fff;overflow:hidden;width:30px;height:38px;flex:0 0 30px}.payment-receipt .file-thumbnail{width:28px;height:36px;border-radius:0;border:0;min-width:0}.payment-receipt .file-thumbnail-title{display:none}.payment-receipt .file-thumbnail-fallback svg{width:16px;height:16px}.payment-receipt .file-thumbnail-fallback small{font-size:6px}.payment-receipt:focus-visible{outline:3px solid #315ee4;outline-offset:2px}#viewer-back{font-size:12px;padding:7px 10px}@media(max-width:800px){.context-add{bottom:calc(80px + env(safe-area-inset-bottom));right:16px}.settings-menu button{flex:1;justify-content:center;font-size:12px;padding:8px}.workspace{padding-top:16px}}

.stat.balance-positive{background:#fee2e2;border-color:#f4b6b6}.stat.balance-positive .stat-label,.stat.balance-positive small,.stat.balance-positive .stat-value{color:#9f2020}.stat.balance-positive .stat-icon{background:#f9bcbc;color:#9f2020}.stat.balance-negative{background:#ffedd5;border-color:#fac78c}.stat.balance-negative .stat-label,.stat.balance-negative small,.stat.balance-negative .stat-value{color:#99480e}.stat.balance-negative .stat-icon{background:#fed2a3;color:#99480e}.stat.balance-zero{background:#dcfce7;border-color:#a9e4bd}.stat.balance-zero .stat-label,.stat.balance-zero small,.stat.balance-zero .stat-value{color:#166534}.stat.balance-zero .stat-icon{background:#b3ebc5;color:#166534}.stat.balance-unknown{background:#f1f3f7;border-color:#d9dee8}

.stat-open{display:block;width:100%;border:0;background:none;padding:0;text-align:left;color:inherit}.stat-open:hover .stat-value{text-decoration:underline;text-underline-offset:3px}.monthly-payment-link{font-size:inherit;font-weight:700;padding:2px 0;text-decoration:underline;text-underline-offset:3px}.month-payment-list{display:grid;gap:10px}.month-payment-item{display:flex;align-items:center;gap:12px;width:100%;padding:14px;border:1px solid #d3e0f7;border-radius:10px;background:#f4f8ff;text-align:left;color:var(--ink)}.month-payment-item>span{flex:1;min-width:0;overflow-wrap:anywhere}.month-payment-item small{display:block}.month-payment-item>strong{white-space:nowrap}.month-payment-item svg{width:19px;height:19px;flex-shrink:0}.payment-popup-back{display:flex;gap:8px;align-items:center;margin-bottom:16px;padding:4px 0}.payment-popup-back svg{width:18px;height:18px}.payment-popup-summary{padding:16px;background:#edf4ff;border-radius:12px}.payment-popup-summary>strong{display:block;font-size:26px;margin:6px 0}.payment-popup-note{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:14px}#modal-body:has(.payment-popup-summary)>.payment-receipts{justify-content:flex-start}
@media(max-width:800px){#app[data-page="overview"] .stats{gap:7px;margin-bottom:16px}#app[data-page="overview"] .stat{padding:9px 10px;border-radius:12px}#app[data-page="overview"] .stat-label{font-size:11px;line-height:1.2;margin-bottom:3px}#app[data-page="overview"] .stat-value{font-size:19px;line-height:1.25}#app[data-page="overview"] .stat small,#app[data-page="overview"] .stat-icon{display:none}#app:is([data-page="overview"],[data-page="payments"]) .scope{position:sticky;top:0;z-index:25;display:flex;flex-wrap:nowrap;align-items:center;gap:6px;padding:8px 0;margin:0 0 12px;background:#f3f6fc;border-bottom:1px solid #d5e1f6;box-shadow:0 4px 8px #183d8110}#app:is([data-page="overview"],[data-page="payments"]) .scope>label{flex:0 0 40%;width:40%;display:block;font-size:0;min-width:0}#app:is([data-page="overview"],[data-page="payments"]) .scope select{font-size:12px;width:100%;max-width:100%;height:42px;padding:8px 5px;text-overflow:ellipsis}#app:is([data-page="overview"],[data-page="payments"]) .scope>.month-selector{flex:1;min-width:0;width:auto;display:flex;height:42px;gap:0;padding:0}#app:is([data-page="overview"],[data-page="payments"]) .scope .month-selector input{font-size:12px;flex:1;width:0;min-width:0;padding:5px 2px}#app:is([data-page="overview"],[data-page="payments"]) .scope .month-selector button{flex:0 0 28px;min-width:28px;width:28px;height:40px;padding:0;font-size:21px}#app:is([data-page="overview"],[data-page="payments"]) .scope>span,#app:is([data-page="overview"],[data-page="payments"]) .scope>[data-action="reload"]{display:none}}

#app[data-page="payments"] .scope{position:sticky;top:0;z-index:25;background:#f3f6fc;display:flex;align-items:center;flex-wrap:nowrap;gap:8px;padding:8px 0;border-bottom:1px solid #d5e1f6}#app[data-page="payments"] .scope>span,#app[data-page="payments"] .scope>[data-action="reload"],#app[data-page="payments"] .context-add{display:none}#scope-payment{font-size:12px;white-space:nowrap;min-height:42px;padding:8px 12px}.balance-tenant-list{border-radius:12px;padding:8px 12px}.balance-tenant-list.balance-positive{background:#fee2e2;color:#9f2020}.balance-tenant-list.balance-negative{background:#ffedd5;color:#99480e}.balance-tenant-list.balance-zero{background:#dcfce7;color:#166534}.balance-tenant-list.balance-unknown{background:#f1f3f7}.balance-tenant-row{display:flex;gap:8px;align-items:center;padding:12px 0;border-bottom:1px solid #ffffffb0;font-size:12px;min-width:0}.balance-tenant-row:last-child{border:0}.balance-location{flex:1;min-width:0;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.balance-person{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.balance-tenant-row button,.balance-tenant-row>strong{flex:none;white-space:nowrap;font-size:12px;color:inherit;font-weight:700;padding:4px 0}.balance-tenant-row button{text-decoration:underline;text-underline-offset:3px}.balance-list-hint{margin-top:14px}@media(max-width:800px){#app[data-page="payments"] .scope{gap:4px}#app[data-page="payments"] .scope>label{flex-basis:28%;width:28%}#app[data-page="payments"] #scope-payment{flex:0 0 auto;font-size:10px;padding:8px 5px}#app[data-page="payments"] .scope>.month-selector{flex:1;min-width:0}#app[data-page="payments"] .scope .month-selector button{flex-basis:25px;width:25px;min-width:25px}.balance-tenant-list{padding:5px 8px}.balance-tenant-row{gap:5px;font-size:11px}.balance-tenant-row button,.balance-tenant-row>strong{font-size:11px}}

.tenant-name{font:inherit;font-weight:inherit;color:inherit;padding:0;border:0;background:none;text-align:left;max-width:100%;text-decoration:underline;text-decoration-color:#7d99c455;text-underline-offset:3px}.tenant-name:hover{color:#2859c7}.payments-mobile{display:none}.month-payment-item>button{display:flex;align-items:center;gap:8px;font-weight:700;white-space:nowrap}.month-payment-item>button svg{width:18px;height:18px}@media(max-width:800px){#app[data-page="payments"] .payments-desktop{display:none}#app[data-page="payments"] .payments-mobile{display:block;padding:0 10px}.payment-mobile-row{display:flex;align-items:center;gap:6px;min-height:46px;padding:8px 0;border-bottom:1px solid var(--line);font-size:12px}.payment-mobile-row:last-child{border:0}.payment-mobile-row time{flex:0 0 34px;font-weight:600;color:#506b96}.payment-mobile-row .tenant-name{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:650}.payment-mobile-mode{flex:0 0 18px;line-height:0;color:#4166a3}.payment-mobile-mode svg{width:18px;height:18px}.payment-mobile-amount{flex:none;white-space:nowrap;font-size:12px;font-weight:750;padding:4px 0;text-decoration:underline;text-underline-offset:3px}.balance-person .tenant-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

.stat-clickable{display:block;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer}.stat-clickable:hover{box-shadow:0 4px 18px #17345622}.stat-clickable:focus-visible{outline:3px solid #315ee4;outline-offset:3px}.payment-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:17px 20px;border-top:1px solid #dbe5f6;background:#edf3ff}.payment-totals span{display:block;font-size:12px;color:#45618e}.payment-totals strong{display:block;font-size:20px;color:#214a94;white-space:nowrap}.payment-totals>div:first-child strong{color:#172e54}.overview-tenant-list{padding:5px 14px;border-radius:12px}.overview-tenant-list.expected-list{background:#e4edff}.overview-tenant-list.active-list{background:#eee5ff}.overview-tenant-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid #ffffffa0}.overview-tenant-row:last-child{border:0}.overview-tenant-row>div{min-width:0}.overview-tenant-row small{display:block;font-size:11px;margin-top:4px}.overview-tenant-row>strong{white-space:nowrap;font-size:14px}@media(max-width:800px){.payment-totals{padding:12px 10px;gap:7px}.payment-totals span{font-size:11px}.payment-totals strong{font-size:16px}}

.rent-tracking-mobile{display:none}@media(max-width:800px){#app[data-page="overview"] .rent-tracking-desktop{display:none}.rent-tracking-mobile{display:grid;gap:7px;padding:10px}.rent-mobile-row{padding:9px 10px;border:1px solid #f2bcbc;border-radius:10px;background:#fee2e2;color:#762a2a;display:grid;gap:5px;min-width:0}.rent-mobile-row.paid{background:#dcfce7;border-color:#afe2bf;color:#185937}.rent-mobile-row.checking{background:#fff1d9;border-color:#f4d7a5;color:#845d24}.rent-mobile-line{display:flex;align-items:center;justify-content:space-between;gap:7px;font-size:11px;line-height:1.35;min-width:0;white-space:nowrap}.rent-mobile-line>span{min-width:0}.rent-mobile-line strong{font-weight:750}.rent-mobile-top{font-size:12px}.rent-mobile-top .tenant-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:750}.rent-mobile-top>span{flex:1;text-align:right;overflow:hidden;text-overflow:ellipsis;font-size:10px}.rent-mobile-row .monthly-payment-link{font-size:11px;color:inherit;line-height:inherit;padding:0}.rent-mobile-status{font-size:11px;white-space:nowrap}}

.payment-totals{grid-template-columns:1.4fr 1fr 1fr;align-items:center;background:#f7f9fc}.payment-totals>div:first-child{padding:10px 12px;border-radius:10px;background:#dfeaff}.payment-totals>div:first-child span{font-size:12px;font-weight:750;color:#244987}.payment-totals>div:first-child strong{font-size:26px;font-weight:800;color:#183d81}.payment-totals>div:not(:first-child) span{font-size:11px;font-weight:400;color:#68788f}.payment-totals>div:not(:first-child) strong{font-size:14px;font-weight:500;color:#68788f}@media(max-width:800px){.payment-totals>div:first-child{padding:8px}.payment-totals>div:first-child strong{font-size:21px}.payment-totals>div:not(:first-child) span{font-size:10px}.payment-totals>div:not(:first-child) strong{font-size:12px}}

.water-file-thumbnails{display:flex;gap:5px;margin-top:6px;flex-wrap:wrap}.water-reading-attachments #water-selected-files .file-thumbnail{width:40px;height:50px;flex:0 0 40px}.water-reading-attachments #water-selected-files .file-thumbnail-title{display:none}.water-reading-attachments #water-selected-files .selected-file-cards{display:block}.water-reading-attachments #water-selected-files .selected-file-cards li{display:flex;gap:8px;margin-top:6px}

/* Compact active tenants grouped by building. */
.tenant-building-list{display:grid;gap:16px}.tenant-building-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:#192f55;color:#fff}.tenant-building-head h2{font-size:17px;overflow-wrap:anywhere}.tenant-building-head small{color:#dce6ff;white-space:nowrap}.tenant-summary-row{display:flex;align-items:center;gap:12px;min-height:54px;padding:10px 18px;border-top:1px solid var(--line)}.tenant-summary-name{flex:1;min-width:0;font-size:14px;font-weight:750}.tenant-summary-name .tenant-name{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:750}.tenant-summary-unit{flex:none;font-size:13px;font-weight:650;color:#516689;font-variant-numeric:tabular-nums}.tenant-summary-balance{flex:none;border:0;background:none;padding:5px 0 5px 4px;text-align:right;font-size:15px;font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums}.tenant-summary-row.due .tenant-summary-balance{color:#b42338}.tenant-summary-row.settled .tenant-summary-balance{color:#157347}.tenant-summary-row.unknown .tenant-summary-balance{color:#7b642b;font-size:12px}.tenant-summary-row .icon-button{flex:none;width:28px;height:28px;min-height:28px;padding:5px}.tenant-summary-row .icon-button svg{width:16px;height:16px}@media(max-width:800px){.tenant-building-list{gap:12px}.tenant-building-head{padding:11px 12px}.tenant-building-head h2{font-size:15px}.tenant-building-head small{font-size:11px}.tenant-summary-row{min-height:48px;padding:8px 10px;gap:7px}.tenant-summary-name{font-size:12px}.tenant-summary-unit{font-size:11px}.tenant-summary-balance{font-size:12px}.tenant-summary-row.unknown .tenant-summary-balance{font-size:10px}}

.tenant-summary-row.due{background:#fee2e2}.tenant-summary-row.settled{background:#dcfce7}.tenant-summary-row.unknown{background:#fff1d9}@media(max-width:800px){#app[data-page="payments"] #scope-payment{display:none}#app[data-page="payments"] .context-add{display:grid}#app[data-page="payments"] .scope>label{flex-basis:42%;width:42%}}

.water-overview{margin-top:20px}.water-empty{padding:16px}.water-receivable-row,.water-reading-line,.water-payment-line{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid var(--line);font-size:13px}.water-receivable-row .tenant-name{flex:1;min-width:0;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.water-receivable-row time,.water-receivable-row>span,.water-receivable-row>strong{white-space:nowrap}.water-receivable-row>strong{color:#b42338;text-align:right}.water-tenant-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.water-tenant-toolbar>div{display:flex;gap:6px}.water-tenant-toolbar svg{width:18px;height:18px}.water-reading-line{padding:9px 0}.water-reading-line>strong{margin-left:auto;white-space:nowrap}.water-reading-line .icon-button{width:28px;height:28px;padding:5px}.water-reading-line .water-file-thumbnails{margin:0;display:flex;flex-wrap:wrap;gap:3px;max-width:90px}.water-client-summary .text-button{display:inline-flex;gap:5px;align-items:center;padding:2px 0;font-size:12px}.water-client-summary svg{width:14px;height:14px}.water-payment-history{margin-top:12px}.water-payment-line{padding:9px 0}.water-payment-line strong{margin-left:auto}.water-settlement>button{margin-top:10px}#water-calculation-preview{white-space:normal;display:block;font-size:13px;line-height:1.7}@media(max-width:600px){.water-receivable-row{gap:6px;font-size:10px;padding:10px}.water-receivable-row .tenant-name{font-size:11px}.water-receivable-row time{max-width:66px;white-space:normal}.water-tenant-toolbar{font-size:12px}.water-tenant-toolbar .secondary{font-size:11px;padding:8px}.water-reading-line{gap:7px;font-size:12px}.water-reading-line .water-file-thumbnails{max-width:60px}}

.payment-tenant-filter{font-size:12px;min-width:180px;max-width:260px}.payment-tenant-filter select{font-size:13px;padding:8px 10px}@media(max-width:800px){.panel-head:has(.payment-tenant-filter){flex-wrap:wrap;gap:10px}.payment-tenant-filter{width:100%;max-width:none;flex-direction:row;align-items:center;gap:9px}.payment-tenant-filter select{flex:1;min-width:0;font-size:12px}}

/* Align unit amounts and separate monthly totals from the charge breakdown. */
.building-card .unit{display:grid;grid-template-columns:minmax(0,1fr) 240px;align-items:start;gap:18px;padding:18px 0}.building-card .unit-info{min-width:0}.building-card .unit-info h3{line-height:1.65}.building-card .unit-info p{font-size:12px;margin-top:6px}.building-card .unit-rate{display:block;width:100%;min-width:0;margin:0;white-space:normal}.unit-monthly-total{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#edf3ff;border-radius:8px;padding:7px 10px}.unit-monthly-total>span{font-size:11px;color:#48638c}.building-card .unit-monthly-total>strong{font-size:16px;font-weight:750;color:#1f467f;white-space:nowrap;font-variant-numeric:tabular-nums}.unit-charge-details{margin:8px 10px 0;display:grid;gap:3px;font-size:12px;color:#596d89}.unit-charge-details>div{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:12px;align-items:baseline}.unit-charge-details dt{min-width:0;overflow-wrap:anywhere}.unit-charge-details dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.unit-inclusive{display:block;margin:6px 10px 0;text-align:right;font-size:12px}.building-card .unit-tools{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:9px}.building-card .unit-tools button{display:inline-flex;align-items:center;justify-content:center;margin:0}.building-card .unit-tools .text-button{padding:5px 7px;font-size:12px}.building-card .unit-tools .icon-button{width:30px;height:30px;padding:6px}.building-card .unit-tools svg{width:17px;height:17px}@media(max-width:600px){.building-card .unit{grid-template-columns:minmax(0,1fr);gap:10px;padding:15px 0}.building-card .unit-list{padding:0 14px}.building-card .unit-info h3{font-size:14px}.unit-monthly-total{padding:7px 10px}.unit-charge-details{font-size:11px;gap:2px}.building-card .unit-tools{margin-top:6px}.unit-inclusive{font-size:11px}}

.water-quote-preview{border:1px solid #d6e3fa;border-radius:10px;padding:12px;background:#f6f9ff;font-size:13px}.water-quote-preview>p{margin-bottom:10px}.water-quote-preview dl{margin:0 0 12px;display:grid;gap:7px}.water-quote-preview dl>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.water-quote-preview dt{color:var(--muted)}.water-quote-preview dd{margin:0;font-weight:700;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.water-quote-preview .total{gap:10px;font-size:13px}.water-quote-preview .total strong{white-space:nowrap}

.tenant-current-rate{margin-top:14px;padding-top:12px;border-top:1px solid #ccdafa}.tenant-current-rate-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.tenant-current-rate-title>strong{font-size:12px;color:#345584}.tenant-current-rate-title>small{font-size:11px}.tenant-current-rate-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.tenant-current-rate-values>div{display:flex;flex-direction:column;gap:3px;padding:6px 0;min-width:0}.tenant-current-rate-values small{font-size:11px;line-height:1.4}.tenant-current-rate-values strong{font-size:17px;white-space:nowrap;font-variant-numeric:tabular-nums}.tenant-current-rate-values .tenant-current-rate-total{border-left:1px solid #ccdafa;padding-left:12px}.tenant-current-rate-total strong{color:#2458d5}@media(max-width:480px){.tenant-current-rate-title{align-items:start}.tenant-current-rate-title>strong{font-size:11px}.tenant-current-rate-title>small{font-size:10px;white-space:nowrap}.tenant-current-rate-values{gap:7px}.tenant-current-rate-values small{font-size:10px}.tenant-current-rate-values strong{font-size:14px}.tenant-current-rate-values .tenant-current-rate-total{padding-left:8px}}

.arrears-amount{display:inline-block;padding:3px 7px;border:1px solid #dc2626;border-radius:6px;background:#fef2f2;color:#b91c1c;font-weight:750;line-height:1.35;white-space:nowrap;font-variant-numeric:tabular-nums}

.payment-year-filter{font-size:12px;min-width:150px}.payment-year-filter select{font-size:13px;padding:8px 10px}#app[data-page="payments"] .panel-head{flex-wrap:wrap;gap:12px}@media(max-width:800px){.payment-year-filter{width:100%;flex-direction:row;align-items:center;gap:9px}.payment-year-filter select{flex:1;min-width:0;font-size:12px}}

@media(max-width:800px){.mobile-building-name{font-weight:750}}

@media(max-width:800px){.rent-mobile-top>.rent-mobile-location{font-weight:750}}

#app[data-page="payments"] .scope{display:none}.payment-filter-bar{position:sticky;top:0;z-index:30;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;background:#f3f6fc;padding:10px 0;border-bottom:1px solid #d5e1f6;margin-bottom:14px}.payment-filter-bar label{display:flex;flex-direction:column;gap:4px;font-size:12px;width:100%;min-width:0;max-width:none}.payment-filter-bar select{width:100%;min-width:0;font-size:13px;padding:9px 8px;text-overflow:ellipsis}.payment-filter-bar>div{min-width:0}.payment-filter-add{grid-column:4;font-size:12px}@media(max-width:800px){.payment-filter-bar{gap:4px;padding:8px 0}.payment-filter-bar label{font-size:10px;gap:3px}.payment-filter-bar select{font-size:11px;padding:8px 2px;min-height:40px}.payment-filter-add{display:none}}



.dashboard-grid:has(.rent-houses){grid-template-columns:minmax(0,1fr)}.dashboard-grid:has(.rent-houses) .right-stack{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.rent-houses{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:24px;align-items:start;padding:20px}.rent-house{min-width:0}.rent-house-roof{min-height:59px;display:flex;justify-content:center;align-items:center;padding:19px 24px 12px;background:#1c3555;clip-path:polygon(0 100%,0 58%,8% 0,91% 0,100% 58%,100% 100%)}.rent-house-roof h3{color:#fff;font-size:25px;line-height:1.2;font-weight:850;letter-spacing:1.1px;margin:0;text-align:center;overflow-wrap:anywhere;max-width:100%}.rent-house-facade{border:3px solid #28445f;border-top:0;background:#f1f5fa}.rent-house-floor{display:grid;grid-template-columns:35px minmax(0,1fr);border-top:2px solid #5e738b;min-width:0}.rent-house-floor:first-child{border-top:0}.rent-floor-label{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;background:#edf2f7;color:#425a75;border-right:1px solid #91a1b5;padding:7px 2px;min-width:0}.rent-floor-label strong{font-size:18px;font-weight:800;line-height:1}.rent-floor-label span{font-size:9px;text-align:center;overflow-wrap:normal}.rent-floor-units{display:grid;grid-template-columns:repeat(var(--floor-units,1),minmax(0,1fr));min-width:0}.rent-window{position:relative;min-width:0;min-height:91px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;padding:19px 12px 13px;background:#dcf3e5;color:#175536;border-right:1px solid #8092a7;border-bottom:1px solid #8092a7}.rent-window:nth-child(2n),.rent-window:last-child{border-right:0}.rent-window:has(+.rent-window:nth-child(3)){border-bottom:1px solid #8092a7}.rent-floor-units>.rent-window:nth-last-child(-n+2){border-bottom:0}.rent-window.due{background:#ffe0e5;color:#8b2038}.rent-window.advance{background:#ffedcd;color:#835715}.rent-window.checking{background:#fff4dc;color:#7c602e}.rent-window.vacant{background:#edf1f5;color:#718196}.rent-cell-unit{position:absolute;top:5px;left:8px;font-size:10px;line-height:1;font-weight:650;opacity:.8}.rent-window-name{min-width:0;width:100%;text-align:center;font-size:17px;font-weight:800;line-height:1.25}.rent-window-name .tenant-name{display:inline;white-space:normal;overflow-wrap:anywhere;font-size:inherit;font-weight:800;line-height:inherit;text-align:center;text-decoration:none}.rent-window-name .tenant-name:hover{text-decoration:underline}.rent-cell-balance{font-size:23px;font-weight:850;line-height:1.15;max-width:100%;overflow-wrap:anywhere;text-align:center;font-variant-numeric:tabular-nums}.rent-house-foundation{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;column-gap:10px;row-gap:3px;padding:12px 6px 5px;text-align:center;color:#304b67}.rent-house-foundation>span{font-size:13px;font-weight:650}.rent-house-foundation>strong{font-size:23px;font-weight:850;font-variant-numeric:tabular-nums}.rent-house-foundation>small{width:100%;font-size:12px;font-weight:650}.rent-house-foundation.due>strong{color:#a52e46}.rent-house-foundation.advance>strong{color:#91621a}.rent-house-foundation.paid>strong{color:#216c47}@media(max-width:800px){.rent-houses{grid-template-columns:1fr;padding:15px 9px;gap:21px}.rent-house-roof{min-height:53px;padding:17px 18px 10px}.rent-house-roof h3{font-size:24px}.rent-house-floor{grid-template-columns:30px minmax(0,1fr)}.rent-floor-label strong{font-size:18px}.rent-floor-label span{font-size:9px}.rent-window{min-height:88px;padding:20px 6px 12px;gap:8px}.rent-window-name{font-size:16px}.rent-cell-balance{font-size:20px}.rent-cell-unit{font-size:9px;left:5px}.rent-house-foundation>span{font-size:13px}.rent-house-foundation>strong{font-size:22px}#app[data-page="overview"] .stat-label{font-size:12px;font-weight:750}#app[data-page="overview"] .stat-value{font-size:clamp(20px,5.6vw,24px);font-weight:850}#app[data-page="overview"] .panel-head h2{font-size:19px}#app[data-page="overview"] .panel-head p{font-size:13px}.dashboard-grid:has(.rent-houses) .right-stack{grid-template-columns:1fr}}

.rent-floor-units.units-1{grid-template-columns:minmax(0,1fr)}.rent-floor-units.units-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rent-floor-units{gap:1px;background:#8092a7}.rent-floor-units>.rent-window{border:0}
.rent-house-totals{padding:10px 9px 0;color:#53667d}.rent-house-period{display:block;font-size:11px;margin-bottom:7px}.rent-house-amounts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;font-size:12px}.rent-house-amounts>span{display:flex;flex-direction:column;gap:3px}.rent-house-amounts b{font-size:14px;color:#263e59;font-variant-numeric:tabular-nums}.rent-house-methods{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:11px;margin-top:8px;padding-bottom:9px;border-bottom:1px solid #d5dfeb}.rent-house-methods b{font-weight:600;font-variant-numeric:tabular-nums}

@media(max-width:800px){.rent-houses{padding:10px 9px;gap:16px}.rent-house-roof{min-height:42px;padding:11px 16px 7px}.rent-house-roof h3{font-size:23px}.rent-window{min-height:64px;padding:14px 6px 5px;gap:2px}.rent-window-name{font-size:16px;line-height:1.2}.rent-cell-balance{font-size:20px;line-height:1.1}.rent-cell-unit{top:3px}.rent-floor-label{gap:2px;padding:3px 2px}.rent-house-totals{padding-top:7px}.rent-house-period{margin-bottom:4px}.rent-house-amounts{gap:8px}.rent-house-amounts>span{gap:1px}.rent-house-methods{margin-top:5px;padding-bottom:5px}}

.rent-house-totals{background:#fff;border-top:2px solid #5e738b}.rent-house-foundation{background:#fff;padding:7px 8px 9px;justify-content:space-between;text-align:left}.rent-house-foundation>strong{font-size:21px}.rent-house-foundation>span{font-size:12px}@media(max-width:800px){.rent-window{min-height:55px;padding:13px 5px 4px;gap:1px}.rent-window-name{font-size:14px;line-height:1.15}.rent-cell-balance{font-size:17px;line-height:1.1}.rent-house-foundation{padding:5px 9px 7px}.rent-house-foundation>strong{font-size:20px}.rent-house-foundation>span{font-size:12px}}
.expense-period-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:14px 24px;margin-bottom:22px;padding:14px;background:#fff;border:1px solid #d8e2f1;border-radius:14px}.expense-period-toolbar .report-period{margin:0;flex:1;min-width:0}.expense-month-navigation{display:flex;align-items:center;gap:10px;flex-shrink:0}.expense-month-navigation>span{display:flex;flex-direction:column;min-width:160px;text-align:center;gap:3px}.expense-month-navigation small{font-size:11px;color:#617491}.expense-month-navigation strong{font-size:15px}.expense-month-navigation .icon-button{font-size:26px;line-height:1}.expense-payment-summary{display:flex;flex-wrap:wrap;gap:10px 20px;padding:12px;background:#eef4ff;border-radius:10px;margin:12px 0}.expense-payment-summary>span{display:flex;flex-direction:column;gap:4px;font-size:12px}.expense-payment-summary b{font-size:16px}.expense-payment-list{margin-top:16px}.expense-payment-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #dce5f2}.expense-payment-row>div:first-child{min-width:0;overflow-wrap:anywhere}.expense-payment-row small{display:block;color:#60738e;margin-top:4px}.expense-payment-row .row-actions{flex-shrink:0}#expense-paid-date{display:grid;gap:12px}@media(max-width:650px){.expense-period-toolbar{padding:10px;gap:12px}.expense-month-navigation{width:100%;justify-content:space-between}.expense-period-toolbar .report-period{width:100%;flex-basis:100%}.expense-payment-row{gap:6px}.expense-payment-row strong{font-size:13px}.expense-payment-row .icon-button{width:34px;height:34px}}
.expense-analysis-tools{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px;border:1px solid #d7e3f5;border-radius:12px;background:#f4f8ff}.expense-analysis-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.expense-remember{display:flex;flex-direction:row;align-items:center;gap:9px;font-size:13px;font-weight:500}.expense-remember input{width:18px;height:18px;padding:0;flex-shrink:0}.expense-analysis-results{padding:14px;border:1px solid #bdcfef;border-radius:12px;background:#f8fbff;min-width:0}.expense-analysis-results h3{font-size:17px;margin-bottom:10px}.expense-analysis-results p,.expense-analysis-results ul{margin:9px 0}.expense-analysis-results pre{font:12px/1.4 monospace;white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow:auto;padding:10px;background:#fff;border:1px solid #e0e7f4;border-radius:8px}.expense-analysis-results details{margin-top:12px}.expense-suggestion{display:grid;grid-template-columns:18px minmax(85px,1fr) minmax(0,1.5fr);align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid #dce5f1;font-size:13px;line-height:1.35}.expense-suggestion input{width:18px;height:18px;padding:0}.expense-suggestion strong{overflow-wrap:anywhere}.expense-new-category{padding:9px;border-radius:8px;background:#fff0cf;color:#76531c;font-size:13px}.expense-frequency-tag{font-weight:650}.expense-frequency-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:16px 0 8px}.expense-frequency-total{padding:14px;border:1px solid #cedef3;border-radius:12px;background:#eff5ff;display:flex;flex-direction:column;gap:4px;min-width:0}.expense-frequency-total.annual{background:#f7f0ff;border-color:#dfd1f3}.expense-frequency-total.unspecified{background:#fff6e5;border-color:#f0dfbd}.expense-frequency-total.oneoff{background:#edf6f3}.expense-frequency-total h3{font-size:15px}.expense-frequency-total>span{font-size:12px;color:#61748e}.expense-frequency-total>strong{font-size:20px}.expense-frequency-total>small{font-size:11px;overflow-wrap:anywhere}.expense-registry-filters{display:flex;flex-wrap:wrap;gap:10px;padding:12px 20px;border-bottom:1px solid #e0e8f2}.expense-registry-filters label{flex:1;min-width:140px;font-size:12px}.expense-registry-filters select{font-size:13px;padding:8px}@media(max-width:650px){.expense-analysis-tools{padding:10px;gap:10px}.expense-analysis-tools>label:first-child{grid-column:1/-1}.expense-analysis-actions{grid-column:1/-1}.expense-analysis-tools .expense-remember{grid-column:1/-1}.expense-analysis-results{padding:10px}.expense-suggestion{font-size:12px;grid-template-columns:18px minmax(75px,1fr) minmax(0,1.2fr)}.expense-frequency-totals{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.expense-frequency-total{padding:10px}.expense-frequency-total>strong{font-size:18px}.expense-registry-filters{padding:10px;gap:8px}.expense-registry-filters label{min-width:110px}}

.expense-income-button{display:block;width:100%;padding:0;border:0;background:transparent;text-align:left;font-family:inherit;font-weight:inherit;cursor:pointer;border-radius:5px}.expense-income-button:hover{text-decoration:underline;text-underline-offset:4px}.expense-income-button:focus-visible{outline:3px solid #15845e;outline-offset:4px}.expense-receipt-groups{display:grid;gap:18px}.expense-receipt-building{border:1px solid #b8e3cc;border-radius:12px;overflow:hidden}.expense-receipt-building h3{display:flex;justify-content:space-between;gap:12px;margin:0;padding:12px 14px;background:#daf6ec;color:#12654c;font-size:16px}.expense-receipt-tenant{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid #e5efe9;font-size:14px}.expense-receipt-building span{min-width:0;overflow-wrap:anywhere}.expense-receipt-building strong{white-space:nowrap;flex-shrink:0}

.expense-annual-period{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px;background:#f1f6ff;border:1px solid #cfddf3;border-radius:10px}.expense-annual-period>strong{grid-column:1/-1;font-size:13px}.expense-unpaid-groups h3{background:#fff0e5;color:#8a4718}.expense-unpaid-groups .expense-receipt-tenant>div{min-width:0}.expense-unpaid-groups .expense-receipt-tenant>div>strong{white-space:normal}.stat.expense-unpaid{border-color:#ecc4b7;background:#fff4ed}@media(max-width:480px){.expense-annual-period{grid-template-columns:1fr}}

.expense-popup-pay{padding:7px 12px;font-size:13px;margin:5px 6px 0 0}

.tenant-status-toolbar{display:flex;justify-content:flex-end;margin:0 0 14px}.tenant-status-toolbar label{font-size:13px;min-width:210px}.tenant-status-toolbar select{margin-top:5px}.tenant-ended-label{display:block;font-size:11px;font-weight:500;margin-top:3px;color:inherit;opacity:.8}
