:root{--navy:#0b1e3f;--navy2:#17345f;--gold:#f4b400;--green:#25d366;--bg:#f5f7fb;--card:#fff;--text:#172033;--muted:#687385;--line:#e2e6ed;--soft:#edf1f7;--danger:#c43d3d}
*{box-sizing:border-box}html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Arial,Helvetica,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}
.app{max-width:760px;margin:auto;min-height:100vh;background:var(--bg)}
header{background:var(--navy);color:#fff;padding:34px 32px 30px;border-radius:0 0 26px 26px}
.brandline{display:flex;justify-content:space-between;align-items:center;gap:15px}.brand-wordmark{display:inline-flex;align-items:center;white-space:nowrap}.zobbin-word{color:#fff}.karigar-word{color:#f4b400;margin-left:4px}.brand{font-size:25px;font-weight:900;letter-spacing:-1px;display:flex;align-items:center}.tag{font-size:16px;opacity:.88}
.header-actions{display:flex;align-items:center;gap:8px;flex:none}.lang-switch{height:38px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.08);color:#fff;border-radius:12px;padding:0 9px;font-weight:800;outline:none}.lang-switch option{color:#172033;background:#fff}.notify-btn{width:40px;height:40px;border:0;border-radius:12px;background:rgba(255,255,255,.10);color:#fff;position:relative;display:grid;place-items:center}.notify-btn svg{width:23px;height:23px}.notify-badge{position:absolute;right:-4px;top:-5px;min-width:18px;height:18px;padding:0 4px;border-radius:10px;background:var(--gold);color:#171200;font-size:10px;font-weight:900;display:none;place-items:center;border:2px solid var(--navy)}
.subtitle{font-size:17px;color:#cdd7e6;margin-top:8px}
main{padding:24px 18px 105px}.screen{display:none}.screen.active{display:block}
h1{font-size:31px;margin:0 0 5px;letter-spacing:-.7px}h2{font-size:22px;margin:0 0 8px}h3{margin:0}
.lead{font-size:16px;color:var(--muted);line-height:1.45;margin-bottom:18px}.section-title{display:flex;justify-content:space-between;align-items:center;margin:24px 2px 10px}.tiny{font-size:13px;color:var(--muted);line-height:1.35}.label{font-size:13px;color:var(--muted);margin-top:5px}.metric{font-size:25px;font-weight:900;letter-spacing:-.5px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.card,.stat,.rowcard,.summary-card{background:var(--card);border:1px solid var(--line);border-radius:20px}.card{padding:16px}.stat{padding:18px}.rowcard{padding:14px;display:flex;align-items:center;gap:12px;margin-bottom:10px;min-width:0}.grow{flex:1;min-width:0}.name{font-size:18px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.amount{font-size:20px;font-weight:900;white-space:nowrap}
.avatar{width:58px;height:58px;border-radius:50%;background:#e9edf5;color:var(--navy);display:grid;place-items:center;font-size:22px;font-weight:900;flex:none;overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover}.avatar.big{width:82px;height:82px}
.btn{border:0;border-radius:14px;padding:12px 16px;font-weight:850;background:var(--soft);color:var(--navy);min-height:46px}.btn.primary{background:var(--navy);color:#fff}.btn.gold{background:var(--gold);color:#171200}.btn.danger{background:#fff0f0;color:var(--danger)}.btn.full{width:100%}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.quick{display:grid;grid-template-columns:1fr 1fr;gap:10px}.quick .btn{min-height:58px}
.bottomnav{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(760px,100%);height:76px;background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);z-index:30;padding-bottom:env(safe-area-inset-bottom)}
.bottomnav button{border:0;background:#fff;color:#718096;font-weight:800;font-size:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.bottomnav button.active{color:var(--navy)}
.navicon{font-size:24px;line-height:1}
.karigar-nav-icon{width:30px;height:30px;display:grid;place-items:center}
.karigar-nav-icon svg{width:30px;height:30px;display:block}
.tabs{display:flex;gap:8px;margin-bottom:16px}.tab{border:1px solid var(--line);background:#fff;border-radius:22px;padding:11px 18px;font-weight:850}.tab.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.hisab-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:16px;margin-bottom:12px;display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px;box-shadow:0 3px 12px rgba(11,30,63,.035)}.hisab-top{display:flex;justify-content:space-between;align-items:center;gap:12px}.hisab-name{font-size:19px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.payable{font-size:22px;font-weight:900;white-space:nowrap}.status{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:850;margin-top:6px}.status.pending{color:#936900}.status.paid{color:#16824d}.hisab-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.wa-btn{width:48px;height:48px;border:0;border-radius:14px;background:var(--green);display:grid;place-items:center;padding:9px}.wa-btn svg{width:29px;height:29px;fill:#fff}.pay-btn{background:var(--gold);color:#171200;border:0;border-radius:14px;padding:12px 21px;font-weight:900}
.modal{position:fixed;inset:0;background:rgba(7,19,40,.55);display:none;z-index:50;align-items:flex-end}.modal.show{display:flex}.sheet{width:min(760px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:28px 28px 0 0;padding:24px 18px 30px;margin:auto auto 0}.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.close{width:44px;height:44px;border:0;border-radius:50%;background:#eef2f7;color:var(--text);font-size:26px}.form{display:flex;flex-direction:column;gap:13px}.field label{display:block;font-size:14px;font-weight:800;color:#4c586a;margin:0 0 7px}.field input,.field select,.field textarea{width:100%;border:1px solid #d5dbe4;border-radius:14px;padding:13px 14px;background:#fff;color:var(--text);outline:none}.field textarea{min-height:95px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#6f86a9;box-shadow:0 0 0 3px #e9eef7}
.total{background:#f6f8fb;border-radius:18px;padding:15px;margin-top:3px}.totalline{display:flex;justify-content:space-between;gap:10px;padding:5px 0}.totalline.final{border-top:1px solid var(--line);margin-top:6px;padding-top:11px;font-size:19px}
.profile-head{display:flex;gap:15px;align-items:center;background:linear-gradient(135deg,var(--navy),var(--navy2));color:#fff;border-radius:22px;padding:18px}.profile-head .tiny{color:#d4deec}.profile-actions{display:flex;gap:8px;margin-top:12px}
.summary-hero{background:linear-gradient(135deg,var(--navy),var(--navy2));color:#fff;border-radius:22px;padding:19px}.summary-hero .tiny{color:#d4deec}.periods{display:flex;gap:7px;overflow:auto;margin:13px 0}.period{border:1px solid var(--line);background:#fff;border-radius:20px;padding:9px 13px;font-weight:800;white-space:nowrap}.period.active{background:var(--navy);color:#fff}
.summary-row{display:flex;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.summary-row:last-child{border-bottom:0}
.empty{padding:24px;text-align:center;color:var(--muted);background:#fff;border:1px dashed #ccd3de;border-radius:18px}
.toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:#172033;color:#fff;padding:12px 16px;border-radius:12px;font-weight:750;display:none;z-index:100;max-width:90%;text-align:center}
.notification-list{display:flex;flex-direction:column;gap:9px}.notification-item{background:#f7f9fc;border:1px solid var(--line);border-radius:16px;padding:13px}.notification-item.unread{border-left:4px solid var(--gold);background:#fff}.notification-title{font-weight:900;font-size:16px}.notification-message{font-size:14px;line-height:1.45;color:#536074;margin-top:5px}.notification-time{font-size:11px;color:#8a94a4;margin-top:7px}
.badge{font-size:11px;padding:5px 8px;border-radius:20px;background:#eaf7f0;color:#178050;font-weight:850;margin-left:5px}
.list{display:flex;flex-direction:column;gap:9px}.rate-row{background:#f8f9fc;border:1px solid var(--line);border-radius:17px;padding:12px}.rate-row-top{display:flex;align-items:center;gap:10px}.rate-name{font-size:17px;font-weight:850;flex:1}.rate-input{width:100px;padding:10px;border:1px solid #d5dbe4;border-radius:12px;font-weight:800}.mini-actions{display:flex;gap:7px;margin-top:8px}.mini-actions .btn{padding:9px 12px;min-height:40px;font-size:13px}
@media(max-width:430px){header{padding:29px 22px 25px}.brand{font-size:25px}.header-actions{gap:6px}.lang-switch{height:36px;padding:0 7px}.notify-btn{width:38px;height:38px}.tag{font-size:14px}.grid{gap:9px}.stat{padding:15px}.metric{font-size:23px}.hisab-card{padding:14px}.payable{font-size:20px}.rowcard{padding:12px}.two{gap:8px}}
