*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;font:19px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:#1c2333;background:#f7f4ec;padding-bottom:calc(96px + env(safe-area-inset-bottom))}
a{color:#2b59c3}h1,h2{line-height:1.2}h2{font-size:21px;margin:26px 0 10px}.pad{max-width:640px;margin:0 auto;padding:14px 16px 24px}.center{text-align:center}.muted{color:#5b6475}.small{font-size:15px}.big{font-size:44px;margin:8px 0}.hide{visibility:hidden}
.bar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:8px;background:#2b59c3;color:#fff;padding:8px 10px;padding-top:max(8px,env(safe-area-inset-top))}.bar h1{flex:1;margin:0;font-size:21px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.iconbtn{display:grid;place-items:center;width:48px;height:48px;border-radius:12px;color:#fff;text-decoration:none;font-size:30px;line-height:1}.iconbtn:active{background:#ffffff26}.iconbtn.ghost{visibility:hidden}.logo img{display:block;border-radius:9px;background:#fff;margin:7px}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:14px;background:#2b59c3;color:#fff;font:inherit;font-weight:700;min-height:56px;padding:12px 18px;text-decoration:none;cursor:pointer;text-align:center;margin:10px 0}.btn:active{filter:brightness(.92)}
.btn.big{min-height:64px;font-size:21px}.btn.wide{width:100%}.btn.small{min-height:46px;font-size:17px;padding:8px 14px;margin:0}.btn.ghost{background:#fff;color:#1c2333;border:2px solid #d9dce4}.btn.pay{background:#17784a}.btn.wa{background:#1fa855}.btn.danger{background:#fff;color:#c62828;border:2px solid #f1c0c0}
.linkbtn{background:none;border:0;color:#7a8191;font:inherit;text-decoration:underline;cursor:pointer;padding:4px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.two .btn{margin:0}.links{margin-top:22px}
.fab{position:fixed;left:0;right:0;bottom:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(#f7f4ec00,#f7f4ec 30%)}.fab .btn{max-width:608px;margin:0 auto;background:#ff6b35;box-shadow:0 6px 18px #ff6b3555}
.totals{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:6px 0 4px}.tot{border-radius:16px;padding:12px 14px}.tot small{display:block;font-weight:700;font-size:15px}.tot b{display:block;font-size:26px;overflow-wrap:anywhere}.tot.owed{background:#fdeaea;color:#b42323}.tot.paid{background:#e3f5ea;color:#17784a}
.list{background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 1px 4px #1c23330f}.row{display:flex;align-items:center;gap:12px;padding:14px;border-top:1px solid #f0eee8;color:inherit;text-decoration:none;min-height:72px}.row:first-child{border-top:0}a.row:active{background:#f3f5fb}
.av{flex:none;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font-weight:800;color:#fff;background:#8ea6e0}.late .av{background:#e05555}.due .av{background:#ff9466}.ok .av{background:#5cbf8a}
.who{flex:1;min-width:0}.who b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.who small,.amt small{display:block;font-size:15px;color:#5b6475}.amt{text-align:right;flex:none;max-width:52%}.amt b{display:block;font-size:20px}.amt a,.amt button{display:inline-block;margin-left:6px}
.late .amt b,.late .amt small{color:#c62828}.due .amt small{color:#b6431a}.due .amt b{color:#b6431a}.okc{color:#17784a}.redc{color:#c62828}
.empty{text-align:center;background:#fff;border-radius:18px;padding:22px;margin-top:16px}.empty h2{margin-top:0}
.status{border-radius:18px;padding:16px;text-align:center;margin:6px 0 10px}.status b{display:block;font-size:40px;line-height:1.15;overflow-wrap:anywhere}.status small{display:block;font-weight:600}.status.owe{background:#fdeaea;color:#b42323}.status.ok{background:#e3f5ea;color:#17784a}
.fld{display:block;font-weight:700;margin:14px 0;font-size:17px}.fld input,.fld select,.fld textarea,.phone input,.phone select{display:block;width:100%;margin-top:6px;font:inherit;font-weight:400;padding:12px;border-radius:12px;border:2px solid #c8ccd6;min-height:56px;background:#fff;color:inherit}
.fld textarea{min-height:0;resize:vertical}input:focus,select:focus,textarea:focus{outline:3px solid #c9d6f4;border-color:#2b59c3}.bignum{font-size:30px!important;font-weight:700!important}.hint{display:block;font-weight:400;font-size:15px;color:#5b6475;margin-top:4px}
.phone{display:flex;gap:8px}.phone select{flex:0 0 40%;margin-top:6px}.phone input{flex:1}.phone .btn{margin:6px 0 0}
.seg{display:flex;gap:8px;margin-top:6px}.seg.wrap{flex-wrap:wrap}.seg button{flex:1 1 40%;min-height:54px;border-radius:12px;border:2px solid #c8ccd6;background:#fff;font:inherit;font-weight:700;color:#1c2333;cursor:pointer;padding:6px}.seg button.on{background:#2b59c3;border-color:#2b59c3;color:#fff}
.chips{display:flex;flex-wrap:wrap;gap:8px}.chip{border:2px solid #d9dce4;background:#fff;border-radius:99px;padding:8px 14px;font:inherit;font-size:16px;font-weight:600;min-height:46px;cursor:pointer}.chip.on{border-color:#ff6b35;background:#fff1eb}
.welcome{text-align:center}.welcome img{margin-top:10px}.welcome .fld{text-align:left}.lead{font-size:19px;color:#3c4556}.tpls{display:grid;grid-template-columns:1fr 1fr;gap:10px}.tpl{display:flex;flex-direction:column;align-items:center;gap:4px;border:2px solid #d9dce4;background:#fff;border-radius:16px;padding:14px 8px;font:inherit;font-weight:700;min-height:96px;cursor:pointer;color:#1c2333}.tpl span{font-size:32px}.tpl:last-child{grid-column:span 2}
.err{color:#c62828;font-weight:700;min-height:1.2em;margin:6px 0}.nag{background:#fff7e0;border:2px solid #f3d27a;border-radius:16px;padding:12px;margin-bottom:10px}.nag p{margin:0 0 10px}.warn{background:#fff7e0;border:2px solid #f3d27a;border-radius:16px;padding:14px;font-size:17px}
.preview{background:#fff;border-radius:16px;padding:8px;box-shadow:0 1px 6px #1c233314;margin-bottom:6px}.preview img{display:block;width:100%;height:auto;border-radius:10px;min-height:120px}
.monthnav{display:flex;align-items:center;justify-content:space-between;gap:10px}.monthnav .btn{margin:0;min-width:56px;font-size:26px}.monthnav b{font-size:20px;text-transform:capitalize}
.filebtn{position:relative;overflow:hidden}.filebtn input{position:absolute;inset:0;opacity:0;cursor:pointer}.note{background:#fff;border-radius:14px;padding:12px;margin-top:14px}.msgline{font-weight:700;color:#2b59c3;text-align:center}
.toast{position:fixed;left:50%;bottom:110px;transform:translateX(-50%);background:#1c2333;color:#fff;padding:12px 18px;border-radius:12px;font-weight:600;z-index:20;max-width:90vw;text-align:center;box-shadow:0 6px 20px #0004}
.hist .row{min-height:64px}.hist .amt small,.hist .amt a{font-size:15px}
.hist .who b{white-space:normal}
.status.confirming{background:#eef2fb;color:#2b59c3}.status.confirming b{font-size:24px}code{word-break:break-all;font-size:14px;background:#eef2fb;padding:2px 4px;border-radius:4px}
.sendlbl{margin:4px 0 6px}.sendrow{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:8px}.sendrow .btn{margin:0;flex-direction:column;gap:2px;min-height:64px;padding:6px 4px;font-size:15px;line-height:1.2;min-width:0;overflow-wrap:anywhere}.sendrow .btn span{font-size:22px;line-height:1}
