:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#18304b;background:#f5f7fb;font-synthesis:none}*{box-sizing:border-box}body{margin:0;font-size:14px;line-height:1.5}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}h1,h2,h3,p{margin-top:0}h1{font-size:28px;letter-spacing:-.9px;line-height:1.2;margin-bottom:10px}h2{font-size:17px;margin:0;letter-spacing:-.25px}h3{font-size:14px;margin:0 0 14px}.layout{display:flex;min-height:100vh}.sidebar{width:258px;background:#142b40;color:#dfecf6;display:flex;flex-direction:column;flex-shrink:0;padding:32px 16px 22px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;padding:0 12px 34px;white-space:nowrap}.brand-symbol{background:#d8f8ea;color:#127a69;width:39px;height:39px;border-radius:11px;display:grid;place-items:center;font-size:26px;font-weight:800}.brand strong{font-size:13px;letter-spacing:1px;display:block}.brand small{display:block;font-size:10px;color:#8fa6b9;margin-top:3px}.sidebar nav{display:grid;gap:6px}.nav-link{display:flex;align-items:center;gap:13px;padding:12px 13px;color:#b5c7d5;border-radius:10px;font-weight:600;font-size:13px;background:transparent;border:0;width:100%;text-align:left}.nav-link:hover{background:#213c52;color:white}.nav-link.active{color:white;background:#237a71;box-shadow:0 6px 18px #0b262a44}.nav-icon{width:22px;text-align:center;font-size:18px;font-weight:400}.sidebar-bottom{margin-top:auto;padding:15px 9px 0;border-top:1px solid #31475a;color:#96abba;font-size:12px}.sidebar-bottom form{margin-top:15px}.logout{padding:10px}.right{flex:1;min-width:0}.topbar{height:71px;display:flex;align-items:center;justify-content:flex-end;padding:0 36px;background:white;border-bottom:1px solid #e9edf2}.topright{display:flex;align-items:center;gap:15px;color:#6c7d8d;font-size:12px}.user-dot{border-radius:100%;background:#eff7f5;color:#248979;padding:9px;font-size:12px}.mobilebrand,.mobile-nav{display:none}.content{max-width:1450px;margin:0 auto;padding:37px 40px 90px}.eyebrow{color:#138c7a;font-size:11px;letter-spacing:1.9px;font-weight:800;margin-bottom:9px}.page-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:0 0 27px}.page-heading p{color:#8090a3;margin:0;font-size:13px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:41px;padding:10px 17px;border-radius:9px;font-weight:750;font-size:13px;border:1px solid transparent;white-space:nowrap}.btn.primary{background:#168c7b;color:white;box-shadow:0 4px 11px #258c7927}.btn.primary:hover{background:#097867}.btn.secondary{background:#dff5ec;color:#1a826e}.btn.ghost{background:white;color:#46657b;border-color:#dce6ee}.btn.ghost:hover{border-color:#9fc5bd}.btn.destructive{background:#fde9e9;color:#bb4244;border-color:#f9d3d3}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:19px}.stats-three{grid-template-columns:repeat(3,minmax(0,1fr))}.stat{background:white;border:1px solid #e9edf3;border-radius:13px;padding:23px 22px 20px;min-width:0;box-shadow:0 5px 15px #1b385409}.stat:before{content:"";display:block;width:34px;height:4px;border-radius:5px;background:#118f81;margin-bottom:17px}.stat.green:before{background:#47b88a}.stat.red:before{background:#e4757a}.stat.amber:before{background:#e2ac48}.stat-title{color:#6f8195;font-size:13px;font-weight:650}.stat-number{font-size:24px;font-weight:800;color:#20374d;letter-spacing:-.9px;margin:9px 0 6px;overflow-wrap:anywhere}.stat-hint{font-size:12px;color:#8999a8}.grid-2{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:19px;margin-bottom:19px}.panel{background:white;border:1px solid #e9edf3;border-radius:13px;padding:24px 24px 25px;box-shadow:0 5px 15px #1b385409;min-width:0;margin-bottom:19px}.grid-2>.panel{margin-bottom:0}.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.panel-heading p{font-size:12px;color:#8b9bab;margin:3px 0 0}.panel-heading>a{color:#128775;font-weight:700;white-space:nowrap;font-size:12px}.due-item{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid #f0f3f6}.due-item:last-child{border:0}.due-icon{width:40px;height:40px;background:#eff7f4;color:#25887c;border-radius:11px;display:grid;place-items:center;font-size:20px;flex-shrink:0}.due-name{min-width:0;flex:1}.due-name b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.due-name span{display:block;color:#91a0ad;font-size:11px}.due-amount{text-align:right}.due-amount b{font-size:13px;display:block;margin-bottom:6px;white-space:nowrap}.chip{display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;border-radius:6px;padding:4px 8px;white-space:nowrap}.chip.danger{background:#fce8e9;color:#bf555a}.chip.warn{background:#fff2db;color:#ae7b2d}.chip.success{background:#e5f7ef;color:#238c65}.chip.neutral{background:#ebf0f7;color:#728399}.focus-metric{background:#eef8f6;border:1px solid #d8f0eb;border-radius:12px;padding:22px;margin-bottom:16px}.focus-metric span{font-size:12px;color:#408d7d;display:block}.focus-metric strong{display:block;font-size:29px;color:#196b61;margin-top:5px;letter-spacing:-.7px}.split-line{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 0;border-bottom:1px solid #f0f3f6}.split-line span{color:#72869a;font-size:12px}.split-line b{font-size:13px;text-align:right}.progress{height:9px;background:#e8eef4;border-radius:10px;overflow:hidden;margin-top:15px}.progress span{display:block;height:100%;background:#219b81;border-radius:10px}.small-muted{font-size:12px;color:#8c99a7;line-height:1.7;margin:10px 0 0}.category-bar{margin-bottom:20px}.category-bar:last-child{margin-bottom:0}.bar-info{display:flex;justify-content:space-between;font-size:12px;margin-bottom:8px}.bar-info span{font-weight:700;color:#587084}.bar-track{height:10px;border-radius:10px;background:#e9f0f4;overflow:hidden}.bar-track i{display:block;height:100%;background:linear-gradient(90deg,#1b937e,#6acbac);border-radius:9px}.toolbar{display:flex;gap:12px;align-items:center;margin-bottom:15px;flex-wrap:wrap}.toolbar input,.toolbar select{border:1px solid #e1e7ef;min-height:43px;border-radius:10px;padding:10px 13px;color:#4a6078;background:white;outline:none}.toolbar input{min-width:240px;flex:1}.toolbar input:focus,.toolbar select:focus,input:focus,textarea:focus,select:focus{border-color:#1b9c88;outline:2px solid #1b9c8815}.panel-table{padding:0}.scroll-table{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:690px;text-align:left}th{background:#fafbfe;color:#8b9aab;font-size:11px;letter-spacing:.45px;text-transform:uppercase;padding:16px 20px;font-weight:750;border-bottom:1px solid #edf1f5;white-space:nowrap}td{font-size:12px;color:#41566d;padding:18px 20px;border-bottom:1px solid #f1f4f7;vertical-align:middle}td b{color:#293e56;font-size:12px}tr:last-child td{border-bottom:0}.muted-cell{display:block;color:#a1aab4;font-size:11px;margin-top:4px}.tag{display:inline-block;background:#f0f4f8;color:#657c90;border-radius:6px;padding:5px 9px;font-size:11px;font-weight:700;white-space:nowrap}.textlink{color:#1e9380;font-weight:800;border:0;background:transparent;padding:0;font-size:12px;white-space:nowrap}.textlink:hover{text-decoration:underline}.danger-link{color:#c3555c}.form-panel{max-width:880px;padding:29px 30px}.form-panel h2{margin-bottom:18px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.form-grid label,.form-stack label,.compact-form label{font-size:12px;font-weight:750;color:#526a7f;display:flex;flex-direction:column;gap:7px}.form-grid label span{color:#d45b57}.form-grid label.full{grid-column:1/-1}.form-grid input,.form-grid textarea,.form-grid select,.form-stack input,.compact-form input,.compact-form select,.delete-form input{border:1px solid #dbe5ec;color:#294760;padding:11px 13px;min-height:42px;width:100%;border-radius:8px;background:white;outline:none;font-weight:500}.form-grid textarea{min-height:80px;resize:vertical}.form-grid input::placeholder,.form-grid textarea::placeholder,.form-stack input::placeholder{color:#aebac5}.form-divider{border-top:1px solid #edf1f5;margin:28px 0}.optional{font-size:12px;font-weight:400;color:#9daab5}.form-actions{display:flex;justify-content:flex-end;margin-top:26px}.form-stack{display:flex;flex-direction:column;gap:15px}.form-stack .btn{margin-top:7px}.notice{border-radius:10px;padding:13px 15px;margin-bottom:18px;font-size:13px;line-height:1.55}.notice.error{background:#fff0f0;color:#aa4447;border:1px solid #ffd5d6}.notice.success{background:#e8f7f1;color:#276f54;border:1px solid #ccebdc}.notice.warn{background:#fff6e6;color:#926c2b;border:1px solid #fae5ba}.inside-form{border-top:1px solid #edf1f4;padding-top:19px;margin-top:15px}.compact-form{display:grid;grid-template-columns:1fr 1fr 1.25fr auto;gap:11px;align-items:end}.compact-form .btn{min-height:43px}.inline-form{display:inline}.notes{margin-top:18px;border-radius:9px;background:#f6f9fc;padding:13px}.notes strong{font-size:12px}.notes p{color:#6b8092;font-size:12px;margin:7px 0 0;white-space:normal;overflow-wrap:anywhere}.danger-section{display:flex;align-items:center;justify-content:space-between;gap:20px;border:1px solid #f1d9da;background:#fffafb;border-radius:12px;padding:22px;margin-top:23px}.danger-section b{color:#a84b52}.danger-section p{color:#aa8f96;font-size:12px;margin:5px 0 0}.delete-form{display:flex;gap:9px}.delete-form input{max-width:130px}.download-list{display:grid;gap:13px;margin-top:17px}.download-list a{color:#188574;border:1px solid #deeee8;background:#f7fdfa;border-radius:10px;padding:14px;font-weight:750}.empty{padding:32px 12px;color:#8c9cab;text-align:center;font-size:13px}.subtle{color:#96a3b0;font-size:12px}.guest-shell{min-height:100vh;display:grid;place-items:center;padding:28px;background:radial-gradient(circle at top left,#dff5ed,#f5f7fb 52%)}.auth-card{background:white;width:100%;max-width:455px;padding:40px;border-radius:18px;box-shadow:0 20px 55px #244a6819;border:1px solid #e7eff2}.brand-guest{font-weight:900;letter-spacing:1px;color:#1a756a;margin-bottom:30px}.auth-card h1{font-size:25px}.auth-card p{font-size:13px;color:#7e91a1;margin-bottom:20px}.auth-card code{color:#1b7568;background:#eff7f3;padding:2px 5px;border-radius:4px}.auth-card .form-stack{margin-top:22px}.auth-card .form-stack label{color:#455f72}.auth-card .btn{min-height:45px}@media(max-width:1200px){.content{padding:30px 24px 70px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-number{font-size:22px}.sidebar{width:220px}.brand{gap:7px}.brand strong{font-size:11px}}@media(max-width:850px){.sidebar{display:none}.topbar{height:54px;padding:0 18px;justify-content:space-between}.mobilebrand{display:block;color:#126e65;font-size:12px;letter-spacing:.5px}.mobile-nav{display:flex;background:white;gap:6px;overflow-x:auto;padding:8px 12px 12px;border-bottom:1px solid #e9edf3}.mobile-nav .nav-link{flex-shrink:0;width:auto;font-size:11px;padding:10px 12px;color:#6b7e91}.mobile-nav .nav-link.active{background:#1c8c7b;color:white}.mobile-nav .nav-icon{display:none}.content{padding:24px 16px 60px}.grid-2{grid-template-columns:1fr}}@media(max-width:580px){h1{font-size:23px}.page-heading{align-items:flex-start;flex-direction:column;margin-bottom:19px}.page-heading>.btn{width:100%}.stats{gap:9px}.stat{padding:17px 14px}.stat-title{font-size:11px}.stat-number{font-size:18px;margin:8px 0 5px}.stat-hint{font-size:10px}.stat:before{margin-bottom:12px}.panel{padding:18px 15px}.panel-table{padding:0}.form-grid{grid-template-columns:1fr}.form-panel{padding:20px 16px}.compact-form{grid-template-columns:1fr}.delete-form{flex-wrap:wrap;justify-content:stretch}.danger-section{align-items:stretch;flex-direction:column}.delete-form input{max-width:none}.delete-form .btn{flex:1}.auth-card{padding:27px 23px}.focus-metric strong{font-size:24px}.toolbar input{min-width:160px}.toolbar select{flex:1}.topright{font-size:11px;gap:6px}th,td{padding:13px 12px}.panel-heading{gap:10px}.panel-heading h2{font-size:15px}}
tr[hidden]{display:none!important}.stat-number,.focus-metric strong,table td{font-variant-numeric:tabular-nums}
/* v2 — kalender, proyeksi, estimasi, laporan */
.form-wide{max-width:1080px}.agree{display:flex;gap:10px;align-items:flex-start;font-size:12px;color:#536b80;margin-top:20px;line-height:1.6}.agree input{accent-color:#168c7b;width:17px;height:17px;margin-top:2px;flex-shrink:0}.impact-preview{background:#f6f9fc;border:1px solid #e5edf3;padding:21px;border-radius:12px;margin-top:18px}.impact-kicker{font-weight:850;letter-spacing:1px;font-size:11px;color:#aa7141;margin-bottom:13px}.impact-comparison{display:flex;gap:12px;align-items:center;justify-content:space-between;background:white;border:1px solid #e9eef2;border-radius:10px;padding:17px 20px;margin-bottom:17px}.impact-comparison>div:not(.impact-plus){flex:1;min-width:0}.impact-comparison span{display:block;font-size:11px;color:#8597a8;margin-bottom:7px}.impact-comparison strong{color:#18394b;font-size:22px;letter-spacing:-.5px;overflow-wrap:anywhere}.impact-plus{font-weight:900;color:#b57839}.impact-foot{font-size:13px;color:#667e91;line-height:1.8;margin:16px 0 0}.insight-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.insight{border:1px solid #e6edf2;background:white;border-radius:9px;padding:14px;min-width:0}.insight span{color:#8598a8;font-size:11px;display:block;margin-bottom:6px}.insight strong{font-size:15px;color:#24435a;display:block;overflow-wrap:anywhere}.estimate-details{margin-top:23px;border-top:1px solid #e6edf2;padding-top:20px}.estimate-details summary{cursor:pointer;color:#128774;font-weight:800}.estimate-update{margin-top:20px}.calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px;text-align:center}.calendar-heading p{font-size:12px;color:#8b9aa8;margin:4px 0 0}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px}.cal-weekday{text-align:center;padding:6px 0 10px;font-size:11px;color:#8b9ba8;font-weight:800}.cal-day{border-radius:10px;border:1px solid #e6ebf0;min-height:111px;padding:10px 8px;min-width:0;overflow:hidden;background:#fdfefe}.cal-empty{background:#f7f9fb;border-style:dashed}.cal-today{outline:2px solid #2a9e88}.cal-hasdue{background:#f3faf7}.cal-date{font-weight:800;font-size:12px;color:#517184;margin-bottom:7px}.cal-amount{font-size:13px;font-weight:900;letter-spacing:-.3px;color:#198272;overflow-wrap:anywhere}.cal-sub{display:block;color:#8299a6;font-size:10px;line-height:1.4;margin:4px 0}.cal-event{display:block;color:#3c6170;background:#fff;border:1px solid #e5efeb;font-weight:700;font-size:10px;border-radius:5px;padding:5px 6px;margin-top:5px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.cal-event:hover{color:#12836f}.mini-months{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.mini-months a{border-radius:9px;background:#f5faf8;border:1px solid #deede8;padding:12px}.mini-months span{display:block;color:#8b9ca8;font-size:11px}.mini-months b{display:block;color:#2b5666;margin-top:7px;font-size:13px}.trend-bars{display:flex;align-items:stretch;gap:8px;height:280px;padding:20px 0 0}.trend-col{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center}.trend-value{font-size:10px;color:#7290a0;white-space:nowrap;margin-bottom:4px}.trend-track{flex:1;width:65%;min-height:40px;display:flex;align-items:flex-end;border-bottom:1px solid #d3e5dd;background:#f5f9fc;border-radius:5px 5px 0 0}.trend-fill{width:100%;background:linear-gradient(180deg,#63c7aa,#188d79);border-radius:5px 5px 0 0;min-height:2px}.trend-col>span{font-size:10px;color:#8293a3;margin-top:8px}.estimate-field[hidden],#twiceDays[hidden]{display:none!important}
@media(max-width:900px){.insight-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cal-day{min-height:95px}.cal-amount{font-size:12px}.mini-months{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:580px){.impact-comparison{flex-direction:column;align-items:stretch}.impact-comparison strong{font-size:19px}.impact-plus{text-align:center}.insight-grid{grid-template-columns:1fr 1fr;gap:7px}.insight{padding:9px}.insight strong{font-size:12px}.calendar-grid{gap:3px}.cal-day{padding:5px 3px;min-height:74px;border-radius:5px}.cal-date{font-size:10px;margin-bottom:4px}.cal-amount{font-size:10px}.cal-sub{font-size:8px}.cal-event{font-size:8px;padding:3px}.calendar-heading .btn{font-size:10px;padding:7px 8px;min-height:34px}.mini-months{grid-template-columns:repeat(2,minmax(0,1fr))}.trend-bars{gap:3px;height:210px}.trend-value{font-size:8px}.trend-track{width:80%}.trend-col>span{font-size:9px}}
/* v3: flexible paylater bills */
.variable-table { min-width:690px; width:100%; }
.variable-table input { width:100%; min-width:145px; }
.variable-table input[name="bill_note[]"] { min-width:170px; }
.variable-table td { vertical-align:middle; }
#addVariableRow { margin-top:12px; }
@media(max-width:720px){ .variable-table{min-width:650px;} }

/* v4: creditor grouping without loss of contract-level detail */
.group-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:24px 0 14px}
.group-section-heading h2{font-size:16px}
.creditor-group{margin-bottom:15px}
.creditor-group[hidden],.group-choice[hidden]{display:none!important}
.creditor-disclosure{background:white;border:1px solid #dceae8;border-radius:13px;box-shadow:0 4px 15px #1b38540b;overflow:hidden}
.creditor-disclosure summary{list-style:none;cursor:pointer;padding:23px 24px 20px;user-select:none}
.creditor-disclosure summary::-webkit-details-marker{display:none}
.creditor-disclosure summary:hover{background:#fbfefd}
.creditor-topline{display:flex;gap:15px;align-items:center;justify-content:space-between;margin-bottom:17px}
.creditor-topline h3{font-size:18px;color:#1f3b50;margin:3px 0 0}
.creditor-eyebrow{font-size:10px;letter-spacing:1.2px;color:#168c7b;font-weight:800}
.creditor-toggle{color:#168c7b;font-size:12px;font-weight:750;white-space:nowrap}
.creditor-totals{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.creditor-kpi{border-left:1px solid #e8edf2;padding-left:13px;min-width:0}
.creditor-kpi:first-child{border-left:0;padding-left:0}
.creditor-kpi span{display:block;font-size:11px;color:#8595a6;margin-bottom:5px}
.creditor-kpi strong{display:block;font-size:14px;color:#243d54;overflow-wrap:anywhere}
.group-disclaimer{font-size:11px;color:#8798a6;margin:12px 0 0}
.creditor-inside{border-top:1px solid #e8edf2;padding:0 18px 16px}
.creditor-inside .btn{margin:15px 0 0 0}
.group-picker-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:15px 0 12px}
.group-picker-toolbar input{border:1px solid #dbe5ec;border-radius:8px;min-height:42px;padding:10px 13px;flex:1;min-width:210px}
.group-pick-list{max-height:400px;overflow-y:auto;border:1px solid #e5ebf1;border-radius:10px}
.group-choice{display:flex;align-items:center;gap:13px;padding:12px 14px;cursor:pointer;border-bottom:1px solid #edf1f5}
.group-choice:last-child{border-bottom:0}
.group-choice:hover{background:#f4fbf8}
.group-choice input{width:18px;height:18px;flex-shrink:0;accent-color:#158c78}
.group-choice b{display:block;font-size:12px;color:#344c62}
.group-choice small{display:block;font-size:11px;color:#8394a5;margin-top:4px}
.group-assign{grid-template-columns:minmax(0,1fr) auto}
.group-month{display:flex;flex-direction:column;gap:5px;background:#f8fbfa;border:1px solid #e3eee9;padding:12px;border-radius:9px;min-width:115px}
.group-month span{font-size:11px;color:#758697}.group-month b{font-size:13px;color:#264459}.group-month small{font-size:10px;color:#8da09a}
.panel-heading.padded{padding:22px 22px 0}
@media(max-width:1250px){.creditor-totals{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:16px}.creditor-kpi:nth-child(4){border-left:0;padding-left:0}}
@media(max-width:650px){.creditor-disclosure summary{padding:17px 16px}.creditor-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.creditor-kpi:nth-child(odd){border-left:0;padding-left:0}.creditor-kpi:nth-child(4){border-left:1px solid #e8edf2;padding-left:13px}.creditor-topline{align-items:flex-start;flex-direction:column;gap:7px}.creditor-inside{padding:0 9px 15px}.group-assign{grid-template-columns:1fr}.group-picker-toolbar input{width:100%}}

/* v5: unified table for creditor groups and individual contracts. */
.debt-groups-table{min-width:910px}
.debt-groups-table .group-parent-row{background:#f1f8f6}
.debt-groups-table .group-parent-row td{border-top:1px solid #d6e9e4;border-bottom:1px solid #d6e9e4}
.debt-groups-table .group-row-name{font-size:13px;color:#126e65}
.debt-groups-table .group-child-row{background:#fbfcfe}
.debt-groups-table .group-child-row td:first-child{padding-left:33px}
.branch-indicator{color:#9ab6ac;margin-right:9px;font-size:17px}
.group-actions{min-width:125px}
.group-actions a,.group-actions button{display:block;margin-bottom:5px;text-align:left}
.group-actions .muted-action{font-size:11px;color:#718b99;font-weight:700}
.group-child-row[hidden],.group-parent-row[hidden]{display:none!important}
#purchaseImpact .scroll-table{border:1px solid #e4edf0;border-radius:10px;margin-top:15px}
#purchaseImpact table{min-width:620px}
#addPurchaseRow{margin-top:12px}
@media(max-width:680px){.debt-groups-table td,.debt-groups-table th{padding:13px 11px}.debt-groups-table .group-child-row td:first-child{padding-left:22px}}

/* v7 — monthly debt progress report */
.report-toolbar{display:flex;align-items:end;gap:11px;flex-wrap:wrap;margin-bottom:18px}.report-toolbar label{display:flex;flex-direction:column;gap:5px;font-weight:750;color:#526b7d;font-size:12px}.report-toolbar select{background:white;border:1px solid #dbe5ec;border-radius:9px;color:#30495b;padding:11px 13px;min-height:43px}.report-toolbar-note{color:#8ca0ae;font-size:12px;padding:0 0 11px}.report-kpi-grid,.report-breakdown-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:19px}.report-metric{border:1px solid #e6eef1;background:white;padding:21px 19px;border-radius:13px;box-shadow:0 4px 14px #1b385408;min-width:0}.report-metric>span{color:#74899d;font-size:12px;display:block;font-weight:700}.report-metric>strong{display:block;color:#183b4b;font-size:23px;letter-spacing:-.65px;overflow-wrap:anywhere;margin:12px 0 6px;line-height:1.25}.report-metric>small{color:#8b9eae;font-size:11px;line-height:1.5;display:block}.report-metric.positive{border-top:3px solid #269c78}.report-metric.negative{border-top:3px solid #db777b}.report-inline-notice{background:#f7fafb;border:1px solid #e3ebed;color:#6b7d91;border-radius:10px;padding:15px 19px;margin:-2px 0 19px;font-size:12px;line-height:1.8}.report-inline-notice strong{color:#203e54}.report-panel{padding:24px}.report-bridge{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}.bridge-item{padding:12px;border:1px solid #e7edf1;background:#fafcfd;border-radius:9px;min-width:0}.bridge-item span{display:block;font-size:11px;color:#7b90a1;min-height:31px;line-height:1.5}.bridge-item b{display:block;font-size:13px;margin-top:8px;overflow-wrap:anywhere;color:#294a5c}.bridge-item.good b,.report-positive{color:#218e6f!important}.bridge-item.bad b,.report-negative{color:#bf6467!important}.bridge-item.strong{background:#edf8f4;border-color:#d4efe6}.bridge-item.strong b{font-size:15px;color:#147b68}.report-insight{font-size:12px;line-height:1.7;color:#506c7f;margin:17px 2px 0}.report-chart{width:100%;height:auto;display:block;max-height:330px}.report-chart-legend{color:#8395a5;font-size:11px;display:flex;align-items:center;gap:8px}.report-chart-legend i{width:15px;height:3px;border-radius:3px;background:#158a79}.report-table{min-width:1100px}.report-table td,.report-table th{padding:13px 14px;white-space:nowrap}.report-table tbody tr:hover{background:#f9fcfb}.report-table td:first-child{position:sticky;left:0;background:white;z-index:1}.report-table th:first-child{position:sticky;left:0;background:#fafbfe;z-index:2}.report-table tbody tr:hover td:first-child{background:#f9fcfb}
@media(max-width:1250px){.report-kpi-grid,.report-breakdown-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-bridge{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:640px){.report-metric{padding:15px 13px}.report-metric>strong{font-size:17px}.report-metric>span{font-size:11px}.report-bridge{grid-template-columns:repeat(2,minmax(0,1fr))}.bridge-item span{min-height:0}.report-panel{padding:17px 12px}.report-toolbar-note{width:100%;padding:0}.report-kpi-grid,.report-breakdown-grid{gap:9px}.report-chart{min-width:0}}


/* v8 -- Android installed-app ergonomics */
.top-action{background:#f1f7f5;border:1px solid #d9e8e4;border-radius:10px;color:#126e65;font-weight:800;font-size:14px;padding:8px 11px;min-height:37px;cursor:pointer}
.install-action{font-size:11px;background:#147e70;border-color:#147e70;color:#fff}
.top-action:hover{background:#e1f1eb}
.install-action:hover{background:#10675d}
.top-action[hidden],.app-sync-notice[hidden]{display:none!important}
.android-bottom-nav{display:none}
.app-sync-notice{position:fixed;z-index:100;right:20px;bottom:20px;max-width:370px;background:#163d42;color:white;padding:12px 14px;border-radius:13px;box-shadow:0 12px 40px #102d4150;display:flex;align-items:center;gap:13px;font-size:12px}
.app-sync-notice button{border:0;border-radius:8px;background:#c5f2e0;color:#16483e;padding:9px 11px;font-weight:800;cursor:pointer;white-space:nowrap}
.pwa-help{margin-bottom:18px;line-height:1.65}
.pwa-help p{font-size:13px;line-height:1.65;color:#586f7e}
@media(max-width:850px){
  .topbar{min-height:56px;height:auto;padding:8px 15px}
  .topright{display:flex;align-items:center;gap:7px}
  .android-bottom-nav{position:fixed;z-index:80;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;min-height:66px;padding:5px 3px calc(5px + env(safe-area-inset-bottom, 0px));background:#fff;border-top:1px solid #e4eeed;box-shadow:0 -4px 20px #233c4c12}
  .android-bottom-nav a{font-size:10px;font-weight:750;color:#72818c;text-decoration:none;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;min-width:0;min-height:55px;border-radius:10px}
  .android-bottom-nav a span{font-size:22px;line-height:1.25}
  .android-bottom-nav a.active{color:#126e65;background:#eff8f5}
  .android-bottom-nav a.bottom-add span{display:grid;place-items:center;color:white;background:#168775;border-radius:13px;width:38px;height:34px;box-shadow:0 3px 8px #2587792c}
  .android-bottom-nav a.bottom-add.active{background:transparent}
  .content{padding-bottom:calc(105px + env(safe-area-inset-bottom, 0px))}
  .mobile-nav{display:none}
  .app-sync-notice{right:12px;left:12px;max-width:none;bottom:calc(85px + env(safe-area-inset-bottom, 0px))}
  .guest-shell{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:430px){
  .today-label{display:none}
  .user-label{max-width:78px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
  .install-action{padding:7px 8px}
  .topbar{padding:8px 10px}
  .mobilebrand{font-size:11px}
}
@media(display-mode:standalone){body{overscroll-behavior-y:contain}}

/* v9: custom branding & icon settings */
.brand-image{width:39px;height:39px;flex-shrink:0;object-fit:cover;border-radius:11px;background:#e0f9f1}
.brand{white-space:normal}.brand strong{overflow-wrap:anywhere;line-height:1.25;letter-spacing:.4px}.brand small{overflow-wrap:anywhere;line-height:1.4}
.mobilebrand{align-items:center;gap:8px;min-width:0}.mobile-brand-image{width:26px;height:26px;border-radius:7px;flex-shrink:0;object-fit:cover}.mobilebrand b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;max-width:180px}
.branding-settings{padding:25px 28px}.branding-settings-layout{display:grid;grid-template-columns:minmax(200px,.65fr) minmax(0,1.7fr);gap:27px;align-items:start}
.brand-preview{background:#f6faf9;border:1px solid #e3ece9;border-radius:13px;padding:15px}.brand-preview-phone{border-radius:16px;background:linear-gradient(155deg,#1c3f50,#387e79);color:white;min-height:235px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;text-align:center;padding:19px}
.brand-preview-icon img{width:76px;height:76px;border-radius:18px;object-fit:cover;box-shadow:0 7px 16px #071e2b44}.brand-preview-phone strong{max-width:95%;font-size:13px;overflow-wrap:anywhere}.brand-preview-phone span{color:#c0dbd8;font-size:10px;line-height:1.5}
.brand-preview-website{display:flex;gap:11px;align-items:center;margin-top:15px;background:white;border:1px solid #e6eded;border-radius:10px;padding:12px 11px;min-width:0}.brand-preview-website img{flex-shrink:0;border-radius:9px}.brand-preview-website strong{display:block;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.brand-preview-website small{display:block;font-size:10px;color:#879aa7;overflow-wrap:anywhere}
.brand-form{max-width:620px}.brand-form label small{font-weight:400;margin-top:0}.brand-form input[type=file]{padding:8px;min-width:0}.brand-form .brand-check{display:flex;align-items:center;gap:10px;flex-direction:row;line-height:1.4;font-weight:600}.brand-check input{width:18px;min-width:18px;height:18px;min-height:18px;accent-color:#168c7b}
@media(max-width:800px){.branding-settings-layout{grid-template-columns:1fr}.brand-preview{max-width:370px;width:100%}.branding-settings{padding:19px 16px}.mobilebrand{display:flex}}
@media(max-width:430px){.mobilebrand b{max-width:105px;font-size:11px}}

/* v10 — rekap cicilan per kreditur di kalender, tanpa menggandakan kontrak. */
.calendar-group-grid .cal-day{min-width:0}
.calendar-group-grid .cal-day-total{display:block;font-size:12px;font-weight:850;color:#168a71;overflow-wrap:anywhere;margin:4px 0 3px}
.calendar-group-grid .calendar-group-event{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calendar-more{display:block;font-size:9px;color:#147f72;font-weight:800;margin-top:5px}
.calendar-day-selected{outline:2px solid #21a38b;outline-offset:-2px}
.calendar-detail-panel{scroll-margin-top:26px}
.calendar-creditor-item{border:1px solid #e4eeeb;border-radius:10px;margin-top:10px;padding:0 12px}
.calendar-creditor-item>summary{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 4px;cursor:pointer;list-style:none}
.calendar-creditor-item>summary::-webkit-details-marker{display:none}
.calendar-creditor-item>summary span{display:flex;flex-direction:column;gap:4px;min-width:0}
.calendar-creditor-item>summary b{color:#20445a;font-size:13px;overflow-wrap:anywhere}
.calendar-creditor-item>summary small{font-size:11px;color:#8799a8}
.calendar-contract-table{min-width:690px;font-size:12px}
.calendar-contract-table td,.calendar-contract-table th{padding:10px 12px;white-space:nowrap}
.calendar-group-month .panel-heading{margin-bottom:12px}
.calendar-group-toolbar{display:flex;gap:11px;flex-wrap:wrap;align-items:end;margin:12px 0 17px}
.calendar-group-toolbar label{font-size:11px;color:#64798a;font-weight:750;display:flex;flex-direction:column;gap:5px}
.calendar-group-toolbar select{border:1px solid #dfe9eb;border-radius:9px;background:#fff;padding:10px 12px;color:#264659;min-height:41px;max-width:260px}
.calendar-group-toolbar .btn{min-height:41px}
.calendar-creditor-table{min-width:1040px}
.calendar-creditor-table th,.calendar-creditor-table td{padding:13px 12px;vertical-align:top}
.calendar-creditor-table tr:hover{background:#f8fcfa}
.calendar-creditor-expand{min-width:170px;max-width:310px}
.calendar-creditor-expand>summary{cursor:pointer;list-style:none;color:#173c52;display:flex;flex-direction:column;gap:5px}
.calendar-creditor-expand>summary::-webkit-details-marker{display:none}
.calendar-expand-indicator{font-size:10px;color:#15866f;font-weight:750}
.calendar-inline-detail{position:relative;width:620px;max-width:calc(100vw - 110px);border:1px solid #dcece8;border-radius:9px;padding:10px;background:#f9fcfb;margin-top:11px;z-index:1}
.calendar-inline-detail .scroll-table{overflow:auto}
.calendar-inline-detail .calendar-contract-table{min-width:620px}
.calendar-disclaimer{padding:0 15px 13px;line-height:1.6}
@media(max-width:750px){.calendar-group-toolbar{gap:8px}.calendar-group-toolbar label{flex:1 1 165px}.calendar-group-toolbar select{max-width:none;width:100%}.calendar-group-grid .cal-day-total{font-size:10px}.calendar-group-grid .cal-sub{display:none}.calendar-group-grid .calendar-group-event{font-size:8px}.calendar-group-grid .calendar-more{font-size:8px}.calendar-inline-detail{max-width:calc(100vw - 75px)}}
@media(max-width:480px){.calendar-group-grid .calendar-group-event{display:none}.calendar-group-grid .calendar-more{display:none}.calendar-group-grid .cal-day-total{font-size:9px}.calendar-group-grid .cal-day{min-height:68px}.calendar-creditor-item>summary b{font-size:12px}}

/* v10 expanded contract rows */
.calendar-contract-detailrow[hidden]{display:none!important}
.calendar-contract-detailrow>td{background:#f7fbfa;padding:12px 15px 18px!important}
.calendar-contract-detailrow .calendar-contract-table{width:100%;min-width:690px}
.calendar-detail-button{display:block;border:0;background:transparent;color:#147f71;padding:5px 0 0;margin:3px 0 0;font-size:11px;font-weight:750;cursor:pointer;text-align:left}
.calendar-detail-button:hover{text-decoration:underline}
.calendar-creditor-row>td:first-child>b{font-size:13px;color:#224458}

/* v11 - monthly installments & next due date in the unified debt list */
.debt-month-selector{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 16px;color:#526b7d;font-weight:700;font-size:12px}
.debt-month-selector label{white-space:nowrap}
.debt-month-selector select{background:#fff;border:1px solid #dbe5ec;border-radius:9px;color:#29485d;padding:10px 12px;min-height:42px;min-width:150px}
.debt-month-selector .btn{min-height:40px}
.debt-groups-table{min-width:1420px}
.debt-groups-table th,.debt-groups-table td{vertical-align:middle}
.debt-groups-table .debt-metric-cell{min-width:155px;max-width:230px;white-space:normal}
.debt-monthly-amount,.debt-due-date{display:block;color:#176f64;font-size:13px;white-space:nowrap}
.debt-monthly-none{color:#8ba1ad;font-weight:700;font-size:13px}
.debt-due-date.debt-due-late{color:#bd5f53}
.debt-due-warning{display:inline-block;margin-top:5px;background:#fff1e8;color:#a34a35;border-radius:5px;padding:3px 7px;font-size:10px;font-weight:800}
.debt-table-scroll{overflow-x:auto}
.debt-table-scroll:focus-visible{outline:2px solid #2b9d88;outline-offset:2px}
@media(max-width:700px){.debt-month-selector{align-items:stretch}.debt-month-selector select{flex:1}.debt-table-scroll{margin:0 -10px}.debt-groups-table td,.debt-groups-table th{padding:11px 10px}}

/* v12 — accessible, group-safe debt table sorting */
.debt-sort-toolbar{display:flex;align-items:center;gap:11px;flex-wrap:wrap;margin:0 0 13px;color:#536d7e;font-size:12px}
.debt-sort-toolbar label{font-weight:800;white-space:nowrap}
.debt-sort-toolbar select{border:1px solid #dbe5ec;background:white;color:#23475b;border-radius:9px;padding:10px 12px;min-height:42px;min-width:235px;max-width:100%}
.debt-sort-toolbar .debt-sort-hint{color:#91a4b0;font-size:11px}
.debt-sort-header{background:transparent;border:0;color:inherit;padding:0;display:inline-flex;align-items:center;gap:7px;cursor:pointer;text-align:left;font:inherit;font-weight:inherit;text-transform:inherit;letter-spacing:inherit;white-space:nowrap}
.debt-sort-header:hover,.debt-sort-header.is-active{color:#147d70}
.debt-sort-header:focus-visible{outline:2px solid #158c7b;outline-offset:4px;border-radius:3px}
.debt-sort-indicator{font-size:12px;color:#90a6b5;font-weight:800}
.debt-sort-header.is-active .debt-sort-indicator{color:#128575}
@media(max-width:700px){.debt-sort-toolbar{align-items:stretch;gap:7px}.debt-sort-toolbar label{width:100%}.debt-sort-toolbar select{width:100%}.debt-sort-toolbar .debt-sort-hint{width:100%}}
