*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1f2937;background:#f6f7f9}body{margin:0}a{color:#315f8a;text-decoration:none}a:hover{text-decoration:underline}.topbar{background:#243447;color:#fff;position:sticky;top:0;z-index:20}.topbar-inner{width:100%;max-width:none;margin:0;padding:0 24px;display:flex;align-items:center;gap:22px;min-height:62px}.brand{font-weight:750;font-size:19px;color:#fff;white-space:nowrap}.nav{display:flex;gap:4px;flex-wrap:wrap}.nav a{color:#dbe5ed;padding:9px 11px;border-radius:8px}.nav a.active,.nav a:hover{background:#364d64;color:#fff;text-decoration:none}.userbox{margin-left:auto;font-size:14px;color:#dbe5ed}.container{width:100%;max-width:none;margin:0;padding:24px clamp(14px,2vw,32px) 50px}.page-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:20px}.page-head h1{margin:0;font-size:26px}.muted{color:#6b7280}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.kpi{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:17px}.kpi .label{font-size:13px;color:#6b7280;margin-bottom:6px}.kpi .value{font-size:24px;font-weight:750;line-height:1.15}.kpi .sub{font-size:12px;color:#87909c;margin-top:6px}.panel{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:18px;margin-bottom:18px}.panel h2{font-size:18px;margin:0 0 4px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.chart-wrap{width:100%;height:460px;position:relative}.chart-wrap canvas{width:100%;height:100%;display:block}.legend{display:flex;gap:20px;flex-wrap:wrap;font-size:13px;color:#4b5563}.legend span:before{content:"";display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:6px;vertical-align:-1px}.legend .capital:before{background:#526f8d}.legend .pension:before{background:#8aa0b4}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;font-size:14px}.data-table th,.data-table td{padding:10px 9px;border-bottom:1px solid #e7ebef;text-align:left;white-space:nowrap}.data-table th{color:#64748b;font-size:12px;text-transform:uppercase;letter-spacing:.03em}.data-table tr:hover td{background:#f9fafb}.number{text-align:right!important;font-variant-numeric:tabular-nums}.badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:#eef2f6;font-size:12px}.badge.green{background:#e8f4ec;color:#25623b}.badge.amber{background:#fff3d6;color:#805d00}.badge.red{background:#fde9e7;color:#9e3327}.button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #cbd5e1;border-radius:9px;padding:9px 13px;background:#fff;color:#243447;font-weight:650;font-size:14px;cursor:pointer;text-decoration:none}.button:hover{text-decoration:none;background:#f8fafc}.button.primary{background:#315f8a;color:#fff;border-color:#315f8a}.button.danger{color:#a12720;border-color:#edc8c4}.button.small{padding:6px 9px;font-size:12px}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid.one{grid-template-columns:1fr}.form-grid .wide{grid-column:1/-1}label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:650;color:#4b5563}input,select,textarea{width:100%;border:1px solid #cbd5e1;border-radius:9px;padding:10px 11px;font:inherit;background:#fff;color:#1f2937}textarea{min-height:100px;resize:vertical}input:focus,select:focus,textarea:focus{outline:2px solid #aec4d8;outline-offset:1px}.field-help{font-size:12px;color:#7a8491}.section-title{grid-column:1/-1;margin-top:8px;padding-top:12px;border-top:1px solid #e5e7eb;font-weight:750;color:#243447}.alert{padding:11px 13px;border-radius:9px;margin-bottom:14px}.alert.success{background:#e8f4ec;color:#245b37}.alert.error{background:#fde9e7;color:#8f2f28}.alert.info{background:#e9f1f8;color:#315f8a}.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}.filters input,.filters select{max-width:260px}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:20px}.auth-card{width:min(440px,100%);background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:28px}.auth-card h1{margin:0 0 4px}.empty{text-align:center;padding:36px;color:#7a8491}.doc-list{display:flex;flex-direction:column;gap:8px}.doc-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #edf0f3}.footer-note{margin-top:20px;font-size:12px;color:#8a929d}.positive{color:#237a3b}.negative{color:#a02f28}.choice-note{font-size:12px;color:#6b7280}.import-preview{max-height:420px;overflow:auto}@media(max-width:900px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid{grid-template-columns:1fr}.topbar-inner{align-items:flex-start;padding-top:12px;padding-bottom:12px}.nav{order:3;width:100%}.topbar-inner{flex-wrap:wrap}.userbox{margin-left:0}}@media(max-width:560px){.container{padding:18px 12px 40px}.kpis{grid-template-columns:1fr}.page-head{align-items:flex-start;flex-direction:column}.chart-wrap{height:330px}.data-table th,.data-table td{padding:9px 7px}.brand{font-size:17px}}
.pie-layout{display:grid;grid-template-columns:minmax(320px,1.15fr) minmax(260px,.85fr);gap:24px;align-items:center}.pie-chart-wrap{height:390px;position:relative}.pie-chart-wrap canvas{width:100%;height:100%;display:block}.pie-legend{display:flex;flex-direction:column;gap:8px}.pie-legend-item{display:grid;grid-template-columns:14px minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px 0;border-bottom:1px solid #edf0f3;font-size:14px}.pie-swatch{width:12px;height:12px;border-radius:3px}.pie-legend-label{font-weight:650;min-width:0}.pie-legend-value{font-variant-numeric:tabular-nums;color:#5f6b78;white-space:nowrap}@media(max-width:760px){.pie-layout{grid-template-columns:1fr}.pie-chart-wrap{height:330px}.pie-legend-item{grid-template-columns:14px minmax(0,1fr)}.pie-legend-value{grid-column:2;white-space:normal}}
.category-add-form{display:grid;grid-template-columns:2fr 2fr 110px auto;gap:12px;align-items:end}.category-add-action{padding-bottom:1px}.category-row-cell{padding:9px!important}.category-row-form{display:grid;grid-template-columns:minmax(180px,2fr) minmax(230px,2fr) 100px 100px auto;gap:10px;align-items:center}.category-row-form input,.category-row-form select{min-width:0}.category-row-cell{position:relative}.category-delete-form{position:absolute;right:9px;top:50%;transform:translateY(-50%)}.category-row-form .actions{padding-right:76px}.category-usage{font-size:13px;color:#6b7280}.button:disabled{opacity:.45;cursor:not-allowed}@media(max-width:900px){.category-add-form{grid-template-columns:1fr 1fr}.category-add-action{align-self:end}.category-row-form{grid-template-columns:1fr 1fr}.category-row-form .actions{padding-right:0}.category-delete-form{position:static;transform:none;margin-top:8px}.category-row-cell{min-width:650px}}


.person-add-form{display:grid;grid-template-columns:minmax(220px,2fr) 120px auto;gap:12px;align-items:end}
.person-row-form{display:grid;grid-template-columns:minmax(200px,2fr) 110px 100px 100px auto;gap:10px;align-items:center}
.person-row-form input{min-width:0}.person-row-form .actions{padding-right:76px}
.inline-check{display:flex;flex-direction:row;align-items:center;gap:7px;font-size:13px;font-weight:600}.inline-check input{width:auto}
@media(max-width:900px){.person-add-form{grid-template-columns:1fr 1fr}.person-row-form{grid-template-columns:1fr 1fr}.person-row-form .actions{padding-right:0}}

.property-valuation[hidden]{display:none!important}.property-valuation{border:1px solid #dfe6ec;border-radius:11px;background:#fafbfd;padding:0 14px 14px}.property-title{margin:0 -14px 14px;padding:12px 14px;border-top:0;background:#f0f4f7;border-radius:11px 11px 0 0}.property-grid{display:grid;grid-template-columns:1fr 1fr minmax(230px,1fr) auto;gap:14px;align-items:end}.property-estimate-card{display:flex;flex-direction:column;gap:5px;padding:10px 12px;border:1px solid #d9e1e8;border-radius:9px;background:#fff}.property-estimate-card .label{font-size:12px;color:#6b7280}.property-estimate-card strong{font-size:21px;color:#243447}.property-estimate-action{padding-bottom:1px}@media(max-width:1050px){.property-grid{grid-template-columns:1fr 1fr}.property-estimate-action{align-self:end}}@media(max-width:650px){.property-grid{grid-template-columns:1fr}}

.property-address-grid{display:grid;grid-template-columns:2fr .8fr 1.4fr 1fr 1.3fr .8fr .8fr;gap:12px;margin-bottom:16px;align-items:end}
.property-api-box{margin-top:14px;padding:13px 14px;border:1px solid #d9e3ec;border-radius:10px;background:#f7fafc;display:flex;align-items:center;justify-content:space-between;gap:16px}
.property-api-result{margin-top:10px;padding:10px 12px;border-radius:9px;font-size:13px;line-height:1.45}
.property-api-result.info{background:#e9f1f8;color:#315f8a}.property-api-result.success{background:#e8f4ec;color:#245b37}.property-api-result.error{background:#fde9e7;color:#8f2f28}
@media(max-width:1200px){.property-address-grid{grid-template-columns:2fr 1fr 1.5fr 1fr}.property-api-box{align-items:flex-start}}
@media(max-width:760px){.property-address-grid{grid-template-columns:1fr 1fr}.property-api-box{flex-direction:column}.property-api-box .button{width:100%}}
@media(max-width:520px){.property-address-grid{grid-template-columns:1fr}}

.cashflow-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.cashflow-table{overflow:auto}
.cashflow-controls{margin-top:1rem}
.cashflow-kpis{display:flex;flex-wrap:wrap;gap:1rem;margin-top:1rem}
.cashflow-kpis>div{min-width:9rem;padding:.65rem 1rem;border:1px solid #d7dce4;border-radius:.6rem}
.cashflow-kpis strong{display:block;font-size:1.15rem;font-variant-numeric:tabular-nums}
@media(max-width:760px){.cashflow-grid{grid-template-columns:1fr}}
[data-cashflow-target][hidden]{display:none}

.legend .income:before{background:#6f8f78}.legend .expense:before{background:#a87676}
.cashflow-chart-wrap{height:380px}
.cashflow-category-head{align-items:flex-end}
.cashflow-dashboard-filter{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.cashflow-dashboard-filter label{min-width:130px}
.cashflow-dashboard-filter select{min-width:130px}
.cashflow-category-form{display:flex;align-items:center;gap:6px;min-width:260px}
.cashflow-category-form input{min-width:180px;padding:7px 8px}
.cashflow-category-form .button{flex:0 0 auto}
@media(max-width:760px){.cashflow-chart-wrap{height:330px}.cashflow-category-head{align-items:flex-start;flex-direction:column}.cashflow-dashboard-filter{width:100%}.cashflow-dashboard-filter label{flex:1;min-width:120px}.cashflow-category-form{min-width:220px}}

.dashboard-section{margin-bottom:34px}
.dashboard-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:6px 0 16px;padding:0 2px 11px;border-bottom:2px solid #dfe5eb}
.dashboard-section-head h2{margin:0 0 4px;font-size:23px;color:#243447}
.dashboard-section-cashflow{margin-top:42px}
@media(max-width:700px){.dashboard-section-head{align-items:flex-start;flex-direction:column}.dashboard-section-head .button,.dashboard-section-head form{width:100%}.dashboard-section-head form .button{width:100%}}

.dashboard-tabs{display:flex;gap:7px;margin:0 0 22px;padding:5px;background:#e9edf1;border-radius:12px;width:max-content;max-width:100%}
.dashboard-tabs a{padding:10px 18px;border-radius:9px;color:#51606f;font-weight:700;text-decoration:none}
.dashboard-tabs a:hover{background:#f7f9fb;text-decoration:none}
.dashboard-tabs a.active{background:#fff;color:#243447;box-shadow:0 1px 3px rgba(36,52,71,.12)}
.cashflow-category-add{display:flex;align-items:flex-end;gap:10px;margin-bottom:16px;max-width:620px}
.cashflow-category-add label{flex:1}
.cashflow-category-manage-form{display:flex;gap:7px;align-items:center;min-width:320px}
.cashflow-category-manage-form input{min-width:190px}
@media(max-width:650px){.dashboard-tabs{width:100%}.dashboard-tabs a{flex:1;text-align:center;padding:10px 8px}.cashflow-category-add,.cashflow-category-manage-form{flex-direction:column;align-items:stretch;max-width:none;min-width:220px}}

.category-tabs{margin-bottom:20px}
.cashflow-category-row-form{display:grid;grid-template-columns:minmax(220px,2fr) minmax(210px,1fr) 130px auto;gap:10px;align-items:center;width:calc(100% - 90px)}
@media(max-width:850px){.cashflow-category-row-form{grid-template-columns:1fr 1fr;width:100%}.cashflow-category-row-form .category-usage{align-self:center}}
@media(max-width:600px){.cashflow-category-row-form{grid-template-columns:1fr}.cashflow-category-add{flex-direction:column;align-items:stretch}}

.cashflow-dashboard-charts{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  gap:18px;
  align-items:stretch;
}
.cashflow-dashboard-chart-panel{
  min-width:0;
  margin:0;
}
.cashflow-dashboard-chart-panel .cashflow-chart-wrap{
  height:340px;
}
.cashflow-dashboard-chart-panel .cashflow-pie-layout{
  grid-template-columns:minmax(210px,.9fr) minmax(180px,1.1fr);
  gap:14px;
}
.cashflow-dashboard-chart-panel .pie-chart-wrap{
  min-width:0;
}
@media(max-width:1000px){
  .cashflow-dashboard-charts{grid-template-columns:1fr}
  .cashflow-dashboard-chart-panel .cashflow-chart-wrap{height:350px}
}

.asset-dashboard-charts{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  gap:18px;
  align-items:stretch;
}
.asset-dashboard-chart-panel{
  min-width:0;
  margin:0;
}
.asset-dashboard-chart-panel .asset-payout-chart-wrap{
  height:360px;
}
.asset-dashboard-chart-panel .asset-pie-layout{
  grid-template-columns:minmax(210px,.9fr) minmax(180px,1.1fr);
  gap:14px;
}
.asset-dashboard-chart-panel .pie-chart-wrap{
  min-width:0;
}
.cashflow-kpis{
  margin-bottom:18px;
}
@media(max-width:1100px){
  .asset-dashboard-charts{grid-template-columns:1fr}
  .asset-dashboard-chart-panel .asset-payout-chart-wrap{height:420px}
}
