:root{--navy:#112638;--navy2:#1d3c53;--gold:#d4ad52;--gold-dark:#76581c;--bg:#f3f6f9;--ink:#162c3c;--muted:#687b8a;--line:#dde5ec;--white:#fff;--red:#ae3542;--amber:#936510;--green:#237457;--radius:12px;font-family:Inter,Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg);font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{cursor:pointer}a{color:inherit}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #b89139}input,select,textarea{width:100%;border:1px solid #cfd9e2;border-radius:8px;background:#fff;color:var(--ink);padding:11px 12px;min-height:44px;font-size:15px}input[type=checkbox]{width:18px;min-height:18px;accent-color:var(--navy);flex-shrink:0}textarea{resize:vertical;min-height:100px}label{display:block;font-size:14px;font-weight:600;margin-bottom:18px}label input,label select,label textarea{margin-top:8px}label small{display:block;color:var(--muted);font-weight:400;margin-top:7px;line-height:1.5}h1,h2,h3,p{margin-top:0}h1{font-size:32px;letter-spacing:-1px;margin-bottom:8px}h2{font-size:23px;letter-spacing:-.5px}h3{font-size:18px}p{line-height:1.6;color:var(--muted)}[hidden]{display:none!important}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:11px 17px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-size:14px;font-weight:600;min-height:44px;text-decoration:none;white-space:nowrap}.btn:hover{background:#edf2f6}.btn.primary{background:var(--gold);color:#302510;border-color:var(--gold)}.btn.primary:hover{background:#e3c273}.btn.dark{background:var(--navy);color:#fff;border-color:var(--navy)}.btn.danger{color:var(--red);border-color:#edc6ce}.btn.small{min-height:36px;padding:7px 12px}.btn.full{width:100%}.icon{width:19px;height:19px;stroke-width:1.8;flex-shrink:0}.icon-btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);background:#fff;border-radius:8px;width:38px;height:38px;flex-shrink:0}.icon-btn:hover{background:#edf2f6}.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.error-message{color:var(--red);font-size:14px;white-space:pre-wrap}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;gap:120px;background:linear-gradient(110deg,#112638 0,#112638 47%,#f3f6f9 47%);padding:50px}.login-intro{max-width:420px;color:#fff}.brand-mini{font-size:15px;letter-spacing:3px;color:var(--gold);font-weight:700;margin-bottom:75px}.login-intro h1{font-size:52px;line-height:1.2;letter-spacing:-2px}.login-intro p{color:#adbfcd;margin-top:26px;font-size:17px;max-width:320px}.intro-rule{width:62px;height:3px;background:var(--gold);margin:45px 0 22px}.login-intro>span{font-size:12px;letter-spacing:2px;color:#adbfcd}.login-card{width:420px;background:#fff;border-radius:18px;padding:38px;box-shadow:0 18px 65px #091a2a20}.login-logo{display:block;width:185px;height:110px;object-fit:contain;margin:0 auto 32px}.login-card h2,.login-card h1{font-size:27px;margin-bottom:7px}.login-card>p{font-size:14px;margin-bottom:25px}.login-foot{text-align:center;font-size:12px!important;margin:24px 0 0!important;color:#8b9aa5}#sidebar{background:var(--navy);width:236px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;padding:32px 18px 20px;color:#abc0d0;z-index:20}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:#fff;padding:0 10px 33px}.brand img{width:44px;height:44px;object-fit:contain;background:#fff;border-radius:9px;padding:3px}.brand div{font-weight:800;letter-spacing:2px;font-size:18px}.brand span{display:block;font-size:10px;color:var(--gold);letter-spacing:2.3px;margin-top:4px}.side-label{display:block;font-size:11px;font-weight:700;letter-spacing:1.8px;padding:0 12px;margin:15px 0 12px;color:#718ea3}nav{display:flex;flex-direction:column;gap:5px;overflow:auto}nav a{display:flex;align-items:center;gap:12px;color:#afc2d1;text-decoration:none;padding:12px 14px;border-radius:8px;font-size:14px;min-height:45px}nav a:hover{background:#ffffff0b}nav a.active{background:#294358;color:#fff;box-shadow:inset 3px 0 var(--gold)}nav a.active .icon{color:var(--gold)}.nav-count{margin-left:auto;background:#dac080;color:#322912;font-size:12px;font-weight:700;padding:2px 6px;border-radius:4px}.side-bottom{margin-top:auto;padding-top:25px}.profile{width:100%;background:transparent;border:0;display:flex;gap:11px;align-items:center;text-align:left;color:#fff;padding:12px}.profile strong{font-size:14px;display:block}.profile small{font-size:12px;color:#91aabf;display:block;margin-top:5px}.avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:9px;background:var(--gold);color:var(--navy);font-size:13px;font-weight:700}.logout{background:transparent;border:0;color:#9eb4c5;font-size:13px;margin:6px 0 0 58px;padding:5px}.workspace{margin-left:236px;min-height:100vh}.topbar{height:76px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 36px;gap:15px}.breadcrumbs{font-size:14px;color:var(--muted)}.breadcrumbs span{margin:0 14px;color:#acb9c3}.breadcrumbs strong{font-weight:500;color:var(--ink)}.top-meta{display:flex;align-items:center;gap:18px;font-size:13px;color:var(--muted)}.top-divider{width:1px;height:25px;background:var(--line)}.company-dot{width:34px;height:34px;background:#eef2f6;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;color:var(--ink)}.page{padding:33px 36px 50px;max-width:1700px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:27px}.eyebrow{display:block;font-size:11px;font-weight:700;letter-spacing:2px;color:#8b722f;margin-bottom:10px}.page-heading p{font-size:14px;margin-bottom:0}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:25px}.stat{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px;position:relative}.stat-label{display:flex;justify-content:space-between;font-size:13px;font-weight:500;color:var(--muted);gap:5px}.stat-label .icon{color:#879eaf}.stat-value{font-size:29px;font-weight:700;letter-spacing:-1px;margin:15px 0 8px;overflow-wrap:anywhere}.stat-note{font-size:12px;color:var(--muted)}.stat.highlight{background:var(--navy);color:#fff;border-color:var(--navy)}.stat.highlight .stat-label,.stat.highlight .stat-note{color:#a8bed0}.stat.highlight .stat-label .icon{color:var(--gold)}.filterbar{display:flex;gap:12px;align-items:flex-end;background:#fff;padding:17px 20px;border:1px solid var(--line);border-radius:var(--radius) var(--radius) 0 0;border-bottom:0}.filterbar label{margin:0;font-size:12px;color:var(--muted);min-width:110px}.filterbar label.search{flex:1;min-width:200px;position:relative}.filterbar input,.filterbar select{margin-top:6px;font-size:14px;min-height:42px;padding:10px}.filterbar label.party-filter{min-width:170px;max-width:260px}.filterbar .search input{padding-left:36px}.search-icon{position:absolute;left:12px;bottom:11px}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.panel.connected{border-top-left-radius:0;border-top-right-radius:0}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:20px 22px;border-bottom:1px solid var(--line)}.panel-head h2{font-size:17px;margin:0}.panel-head .sub{font-size:12px;color:var(--muted);margin-top:6px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}th{padding:15px 20px;background:#f8fafc;font-size:11px;text-transform:uppercase;letter-spacing:.8px;color:#738799;font-weight:600;white-space:nowrap}td{padding:17px 20px;border-top:1px solid #eaf0f5;vertical-align:middle;line-height:1.4}tbody tr:hover{background:#fafcfd}td strong{font-weight:600}td small{display:block;font-size:12px;color:var(--muted);margin-top:4px}.number{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;font-weight:600;color:#31536c}.right{text-align:right}.amount{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}.badge{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:5px;background:#eff3f7;color:#627889;font-size:11px;font-weight:600;white-space:nowrap}.badge.amber{background:#fff3d5;color:#87600e}.badge.green{background:#eaf6f0;color:#227052}.badge.red{background:#fdecef;color:var(--red)}.badge.navy{background:#e9f0f5;color:#31536c}.row-actions{display:flex;gap:6px;justify-content:flex-end}.table-bottom{border-top:1px solid var(--line);padding:16px 20px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:13px;color:var(--muted)}.pagination{display:flex;align-items:center;gap:10px}.pagination .btn{min-height:32px;padding:6px 10px;font-size:12px}.notice{display:flex;align-items:flex-start;gap:11px;padding:15px 18px;border:1px solid #efd49a;border-radius:9px;background:#fff8e8;color:#785512;font-size:14px;line-height:1.5;margin-bottom:20px}.notice p{color:inherit;margin:0;font-size:14px}.notice strong{display:block}.notice .icon{margin-top:2px}.notice.info{background:#edf5fb;border-color:#cddfeb;color:#31536c}.notice.error{background:#fdecef;border-color:#f0bdc8;color:var(--red)}.empty{padding:65px 25px;text-align:center}.empty .icon{width:38px;height:38px;color:#9bafbd;margin-bottom:14px}.empty h3{font-size:18px;margin-bottom:8px}.empty p{font-size:14px;max-width:440px;margin:0 auto 20px}.loading{padding:50px;text-align:center;color:var(--muted);font-size:14px}.spinner{display:inline-block;width:20px;height:20px;border:2px solid #d8e2ea;border-top-color:#b58a30;border-radius:50%;animation:spin .7s linear infinite;vertical-align:middle;margin-right:8px}@keyframes spin{to{transform:rotate(360deg)}}.dashboard-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:22px}.summary-strip{background:var(--navy);border-radius:12px;padding:26px;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.summary-strip h2{font-size:22px;margin-bottom:8px}.summary-strip p{color:#abc0d0;font-size:14px;margin:0}.chart-list{padding:23px}.chart-row{margin-bottom:22px}.chart-row:last-child{margin-bottom:0}.chart-label{display:flex;justify-content:space-between;gap:10px;font-size:13px;margin-bottom:9px}.chart-label span{max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bar{height:7px;background:#edf2f5;border-radius:4px}.bar>i{height:100%;display:block;background:var(--gold);border-radius:4px}.body-panel{padding:25px}.body-panel p{font-size:14px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:23px}.pending-input{width:145px;min-height:38px;padding:8px;font-size:14px}.pending-save{display:flex;align-items:center;gap:8px}.mobile-menu{display:none}footer{padding:0 36px 24px;display:flex;justify-content:space-between;font-size:12px;color:#8c9ca9}dialog{border:0;border-radius:15px;width:min(660px,calc(100vw - 30px));padding:0;max-height:92vh;box-shadow:0 30px 100px #07152245;color:var(--ink)}dialog::backdrop{background:#081b2a99;backdrop-filter:blur(3px)}dialog.fullscreen{width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;border-radius:0}dialog.wide{width:min(1100px,calc(100vw - 30px))}.modal-head{position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:22px 28px}.modal-head h2{margin:0;font-size:22px}.modal-head p{margin:6px 0 0;font-size:13px}.modal-content{padding:28px}.modal-foot{background:#fff;border-top:1px solid var(--line);padding:19px 28px;display:flex;justify-content:flex-end;gap:10px;position:sticky;bottom:0;z-index:2}.challan-layout{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:1.45fr 1fr;gap:35px;padding:40px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 22px}.form-grid .span2{grid-column:1/-1}.field-note{font-size:12px;color:var(--muted);margin:7px 0 0}.required{color:var(--red)}.photo-panel{background:#f5f8fa;border:1px dashed #b7c7d3;border-radius:12px;padding:24px;min-height:250px;text-align:center}.photo-panel .icon{width:32px;height:32px;color:#9aafbf;margin:10px 0 20px}.photo-panel h3{font-size:16px;margin:0 0 8px}.photo-panel p{font-size:13px}.photo-panel input{font-size:13px}.photo-preview{width:100%;max-height:340px;object-fit:contain;margin-top:18px;border-radius:8px}.checkbox-line{display:flex;align-items:center;gap:9px;margin:15px 0;font-size:14px;font-weight:400}.party-picker{position:relative}.picker-results{position:absolute;z-index:5;left:0;right:0;top:100%;max-height:240px;overflow:auto;background:#fff;border:1px solid var(--line);box-shadow:0 10px 25px #162c3c20;border-radius:8px;padding:5px}.picker-results button{display:block;text-align:left;border:0;background:#fff;padding:12px;width:100%;font-size:14px;border-radius:5px}.picker-results button:hover,.picker-results button:focus{background:#edf2f6}.permission-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;margin:20px 0}.permission-grid label{display:flex;align-items:center;gap:9px;font-weight:400;margin:0;padding:6px}.permission-grid input{margin:0}.details-json{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.6;background:#f4f7fa;padding:18px;border-radius:8px;max-height:45vh;overflow:auto}.photo-viewer{display:block;width:100%;max-height:70vh;object-fit:contain}.import-drop{border:2px dashed #cdd9e3;background:#f8fafc;border-radius:12px;padding:38px;text-align:center}.import-drop .icon{width:40px;height:40px;color:#a28a4f;margin-bottom:20px}.import-drop input{max-width:420px;display:block;margin:20px auto}.import-stats{display:flex;gap:15px;margin:20px 0}.import-stats>div{flex:1;padding:20px;background:#f5f8fa;border-radius:8px}.import-stats strong{font-size:26px;display:block;margin-bottom:8px}.import-stats span{font-size:13px;color:var(--muted)}.lock-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:16px 0;font-size:14px}.lock-row:first-child{border-top:0}.lock-row small{display:block;color:var(--muted);margin-top:4px}.backup-meta{font-size:13px;color:var(--muted);line-height:1.7}.restore-notice{font-size:13px;color:var(--muted);margin-top:15px}.report-paper{background:#fff;padding:35px;margin:20px auto;max-width:850px;border:1px solid var(--line);box-shadow:0 4px 12px #152c4009}.paper-title{display:flex;justify-content:space-between;gap:20px;border-bottom:2px solid var(--ink);padding-bottom:16px;margin-bottom:24px}.paper-title img{width:130px;height:75px;object-fit:contain}.paper-title h3{font-size:20px;margin-bottom:8px}.paper-title p{font-size:12px;margin:0}.paper-totals{display:flex;gap:30px;font-size:14px;margin:20px 0}.report-paper th,.report-paper td{padding:12px 10px}.report-paper .missing-row{background:#fff3d5}.paper-footer{font-size:11px;color:var(--muted);margin-top:24px;border-top:1px solid var(--line);padding-top:12px}.report-preview{background:#e9eff4;padding:10px;min-height:70vh}.toast{background:var(--navy);color:#fff;border-radius:10px;padding:14px 19px;box-shadow:0 8px 25px #0a1c3030;font-size:14px;max-width:420px;margin-top:8px;line-height:1.5}.toast.error{background:#922e3b}#toasts{position:fixed;bottom:24px;right:25px;z-index:100}#print-root{display:none}.status-line{display:flex;align-items:center;gap:10px}.muted{color:var(--muted)}.caption{font-size:12px;color:var(--muted)}.inline-month{max-width:190px}.checkcell{width:45px;padding-right:0}.checkcell input{margin:0}.numeric{font-variant-numeric:tabular-nums}.subheading{font-size:14px;font-weight:600;color:var(--ink);margin:24px 0 14px}.draft-recovery{display:flex;align-items:center;justify-content:space-between;gap:15px}.help-list{font-size:14px;color:var(--muted);line-height:1.8;padding-left:20px}.confirm-form p{color:var(--ink)}.inline-error{margin-top:15px;color:var(--red);font-size:14px}.year-input{max-width:120px}
@media(min-width:1500px){.page{padding:40px 48px}.topbar{padding:0 48px}}
@media(max-width:1150px){#sidebar{width:210px}.workspace{margin-left:210px}.page{padding:27px 24px}.topbar{padding:0 24px}.stat{padding:17px}.stat-value{font-size:24px}.filterbar{flex-wrap:wrap}.filterbar .search{flex-basis:100%;min-width:0}.filterbar label{flex:1}.dashboard-grid{grid-template-columns:1fr 1fr}.login-page{gap:50px}.login-intro h1{font-size:40px}}
@media(max-width:820px){#sidebar{transform:translateX(-100%);width:236px;transition:transform .2s}#sidebar.open{transform:translateX(0)}#scrim:not([hidden]){position:fixed;inset:0;background:#091b2b70;z-index:19}.workspace{margin-left:0}.mobile-menu{display:inline-flex}.topbar{height:65px;padding:0 20px;justify-content:flex-start}.top-meta{margin-left:auto}.top-meta>#today-label,.top-divider{display:none}.page{padding:25px 20px}.page-heading{align-items:flex-start}h1{font-size:28px}.page-heading .actions .btn{padding:10px 12px}.stats{grid-template-columns:1fr 1fr;gap:12px}.dashboard-grid{grid-template-columns:1fr}.two-col{grid-template-columns:1fr}.login-page{background:var(--navy);padding:25px;gap:0}.login-intro{display:none}.login-card{max-width:420px;width:100%;padding:30px}.challan-layout{grid-template-columns:1fr;padding:25px;gap:20px}.summary-strip{align-items:flex-start}.row-actions .icon-btn{width:36px;height:36px}footer{padding:0 20px 24px}.report-paper{padding:22px}dialog.fullscreen .modal-head,dialog.fullscreen .modal-foot{padding:18px 22px}.breadcrumbs{font-size:12px}.breadcrumbs span{margin:0 8px}}
@media(max-width:520px){.page-heading{flex-direction:column;gap:16px}.page-heading .actions{width:100%}.page-heading .actions .primary{margin-left:auto}.stats{gap:10px}.stat{padding:16px}.stat-value{font-size:25px}.stat-label{font-size:12px}.stat-note{font-size:11px}.filterbar{padding:14px;gap:10px}.filterbar label.party-filter{min-width:100%;max-width:none}.filterbar label{min-width:85px}.filterbar .year-input{max-width:none}.form-grid{grid-template-columns:1fr;gap:0}.form-grid .span2{grid-column:auto}.modal-content{padding:22px}.modal-head{padding:18px 22px}.modal-head h2{font-size:20px}.modal-foot{padding:15px 22px}.challan-layout{padding:22px}.summary-strip{flex-direction:column}.panel-head{padding:18px}.table-bottom{align-items:flex-start;flex-direction:column}.table-wrap table{min-width:650px}.mobile-register{min-width:600px!important}.permission-grid{grid-template-columns:1fr}.paper-title{flex-direction:column}.paper-totals{gap:15px;flex-wrap:wrap}.import-stats{gap:8px}.import-stats>div{padding:13px}.import-stats strong{font-size:22px}#toasts{left:16px;right:16px;bottom:16px}.toast{max-width:none}.draft-recovery{flex-direction:column;align-items:flex-start}.report-preview{padding:0}footer span{display:none}}
@media print{body{background:#fff}body>*{display:none!important}#print-root{display:block!important}.report-paper{border:0;box-shadow:none;padding:0;margin:0;max-width:none;page-break-after:always;break-after:page}.report-paper:last-child{page-break-after:auto;break-after:auto}.report-paper th{background:#eaf0f5!important}.report-paper .missing-row{background:#fff3d5!important}table{font-size:11px}tr{break-inside:avoid}thead{display:table-header-group}.paper-title{display:flex;flex-direction:row}.paper-title img{width:110px;height:60px}.paper-totals{font-size:12px}*{-webkit-print-color-adjust:exact;print-color-adjust:exact}@page{size:A4;margin:16mm}}

/* Compact operations, responsive registers and A4 statements */
.challan-fab{position:fixed;right:28px;bottom:28px;z-index:18;width:58px;height:58px;border:0;border-radius:50%;background:var(--gold);color:#2f260f;font-size:34px;line-height:1;box-shadow:0 10px 28px #1126383d;display:grid;place-items:center}.challan-fab:hover{transform:translateY(-2px);background:#e2c16e}.quick-actions{display:flex;gap:10px;flex-wrap:wrap;margin:-10px 0 24px}.bulk-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 20px;background:#f7f9fb;border-bottom:1px solid var(--line)}.bulk-bar strong{margin-right:auto;font-size:13px}.bulk-bar select{width:auto;min-width:210px}.party-head .actions input{width:220px}.icon-btn.danger{color:var(--red);border-color:#edc6ce}.settings-sections{display:grid;grid-template-columns:1fr 1fr;gap:34px}.settings-sections>section+section{border-left:1px solid var(--line);padding-left:34px}.party-import-card{margin-top:24px}.party-import-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.party-import-form{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}.import-preview-table{max-height:430px;margin-bottom:18px}.mobile-register tbody tr:nth-child(even),.mobile-parties tbody tr:nth-child(even){background:#f7f9fb}.register-wrap .mobile-register th:nth-last-child(6),.register-wrap .mobile-register td:nth-last-child(6){width:116px;padding-right:9px}.register-wrap .mobile-register th:nth-last-child(5),.register-wrap .mobile-register td:nth-last-child(5){padding-left:9px}.register-wrap .mobile-register th:nth-last-child(4),.register-wrap .mobile-register td:nth-last-child(4){width:120px}.register-wrap .mobile-register th:nth-last-child(3),.register-wrap .mobile-register td:nth-last-child(3){width:155px}.report-paper{padding:18px 22px}.paper-title{align-items:flex-start;padding-bottom:7px;margin-bottom:9px;border-bottom-width:1.5px}.paper-title img{width:82px;height:42px}.paper-title h3{font-size:15px;margin-bottom:3px}.paper-title p{font-size:10px;line-height:1.3}.paper-totals{gap:20px;font-size:11px;margin:7px 0}.print-warning{display:flex;align-items:center;gap:8px;background:#fff3d5;border:1px solid #efd49a;padding:4px 7px;margin:6px 0;font-size:8px;line-height:1.2}.print-warning strong{white-space:nowrap}.print-table{table-layout:fixed;font-size:10px}.print-table .print-date{width:17%}.print-table .print-number{width:17%}.print-table .print-amount{width:20%}.print-table .print-remarks{width:46%}.report-paper .print-table th{padding:5px 7px;font-size:8px;letter-spacing:.35px}.report-paper .print-table td{padding:4px 7px;line-height:1.2;overflow-wrap:anywhere}.report-paper+.report-paper{border-top:2px solid #6f7f8a}.report-preview.print-continuous .report-paper{margin-bottom:10px}.report-preview.print-separate .report-paper{margin-bottom:22px}.notice.compact{padding:9px 12px;margin-bottom:12px}.notice.compact p{font-size:12px}.print-controls label{margin-bottom:0;max-width:460px}

@media(max-width:820px){.challan-fab{right:18px;bottom:18px;width:54px;height:54px}.quick-actions{margin-top:-4px}.party-head{align-items:flex-start;flex-direction:column}.party-head .actions,.party-head .actions input{width:100%}.bulk-bar{align-items:stretch}.bulk-bar strong{width:100%}.bulk-bar select{flex:1;min-width:0}.settings-sections{grid-template-columns:1fr}.settings-sections>section+section{border-left:0;border-top:1px solid var(--line);padding-left:0;padding-top:28px}.party-import-intro{flex-direction:column}.parties-wrap,.register-wrap{overflow:visible}.mobile-register,.mobile-parties{display:block;min-width:0!important}.mobile-register thead,.mobile-parties thead{display:none}.mobile-register tbody,.mobile-parties tbody{display:grid}.mobile-register tr,.mobile-parties tr{display:grid;border-top:1px solid var(--line);padding:12px 14px;gap:7px 12px}.mobile-register td,.mobile-parties td{display:block;width:auto!important;padding:0!important;border:0;text-align:left!important;min-width:0;overflow-wrap:anywhere}.mobile-register td:before,.mobile-parties td:before{display:block;color:#738799;font-size:9px;font-weight:700;letter-spacing:.55px;text-transform:uppercase;margin-bottom:2px}.mobile-register tr{grid-template-columns:minmax(0,1.5fr) minmax(86px,.75fr)}.mobile-register td:nth-last-child(6){grid-column:1}.mobile-register td:nth-last-child(6):before{content:'Date'}.mobile-register td:nth-last-child(5){grid-column:1/-1;grid-row:2}.mobile-register td:nth-last-child(5):before{content:'Party / Remarks'}.mobile-register td:nth-last-child(4){grid-column:2;grid-row:1}.mobile-register td:nth-last-child(4):before{content:'Challan No.'}.mobile-register td:nth-last-child(3){grid-column:1;grid-row:3}.mobile-register td:nth-last-child(3):before{content:'Amount'}.mobile-register td:nth-last-child(2){grid-column:2;grid-row:3}.mobile-register td:nth-last-child(2):before{content:'Status'}.mobile-register td:nth-last-child(1){grid-column:1/-1;grid-row:4}.mobile-register td:nth-last-child(1):before{content:'Actions'}.mobile-register .row-actions{justify-content:flex-start}.pending-save{max-width:240px}.pending-input{width:100%}.mobile-parties tr{grid-template-columns:26px minmax(0,1fr) minmax(0,1fr)}.mobile-parties td:nth-last-child(1){grid-column:1/-1}.mobile-parties td:nth-last-child(1):before{content:'Actions'}.mobile-parties .row-actions{justify-content:flex-start;flex-wrap:wrap}.mobile-parties .checkcell{grid-column:1;grid-row:1/3}.mobile-parties td:nth-child(2):before{content:'Party no.'}.mobile-parties td:nth-child(3):before{content:'Party / person'}.mobile-parties td:nth-child(4):before{content:'Type / prefix'}.mobile-parties td:nth-child(5):before{content:'Contact'}.mobile-parties td:nth-child(6):before{content:'Status'}.mobile-parties tr:not(:has(.checkcell)){grid-template-columns:repeat(2,minmax(0,1fr))}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(1):before{content:'Party no.'}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(2):before{content:'Party / person'}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(3):before{content:'Type / prefix'}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(4):before{content:'Contact'}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(5):before{content:'Status'}}

@media(max-width:520px){.quick-actions>*{flex:1 1 calc(50% - 10px)}.bulk-bar select,.bulk-bar .btn{width:100%}.party-import-intro .btn{width:100%}.mobile-register tr{grid-template-columns:minmax(0,1.35fr) minmax(82px,.65fr)}.report-paper{padding:14px}.paper-title{flex-direction:row}.paper-title img{width:70px;height:36px}.paper-totals{gap:8px 14px}.settings-sections{gap:24px}}

@media print{body{font-family:Arial,Helvetica,sans-serif}#print-root{width:100%}.report-paper{padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;max-width:none!important}.print-continuous .report-paper{page-break-after:auto;break-after:auto;padding-top:4mm!important}.print-continuous .report-paper:first-child{padding-top:0!important}.print-continuous .report-paper+.report-paper{border-top:1px solid #55616a!important;margin-top:3mm!important}.print-separate .report-paper{page-break-after:always;break-after:page}.print-separate .report-paper:last-child{page-break-after:auto;break-after:auto}.paper-title{display:flex!important;flex-direction:row!important;margin-bottom:2mm!important;padding-bottom:1.5mm!important}.paper-title img{width:22mm!important;height:11mm!important}.paper-title h3{font-size:11pt!important}.paper-title p{font-size:7pt!important}.paper-totals{font-size:7.5pt!important;margin:1.5mm 0!important}.print-warning{font-size:6pt!important;padding:1mm 1.5mm!important;margin:1.5mm 0!important}.print-table{font-size:7pt!important}.report-paper .print-table th{padding:1.2mm 1.5mm!important;font-size:6pt!important}.report-paper .print-table td{padding:1.1mm 1.5mm!important;line-height:1.12!important}.report-paper .missing-row{background:#fff3d5!important}@page{size:A4;margin:7mm}}
@media screen and (max-width:520px){.mobile-register{min-width:0!important;display:block}.mobile-register thead{display:none}.mobile-register tbody{display:block;padding:0 14px}.mobile-register tr{display:grid;grid-template-columns:minmax(0,1fr) auto;border-top:1px solid var(--line);padding:14px 0;gap:7px 10px}.mobile-register tr:first-child{border-top:0}.mobile-register td{display:block;border:0;padding:0;overflow-wrap:anywhere}.mobile-register td:nth-last-child(6){grid-column:1;grid-row:1;color:var(--muted);font-size:12px}.mobile-register td:nth-last-child(5){grid-column:1/-1;grid-row:2;font-size:15px;padding:4px 0}.mobile-register td:nth-last-child(4){grid-column:2;grid-row:1;text-align:right}.mobile-register td:nth-last-child(3){grid-column:1;grid-row:3;text-align:left;font-size:16px}.mobile-register td:nth-last-child(2){grid-column:2;grid-row:3;text-align:right}.mobile-register td:nth-last-child(1){grid-column:1/-1;grid-row:4;margin-top:5px}.mobile-register td:nth-last-child(5) small{font-size:12px}.mobile-register .row-actions{justify-content:flex-end}.mobile-register .pending-save{flex-wrap:wrap}.mobile-register .pending-input{max-width:130px}.mobile-register .number{font-size:12px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.mobile-bottom-nav{display:none}.challan-number-input{border:0!important;border-radius:0!important;background:transparent!important;padding:3px 0!important;min-height:42px!important;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:30px!important;line-height:1.15;font-weight:800!important;letter-spacing:.5px;color:var(--navy)!important;box-shadow:none!important}.challan-number-input:focus{outline:0;box-shadow:inset 0 -2px var(--gold)!important}.challan-number-input:disabled{opacity:.52;cursor:not-allowed}.challan-number-field{padding:10px 0 4px;border-bottom:1px solid var(--line)}.photo-capture-panel{min-height:280px}.photo-actions{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin:18px 0 12px}.photo-actions label{margin:0}.settings-page{display:grid;gap:22px;max-width:1180px}.settings-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:25px}.settings-card>h2,.settings-section-head h2{font-size:20px;margin-bottom:7px}.settings-card>p,.settings-section-head p{font-size:13px;margin-bottom:20px}.settings-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.settings-section-head input{max-width:280px}.prefix-table-wrap{max-height:560px;border:1px solid var(--line);border-radius:9px}.prefix-table-wrap thead{position:sticky;top:0;z-index:1}.prefix-input{max-width:150px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;text-transform:uppercase}.backup-alert-small{border-left:4px solid var(--red);background:#fdecef;color:#852d39;border-radius:6px;padding:9px 12px;margin:0 0 14px;font-size:12px;font-weight:600}.backup-last{font-size:13px;color:var(--muted);margin:0 0 18px}.cron-box{margin-top:22px;padding:14px;background:#f4f7fa;border-radius:9px;display:grid;grid-template-columns:1fr auto;gap:8px 14px;align-items:center}.cron-box span{grid-column:1/-1;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.6px}.cron-box code{min-width:0;overflow-wrap:anywhere;color:#31536c;font-size:12px}

@media(max-width:820px){.mobile-bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;z-index:25;height:calc(66px + env(safe-area-inset-bottom));padding:5px 3px env(safe-area-inset-bottom);background:#fff;border-top:1px solid var(--line);box-shadow:0 -6px 20px #11263812}.mobile-bottom-nav a{display:flex;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-decoration:none;color:#6a7e8e;font-size:10px;font-weight:600;border-radius:8px}.mobile-bottom-nav a .icon{width:20px;height:20px}.mobile-bottom-nav a.active{color:var(--navy);background:#f0f4f7}.mobile-bottom-nav a.active .icon{color:#b98b25}.workspace{padding-bottom:calc(75px + env(safe-area-inset-bottom))}.challan-fab{bottom:calc(78px + env(safe-area-inset-bottom));z-index:24}.settings-card{padding:19px}.settings-section-head{flex-direction:column}.settings-section-head input{max-width:none;width:100%}.cron-box{grid-template-columns:1fr}.cron-box .btn{width:100%}.prefix-table-wrap{overflow:visible;max-height:none;border:0}.mobile-prefixes{display:block;min-width:0!important}.mobile-prefixes thead{display:none}.mobile-prefixes tbody{display:grid;gap:10px}.mobile-prefixes tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:13px;border:1px solid var(--line);border-radius:9px}.mobile-prefixes td{display:block;border:0;padding:0!important}.mobile-prefixes td:nth-child(1){grid-column:1}.mobile-prefixes td:nth-child(2){grid-column:2}.mobile-prefixes td:nth-child(3){grid-column:1}.mobile-prefixes td:nth-child(4){grid-column:2;align-self:end}.mobile-prefixes .prefix-input{max-width:none}.mobile-parties tr{grid-template-columns:26px minmax(0,1fr) auto!important;gap:8px 12px!important;padding:14px!important}.mobile-parties td:before{display:none!important}.mobile-parties .checkcell{grid-column:1!important;grid-row:1/6!important}.mobile-parties td:nth-child(2){grid-column:2!important;grid-row:2!important}.mobile-parties td:nth-child(2):before{display:inline!important;content:'Party no. ';font-size:9px;margin-right:4px}.mobile-parties td:nth-child(3){grid-column:2/4!important;grid-row:1!important;font-size:15px}.mobile-parties td:nth-child(4){grid-column:3!important;grid-row:2!important;text-align:right!important}.mobile-parties td:nth-child(5){grid-column:2/4!important;grid-row:3!important;color:var(--muted);font-size:12px}.mobile-parties td:nth-child(5):empty{display:none}.mobile-parties td:nth-child(6){grid-column:2!important;grid-row:4!important}.mobile-parties td:nth-child(7){grid-column:2/4!important;grid-row:5!important;margin-top:3px}.mobile-parties .row-actions{justify-content:flex-start!important}.mobile-parties tr:not(:has(.checkcell)){grid-template-columns:minmax(0,1fr) auto!important}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(1){grid-column:1!important;grid-row:2!important}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(2){grid-column:1/3!important;grid-row:1!important}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(3){grid-column:2!important;grid-row:2!important}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(4){grid-column:1/3!important;grid-row:3!important}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(5){grid-column:1!important;grid-row:4!important}.mobile-parties tr:not(:has(.checkcell)) td:nth-child(6){grid-column:1/3!important;grid-row:5!important}}

@media(max-width:520px){.photo-actions{display:grid;grid-template-columns:1fr}.photo-actions .btn{width:100%}.challan-number-input{font-size:28px!important}.settings-card .form-grid{grid-template-columns:1fr}.settings-card .form-grid .span2{grid-column:auto}.page{padding-bottom:30px}}

@media print{.mobile-bottom-nav{display:none!important}}

.challan-number-field{border-bottom:0}

/* Final mobile record layout */
.parties-wrap td.number{font-size:15px;font-weight:700}.party-link{appearance:none;border:0;background:transparent;color:var(--ink);font:inherit;font-weight:700;padding:0;text-align:left;cursor:pointer}.party-link:hover{text-decoration:underline}.filter-party-picker{position:relative}.filter-party-picker .picker-results{top:calc(100% + 5px);min-width:260px}.text-action{display:inline-block;border:0;background:transparent;color:#76581c;font-size:12px;font-weight:700;padding:5px 0;margin:0 0 3px;text-align:left}.challan-number-input{font-family:inherit!important;font-size:15px!important;line-height:1.35!important;font-weight:700!important;letter-spacing:0!important;min-height:36px!important}.party-detail-card{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:22px;margin-bottom:18px}.party-detail-card h2{margin-bottom:5px}.party-detail-card p{margin:0}.party-detail-meta{display:flex;gap:26px;flex-wrap:wrap}.party-detail-meta span{min-width:80px}.party-detail-meta small{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.7px;margin-bottom:5px}.party-detail-meta strong{font-size:14px}.party-number-prominent{font-size:16px!important}.party-detail-stats{grid-template-columns:repeat(3,minmax(0,1fr))}

@media(max-width:820px){
 body{overflow-x:hidden}#sidebar{z-index:40;overflow-y:auto;display:block;padding-bottom:28px}#sidebar nav{overflow:visible}#scrim:not([hidden]){z-index:39}.side-bottom{margin-top:20px;padding-top:10px}.drawer-open .mobile-bottom-nav,.drawer-open .challan-fab{display:none!important}
 .filter-party-picker .picker-results{position:absolute;left:0;right:0;min-width:0;max-height:260px}.filterbar .party-filter{min-width:100%;max-width:none}.filterbar>[data-action="clear-filters"],.filterbar>[data-action="range"]{flex:1}
 .record-edge,body[data-view="dashboard"] .dashboard-grid>.panel:first-child,body[data-view="parties"] #content>.panel,body[data-view="reports"] #content>.panel.connected{width:calc(100% + 36px);margin-left:-18px;margin-right:-18px;border-radius:8px}
 .register-wrap{overflow:visible!important}.mobile-register{display:block!important;min-width:0!important;width:100%!important}.mobile-register thead{display:none!important}.mobile-register tbody{display:block!important;width:100%!important;padding:0!important}.mobile-register tr{position:relative;display:grid!important;grid-template-columns:auto auto minmax(0,1fr) auto!important;grid-template-rows:auto auto auto!important;gap:6px 10px!important;width:calc(100% - 4px)!important;margin:0 2px!important;padding:11px 12px!important;border-top:1px solid var(--line)!important}.mobile-register tr:first-child{border-top:0!important}.mobile-register tbody tr:nth-child(even){background:#f2f5f7!important}.mobile-register td{display:block!important;width:auto!important;padding:0!important;border:0!important;min-width:0!important;text-align:left!important}.mobile-register td:before{display:block!important;color:#738799;font-size:8px!important;font-weight:700;letter-spacing:.5px;text-transform:uppercase;margin:0 0 1px!important}.mobile-register td:nth-last-child(6){grid-column:1!important;grid-row:1!important;color:var(--muted);font-size:12px!important}.mobile-register td:nth-last-child(6):before{content:'Date'!important}.mobile-register td:nth-last-child(4){grid-column:2!important;grid-row:1!important}.mobile-register td:nth-last-child(4):before{content:'Challan No.'!important}.mobile-register td:nth-last-child(4) .number{font-size:16px!important;font-weight:800}.mobile-register td:nth-last-child(1){grid-column:4!important;grid-row:1!important;align-self:center;margin:0!important}.mobile-register td:nth-last-child(1):before{display:none!important}.mobile-register td:nth-last-child(5){grid-column:1/5!important;grid-row:2!important;padding-top:2px!important;font-size:15px!important}.mobile-register td:nth-last-child(5):before{display:none!important}.mobile-register td:nth-last-child(5) small{font-size:11px;margin-top:2px}.mobile-register td:nth-last-child(3){grid-column:1/4!important;grid-row:3!important;font-size:15px!important}.mobile-register td:nth-last-child(3):before{content:'Amount'!important}.mobile-register td:nth-last-child(2){grid-column:4!important;grid-row:3!important;align-self:end}.mobile-register td:nth-last-child(2):before{content:'Status'!important}.mobile-register .compact-row-actions{justify-content:flex-end!important;gap:5px}.mobile-register .compact-row-actions .icon-btn{width:32px;height:32px}.mobile-register .pending-save{max-width:230px;flex-wrap:nowrap}.mobile-register .pending-input{width:150px;max-width:150px}
 body[data-view="dashboard"] .dashboard-grid>.panel:first-child .table-wrap{overflow:visible}body[data-view="dashboard"] .dashboard-grid>.panel:first-child table{display:block;width:100%}body[data-view="dashboard"] .dashboard-grid>.panel:first-child thead{display:none}body[data-view="dashboard"] .dashboard-grid>.panel:first-child tbody{display:block;width:100%}body[data-view="dashboard"] .dashboard-grid>.panel:first-child tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;width:calc(100% - 4px);margin:0 2px;padding:12px;border-top:1px solid var(--line)}body[data-view="dashboard"] .dashboard-grid>.panel:first-child tr:nth-child(even){background:#f2f5f7}body[data-view="dashboard"] .dashboard-grid>.panel:first-child td{display:block;padding:0;border:0;min-width:0}body[data-view="dashboard"] .dashboard-grid>.panel:first-child td:nth-child(1){grid-column:1/3;font-size:14px}body[data-view="dashboard"] .dashboard-grid>.panel:first-child td:nth-child(2){grid-column:1;color:var(--muted);font-size:12px}body[data-view="dashboard"] .dashboard-grid>.panel:first-child td:nth-child(3){grid-column:2;grid-row:2;text-align:right}
 body[data-view="reports"] .panel.connected .table-wrap{overflow:visible}body[data-view="reports"] .panel.connected table{display:block!important;min-width:0!important;width:100%}body[data-view="reports"] .panel.connected thead{display:none}body[data-view="reports"] .panel.connected tbody{display:block;width:100%}body[data-view="reports"] .panel.connected tr{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:7px 10px;width:calc(100% - 4px);margin:0 2px;padding:12px;border-top:1px solid var(--line)}body[data-view="reports"] .panel.connected tr:nth-child(even){background:#f2f5f7}body[data-view="reports"] .panel.connected td{display:block;width:auto!important;padding:0!important;border:0!important;min-width:0;text-align:left!important}body[data-view="reports"] .panel.connected td:nth-child(1){grid-column:1;grid-row:1/4}body[data-view="reports"] .panel.connected td:nth-child(2){grid-column:2/4;grid-row:1}body[data-view="reports"] .panel.connected td:nth-child(3){grid-column:2;grid-row:2}body[data-view="reports"] .panel.connected td:nth-child(3):before{content:'Challans: ';color:var(--muted);font-size:10px}body[data-view="reports"] .panel.connected td:nth-child(4){grid-column:3;grid-row:2;text-align:right!important}body[data-view="reports"] .panel.connected td:nth-child(5){grid-column:2;grid-row:3}body[data-view="reports"] .panel.connected td:nth-child(6){grid-column:3;grid-row:3;text-align:right!important}
 .parties-wrap{overflow:visible!important}.mobile-parties tbody{width:100%!important;padding:0!important}.mobile-parties tr{width:calc(100% - 4px)!important;margin:0 2px!important}.mobile-parties tbody tr:nth-child(even){background:#f2f5f7!important}.mobile-parties td.number{font-size:15px!important;font-weight:800}.party-detail-card{flex-direction:column;padding:18px}.party-detail-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:14px}.party-detail-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:520px){.party-detail-stats{grid-template-columns:1fr 1fr}.party-detail-stats .stat:last-child{grid-column:1/3}.challan-number-input{font-size:15px!important}}

@media(max-width:820px){body[data-view="dashboard"] .dashboard-grid>.panel:first-child table{min-width:0!important}}

/* Desktop full-sidebar scrolling and collapse control */
@media(min-width:821px){
 #sidebar{display:block;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#71879a transparent;transition:width .2s ease}#sidebar::-webkit-scrollbar{width:6px}#sidebar::-webkit-scrollbar-thumb{background:#71879a;border-radius:10px}#sidebar nav{overflow:visible}.side-bottom{margin-top:22px;padding-top:8px}.workspace{transition:margin-left .2s ease}
 .desktop-sidebar-toggle{display:grid;place-items:center;position:fixed;z-index:42;top:22px;left:218px;width:34px;height:34px;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--navy);box-shadow:0 5px 18px #0715222b;transition:left .2s ease,transform .2s ease}.desktop-sidebar-toggle .icon{width:17px;height:17px;transform:rotate(180deg)}
 body.sidebar-collapsed #sidebar{width:78px;padding-left:10px;padding-right:10px}body.sidebar-collapsed .workspace{margin-left:78px}body.sidebar-collapsed .desktop-sidebar-toggle{left:60px}body.sidebar-collapsed .desktop-sidebar-toggle .icon{transform:none}body.sidebar-collapsed #sidebar .brand{justify-content:center;padding-left:0;padding-right:0}body.sidebar-collapsed #sidebar .brand div,body.sidebar-collapsed #sidebar .side-label,body.sidebar-collapsed #sidebar nav a span,body.sidebar-collapsed #sidebar .nav-count,body.sidebar-collapsed #sidebar .profile>span:last-child,body.sidebar-collapsed #sidebar .logout{display:none}body.sidebar-collapsed #sidebar nav a{justify-content:center;padding-left:10px;padding-right:10px}body.sidebar-collapsed #sidebar .profile{justify-content:center;padding-left:0;padding-right:0}body.sidebar-collapsed #sidebar .side-bottom{margin-top:18px}
}

@media(min-width:821px) and (max-width:1150px){.desktop-sidebar-toggle{left:192px}body.sidebar-collapsed .desktop-sidebar-toggle{left:60px}}
@media(max-width:820px){.desktop-sidebar-toggle{display:none!important}body.sidebar-collapsed #sidebar{width:236px}body.sidebar-collapsed .workspace{margin-left:0}}

/* Read-only DD/MM/YYYY field backed by the device calendar picker */
.date-picker-field{position:relative;margin-top:8px}.date-picker-field>input[type=text]{margin-top:0;padding-right:48px;cursor:pointer;background:#fff}.date-picker-open{position:absolute;right:5px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:38px;height:36px;border:0;border-left:1px solid var(--line);background:#fff;color:var(--navy);border-radius:0 7px 7px 0}.date-picker-open:hover{background:#edf2f6}.date-picker-open .icon{width:19px;height:19px}.native-date-picker{position:absolute!important;right:0;bottom:0;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;margin:0!important;border:0!important;opacity:0;pointer-events:none}

/* Finance ledger, Safari date picker and responsive payment views */
.date-picker-field>input[type=text]{pointer-events:none}.date-picker-open{pointer-events:none;z-index:1}.native-date-picker{inset:0!important;width:100%!important;height:100%!important;min-height:44px!important;opacity:.001!important;pointer-events:auto!important;cursor:pointer;z-index:2}.finance-stats{margin-top:22px}.aging-strip{display:flex;gap:12px;margin:-7px 0 20px}.aging-strip span{flex:1;background:#fff;border:1px solid var(--line);border-radius:9px;padding:12px 15px;color:var(--muted);font-size:12px}.aging-strip strong{float:right;color:var(--ink);font-size:15px}.finance-dashboard{margin-bottom:24px}.recent-challans-bottom{margin-top:24px}.missing-text{color:var(--red)!important}.payment-reversed{opacity:.62}.payment-reversed td{text-decoration-color:#be7b83}.payment-preview{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:5px 0 18px}.payment-preview span{padding:14px;border:1px solid var(--line);border-radius:9px;background:#f5f8fa}.payment-preview small,.payment-detail-grid small{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.7px;color:var(--muted);margin-bottom:5px}.payment-preview strong{font-size:18px}.missing-confirm{padding:12px;border:1px solid #efd49a;background:#fff8e8;border-radius:9px}.settlement-check{padding:12px;border:1px solid var(--line);border-radius:9px;background:#f7f9fb}.payment-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.payment-detail-grid span{padding:14px;background:#f5f8fa;border-radius:9px}.payment-detail-grid strong{overflow-wrap:anywhere}.party-detail-action{display:flex;align-items:center;justify-content:space-between;gap:12px}.party-detail-action h3{margin:0}.party-finance-stats{margin:0 0 18px}.party-ledger-panel{margin-bottom:20px}.mobile-ledger .ledger-payment,.mobile-ledger .ledger-discount{background:#f3faf6}.balance-report-panel tfoot th{font-size:12px;background:#eef3f7;border-top:2px solid var(--line)}.payment-layout{align-items:start}.challan-overview-stats{margin-top:24px}

@media(max-width:820px){
 dialog.fullscreen .modal-foot{position:static!important;bottom:auto!important;padding-bottom:calc(18px + env(safe-area-inset-bottom))}.payment-layout{padding-bottom:0}.challan-detail-grid{grid-template-columns:1fr 1fr}.modal-foot{flex-wrap:wrap}.modal-foot .btn{flex:1;min-width:120px}.party-detail-action{align-items:flex-start}.party-detail-action .btn{min-height:34px;padding:6px 9px;font-size:11px}
 .finance-stats{grid-template-columns:1fr 1fr}.aging-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.aging-strip span{padding:10px 8px;font-size:10px}.aging-strip strong{font-size:13px}.finance-dashboard{grid-template-columns:1fr}.finance-dashboard .table-wrap{overflow:visible}
 .payment-wrap{overflow:visible}.mobile-payments{display:block!important;min-width:0!important;width:100%}.mobile-payments thead{display:none}.mobile-payments tbody{display:block}.mobile-payments tr{display:grid;position:relative;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;width:calc(100% - 4px);margin:0 2px;padding:12px;border-top:1px solid var(--line)}.mobile-payments tr:nth-child(even){background:#f2f5f7}.mobile-payments td{display:block!important;padding:0!important;border:0!important;min-width:0;text-align:left!important}.mobile-payments td:nth-child(1){grid-column:1;font-size:12px;color:var(--muted)}.mobile-payments td:nth-child(2){grid-column:1;grid-row:2;font-size:15px}.mobile-payments td:nth-child(3){grid-column:2;grid-row:1;text-align:right!important}.mobile-payments td:nth-child(4){grid-column:1;grid-row:3;font-size:16px}.mobile-payments td:nth-child(5){grid-column:2;grid-row:3;text-align:right!important}.mobile-payments td:nth-child(6){grid-column:2;grid-row:2}.mobile-payments .row-actions{justify-content:flex-end}
 .party-ledger-panel .table-wrap,.balance-report-panel .table-wrap{overflow:visible}.mobile-ledger,.mobile-balance-report{display:block!important;min-width:0!important;width:100%}.mobile-ledger thead,.mobile-balance-report thead,.mobile-balance-report tfoot{display:none}.mobile-ledger tbody,.mobile-balance-report tbody{display:block}.mobile-ledger tr,.mobile-balance-report tr{display:grid;width:calc(100% - 4px);margin:0 2px;padding:12px;border-top:1px solid var(--line);gap:6px 10px}.mobile-ledger tr{grid-template-columns:auto minmax(0,1fr) auto}.mobile-balance-report tr{grid-template-columns:1fr 1fr}.mobile-ledger td,.mobile-balance-report td{display:block!important;padding:0!important;border:0!important;min-width:0;text-align:left!important}.mobile-ledger td:nth-child(1){grid-column:1;color:var(--muted);font-size:12px}.mobile-ledger td:nth-child(2){grid-column:2/4;grid-row:1}.mobile-ledger td:nth-child(3){grid-column:1}.mobile-ledger td:nth-child(3):before{content:'Debit ';font-size:9px;color:var(--muted)}.mobile-ledger td:nth-child(4){grid-column:2}.mobile-ledger td:nth-child(4):before{content:'Credit ';font-size:9px;color:var(--muted)}.mobile-ledger td:nth-child(5){grid-column:3;text-align:right!important}.mobile-ledger td:nth-child(5):before{content:'Balance ';display:block;font-size:9px;color:var(--muted)}.mobile-balance-report td:nth-child(1){grid-column:1/3;font-size:15px}.mobile-balance-report td:nth-child(n+2):before{display:block;font-size:8px;color:var(--muted);text-transform:uppercase}.mobile-balance-report td:nth-child(2):before{content:'Opening'}.mobile-balance-report td:nth-child(3):before{content:'Challans'}.mobile-balance-report td:nth-child(4):before{content:'Received'}.mobile-balance-report td:nth-child(5):before{content:'Discount'}.mobile-balance-report td:nth-child(6):before{content:'Closing'}.mobile-balance-report td:nth-child(even){text-align:left!important}.mobile-balance-report td:nth-child(odd):not(:first-child){text-align:right!important}
}
@media(max-width:520px){.payment-detail-grid{grid-template-columns:1fr 1fr}.payment-preview{grid-template-columns:1fr}.party-finance-stats{grid-template-columns:1fr 1fr}.party-finance-stats .stat:last-child{grid-column:auto}.filterbar label:has(#filter-quick){min-width:100%}}

/* Collection workspace: compact tabs, restrained status colours and month summaries */
.finance-tabs{display:inline-flex;gap:5px;padding:5px;margin:0 0 20px;background:#e7edf2;border:1px solid #d7e1e8;border-radius:11px}.finance-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 17px;border:0;border-radius:8px;background:transparent;color:#5d7282;font-size:13px;font-weight:700}.finance-tabs button.active{background:#fff;color:var(--navy);box-shadow:0 2px 8px #11263816}.finance-tabs button.active .icon{color:#b4892a}.finance-summary-cards .stat:nth-child(2):not(.highlight){border-top:3px solid #3c8b70}.finance-summary-cards .stat:nth-child(3){border-top:3px solid #5b87aa}.finance-summary-cards .stat:nth-child(4){border-top:3px solid #c7953b}.outstanding-panel{border-top:3px solid #d7aa47}.outstanding-list{display:grid}.outstanding-row{display:grid;grid-template-columns:minmax(190px,1.5fr) minmax(150px,.8fr) minmax(160px,.75fr) auto;align-items:center;gap:18px;padding:16px 20px;border-top:1px solid var(--line);border-left:4px solid transparent}.outstanding-row:first-child{border-top:0}.outstanding-row:nth-child(even){background:#fafbfc}.outstanding-row.current{border-left-color:#5b87aa}.outstanding-row.watch{border-left-color:#d4ad52;background:#fffdf7}.outstanding-row.late{border-left-color:#dc873e;background:#fff9f3}.outstanding-row.critical{border-left-color:#ae3542;background:#fff7f8}.outstanding-party .party-link{font-size:15px}.outstanding-party small,.outstanding-amount small,.outstanding-age small{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.55px;margin-bottom:4px}.outstanding-age{display:flex;align-items:center;gap:10px}.outstanding-age strong{font-size:13px}.outstanding-age em{display:block;color:var(--muted);font-size:11px;font-style:normal;margin-top:3px}.age-dot{width:9px;height:9px;border-radius:50%;background:#5b87aa;flex:none}.outstanding-row.watch .age-dot{background:#d4ad52}.outstanding-row.late .age-dot{background:#dc873e}.outstanding-row.critical .age-dot{background:#ae3542}.outstanding-amount strong{font-size:19px;font-variant-numeric:tabular-nums}.outstanding-amount .missing-text{display:block;font-size:10px;margin-top:4px}.receive-direct{background:#fff;border-color:#ddbf75;color:#5e4814}.aging-legend{display:flex;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:10px}.aging-legend span:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px;background:#5b87aa}.aging-legend .watch:before{background:#d4ad52}.aging-legend .late:before{background:#dc873e}.aging-legend .critical:before{background:#ae3542}.tone-received{box-shadow:inset 4px 0 #3c8b70}.received-panel{border-top:3px solid #3c8b70}.balance-after{font-weight:600!important;margin-top:5px!important}.balance-after.due,.due-text{color:#9c3541!important}.balance-after.advance,.advance-text{color:#346f9b!important}.balance-after.settled,.settled-text{color:#237457!important}.discount-text{color:#8a6519!important}.reversed-balance{color:#8f5960!important}.party-finance-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 20px;border-bottom:1px solid var(--line)}.party-finance-head .finance-tabs{margin:0}.month-dues-table tr{border-left:4px solid transparent}.month-dues-table tr.month-due{border-left-color:#d4ad52;background:#fffdf8}.month-dues-table tr.month-settled{border-left-color:#3c8b70;background:#f8fcfa}.month-dues-table tr.month-advance{border-left-color:#5b87aa;background:#f7fbfe}.month-dues-table .received-cell{color:#237457;font-weight:700}.selected-prefix-party{display:grid;gap:5px;padding:14px 16px;margin-bottom:20px;border:1px solid var(--line);border-left:4px solid var(--gold);border-radius:9px;background:#f8fafb}.selected-prefix-party small{font-size:10px;color:var(--muted);letter-spacing:.8px}.selected-prefix-party span{font-size:12px;color:var(--muted)}.prefix-code{display:inline-flex;padding:6px 10px;border-radius:6px;background:#e9f0f5;color:#31536c;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.6px}.prefix-manager .empty{padding:35px 20px}.outstanding-filterbar{border-radius:var(--radius);border-bottom:1px solid var(--line);margin-bottom:20px}

@media(max-width:820px){
 .finance-tabs{display:grid;grid-template-columns:1fr 1fr;width:100%;margin-bottom:14px}.finance-tabs button{min-width:0;padding:9px 8px}.outstanding-filterbar{width:calc(100% + 36px);margin-left:-18px;margin-right:-18px;padding:14px 16px}.outstanding-filterbar .search{flex-basis:100%}.outstanding-filterbar label:not(.search){flex:1;min-width:140px}.outstanding-filterbar .party-filter{min-width:100%!important}.outstanding-panel,.received-panel,.party-ledger-panel{width:calc(100% + 36px);margin-left:-18px;margin-right:-18px;border-radius:8px}.outstanding-panel .panel-head{align-items:flex-start;flex-direction:column}.outstanding-row{grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;width:calc(100% - 4px);margin:0 2px;padding:13px 12px}.outstanding-party{grid-column:1}.outstanding-age{grid-column:1;grid-row:2}.outstanding-amount{grid-column:2;grid-row:1/3;text-align:right;align-self:center}.receive-direct{grid-column:1/3;grid-row:3;width:100%;margin-top:2px}.aging-legend{gap:9px}.finance-summary-cards{grid-template-columns:1fr 1fr}.party-finance-head{align-items:stretch;flex-direction:column;padding:12px}.party-finance-head .btn{width:100%}.party-tabs{margin:0}.month-dues-wrap{overflow:visible}.month-dues-table{display:block!important;min-width:0!important;width:100%}.month-dues-table thead{display:none}.month-dues-table tbody{display:block}.month-dues-table tr{display:grid;grid-template-columns:1fr 1fr;width:calc(100% - 4px);margin:0 2px;padding:12px;gap:8px 12px;border-top:1px solid var(--line)}.month-dues-table td{display:block!important;padding:0!important;border:0!important;min-width:0;text-align:left!important}.month-dues-table td:first-child{grid-column:1/3;font-size:15px}.month-dues-table td:nth-child(n+2):before{display:block;color:var(--muted);font-size:8px;text-transform:uppercase;letter-spacing:.5px;margin-bottom:2px}.month-dues-table td:nth-child(2):before{content:'Opening'}.month-dues-table td:nth-child(3):before{content:'Challans'}.month-dues-table td:nth-child(4):before{content:'Received'}.month-dues-table td:nth-child(5):before{content:'Discount'}.month-dues-table td:nth-child(6):before{content:'Closing due'}.month-dues-table td:nth-child(even){text-align:left!important}.month-dues-table td:nth-child(odd):not(:first-child){text-align:right!important}.prefix-manager .settings-section-head .btn{width:100%}.mobile-prefixes .row-actions{justify-content:flex-end}
}
@media(max-width:520px){.finance-summary-cards{grid-template-columns:1fr 1fr}.finance-summary-cards .stat-value{font-size:21px}.outstanding-amount strong{font-size:17px}.aging-legend{display:none}.mobile-payments .balance-after{font-size:10px!important;white-space:normal}.party-finance-stats .stat-value{font-size:21px}}

/* Reliable in-panel calendar on Android, iPhone and desktop */
.date-picker-field>input[type=text]{pointer-events:auto;position:relative;z-index:1}.date-picker-open{pointer-events:auto;z-index:3;padding:0;min-height:36px;cursor:pointer}.native-date-picker{display:none!important}.calendar-popover{position:absolute;z-index:1000;left:0;top:calc(100% + 8px);width:min(320px,calc(100vw - 42px));padding:12px;background:#fff;border:1px solid #cfdce6;border-radius:13px;box-shadow:0 18px 48px #0b223440;color:var(--ink);font-weight:400}.calendar-popover.open-up{top:auto;bottom:calc(100% + 8px)}.calendar-head{display:grid;grid-template-columns:38px 1fr 38px;align-items:center;gap:7px;margin-bottom:8px}.calendar-head strong{text-align:center;font-size:14px}.calendar-head button,.calendar-foot button{border:0;border-radius:8px;background:#edf4f8;color:var(--navy);font-weight:800;min-height:36px}.calendar-head button{font-size:24px;line-height:1}.calendar-week,.calendar-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.calendar-week span{text-align:center;padding:6px 0;color:#7a8e9d;font-size:10px;font-weight:700;text-transform:uppercase}.calendar-days button,.calendar-empty{display:grid;place-items:center;min-width:0;height:36px;border:0;border-radius:8px;background:transparent;color:var(--ink);font-size:13px}.calendar-days button:hover,.calendar-days button:focus-visible{background:#eaf2f7}.calendar-days button.today{box-shadow:inset 0 0 0 1px #d1a945;color:#76581c;font-weight:800}.calendar-days button.selected{background:var(--navy);color:#fff;box-shadow:none;font-weight:800}.calendar-foot{display:flex;justify-content:flex-end;margin-top:9px;padding-top:9px;border-top:1px solid var(--line)}.calendar-foot button{padding:6px 13px;font-size:12px}

/* Consistent spacing for both Payments tabs */
body[data-view="payments"] #filters .filterbar{border-radius:var(--radius);border-bottom:1px solid var(--line);margin-bottom:20px}body[data-view="payments"] #content>.finance-tabs{margin-bottom:24px}

/* Light colour cues across the workspace */
:root{--soft-blue:#eef6fb;--soft-green:#eef8f4;--soft-gold:#fff8e8;--soft-violet:#f4f1fb}.panel{box-shadow:0 3px 14px #17364d0a}.panel-head{background:linear-gradient(90deg,#f7fbfe 0,#fff 72%)}th{background:#f1f6f9;color:#60798c}tbody tr:nth-child(even){background:#f9fbfd}.stats .stat:not(.highlight){box-shadow:0 3px 14px #17364d0a}.stats .stat:nth-child(1):not(.highlight){border-top:3px solid #5b87aa;background:linear-gradient(180deg,var(--soft-blue),#fff 46%)}.stats .stat:nth-child(2):not(.highlight){border-top:3px solid #3c8b70;background:linear-gradient(180deg,var(--soft-green),#fff 46%)}.stats .stat:nth-child(3):not(.highlight){border-top:3px solid #d0a13d;background:linear-gradient(180deg,var(--soft-gold),#fff 46%)}.stats .stat:nth-child(4):not(.highlight){border-top:3px solid #766ba5;background:linear-gradient(180deg,var(--soft-violet),#fff 46%)}.stat:nth-child(1) .stat-label .icon{color:#4c7fa5}.stat:nth-child(2) .stat-label .icon{color:#318064}.stat:nth-child(3) .stat-label .icon{color:#ae7b1d}.stat:nth-child(4) .stat-label .icon{color:#6c619e}.filterbar{background:linear-gradient(100deg,#f8fbfd,#fff)}.settings-card{box-shadow:0 3px 14px #17364d0a;border-top:3px solid #d4ad52}.settings-card:nth-child(2n){border-top-color:#5b87aa}.party-detail-card{background:linear-gradient(105deg,#f4f9fc,#fff 60%);border-left:4px solid #5b87aa}.quick-actions .btn:not(.primary):nth-child(2n){background:var(--soft-blue);border-color:#d4e5f0}.quick-actions .btn:not(.primary):nth-child(2n+1){background:var(--soft-green);border-color:#d6e9e1}.badge.navy{background:#e5f0f7;color:#285b7e}.badge.green{background:#e6f5ee}.badge.amber{background:#fff1cb}.badge.red{background:#fde9ed}

@media(max-width:820px){body[data-view="payments"] #filters .filterbar{width:calc(100% + 36px);margin-left:-18px;margin-right:-18px;padding:14px 16px}.calendar-popover{position:fixed;left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(340px,calc(100vw - 28px));z-index:1001}.calendar-popover.open-up{top:50%;bottom:auto}.calendar-days button,.calendar-empty{height:39px}}

/* Cleaner integrated calendar action */
.date-picker-field>input[type=text]{padding-right:50px}.date-picker-open{right:5px;width:34px;height:34px;min-height:34px;border:0;background:#eaf3f8;color:#285b7e;border-radius:7px;box-shadow:inset 0 0 0 1px #d4e3ec}.date-picker-open:hover{background:#dcecf5}.date-picker-open .icon{width:17px;height:17px;stroke-width:2}.date-picker-field:focus-within>input[type=text]{border-color:#7fa8c3;box-shadow:0 0 0 3px #dcecf57a}

/* Subtle record colours for quick scanning */
tbody tr.record-entered{box-shadow:inset 4px 0 #5b87aa;background:#f7fbfe}tbody tr.record-unpaid{box-shadow:inset 4px 0 #8aa2b3;background:#fafcfd}tbody tr.record-missing{box-shadow:inset 4px 0 #d1a13d;background:#fffdf6}tbody tr.record-partial{box-shadow:inset 4px 0 #cc7e39;background:#fffaf4}tbody tr.record-paid{box-shadow:inset 4px 0 #3c8b70;background:#f7fcf9}tbody tr.record-cancelled{box-shadow:inset 4px 0 #ae3542;background:#fff8f9}tbody tr.record-wholesale{box-shadow:inset 4px 0 #7569a4;background:#faf8fe}tbody tr.record-retail{box-shadow:inset 4px 0 #5b87aa;background:#f8fbfe}tbody tr.record-entered:nth-child(even),tbody tr.record-unpaid:nth-child(even){background:#f1f7fa}tbody tr.record-missing:nth-child(even){background:#fff8e8}tbody tr.record-partial:nth-child(even){background:#fff4e9}tbody tr.record-paid:nth-child(even){background:#eef8f3}tbody tr.record-cancelled:nth-child(even){background:#fdeff2}tbody tr.record-wholesale:nth-child(even){background:#f3effb}tbody tr.record-retail:nth-child(even){background:#eef6fb}tbody tr.record-entered:hover,tbody tr.record-unpaid:hover,tbody tr.record-missing:hover,tbody tr.record-partial:hover,tbody tr.record-paid:hover,tbody tr.record-cancelled:hover,tbody tr.record-wholesale:hover,tbody tr.record-retail:hover{filter:saturate(1.08) brightness(.995)}

@media(max-width:820px){.mobile-register tr.record-entered,.mobile-register tr.record-unpaid,.mobile-register tr.record-missing,.mobile-register tr.record-partial,.mobile-register tr.record-paid,.mobile-register tr.record-cancelled,.mobile-parties tr.record-wholesale,.mobile-parties tr.record-retail,.mobile-parties tr.record-cancelled,.mobile-payments tr.record-paid,.mobile-payments tr.record-cancelled{border-left:4px solid transparent}.mobile-register tr.record-entered,.mobile-register tr.record-unpaid,.mobile-parties tr.record-retail{border-left-color:#5b87aa}.mobile-register tr.record-missing{border-left-color:#d1a13d}.mobile-register tr.record-partial{border-left-color:#cc7e39}.mobile-register tr.record-paid,.mobile-payments tr.record-paid{border-left-color:#3c8b70}.mobile-register tr.record-cancelled,.mobile-parties tr.record-cancelled,.mobile-payments tr.record-cancelled{border-left-color:#ae3542}.mobile-parties tr.record-wholesale{border-left-color:#7569a4}}

/* GST invoice workspace */
.gst-dashboard,.party-gst-section{margin:28px 0}.section-title{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:0 0 14px}.section-title h2{margin:4px 0 0}.gst-stats{margin-top:20px}.gst-mini-stats{grid-template-columns:repeat(3,1fr);margin-bottom:16px}.gst-filter-panel{margin-bottom:18px}.gst-filters{display:flex;align-items:end;gap:12px;padding:15px 18px;flex-wrap:wrap;background:linear-gradient(100deg,#f8fbfd,#fff)}.gst-filters label{min-width:170px}.gst-filters .search{flex:1;min-width:260px}.gst-invoice-panel{border-top:3px solid #5b87aa}.gst-row{box-shadow:inset 4px 0 transparent}.gst-row.gst-due{box-shadow:inset 4px 0 #b83d4b;background:#fff8f9}.gst-row.gst-partial{box-shadow:inset 4px 0 #d18735;background:#fffaf3}.gst-row.gst-paid{box-shadow:inset 4px 0 #338064;background:#f6fcf9}.gst-row.gst-cancelled{box-shadow:inset 4px 0 #8d9aa3;background:#f7f8f9;color:#74818a}.invoice-number{font-size:15px;letter-spacing:.25px;color:var(--navy)}.gst-due-text{display:block!important;margin-top:4px;color:#9c3541!important;font-size:10px!important}.gst-form-layout{grid-template-columns:minmax(0,1.5fr) minmax(260px,.75fr)}.invoice-number-field{display:flex;gap:8px}.invoice-number-field input{flex:1}.gst-calculation{display:grid;gap:8px;margin-top:16px;padding:14px;border:1px solid #d8e4eb;border-radius:10px;background:#f5f9fb}.gst-calculation span{display:flex;align-items:center;justify-content:space-between;gap:12px}.gst-calculation small{color:var(--muted);font-size:10px;text-transform:uppercase}.gst-calculation strong{font-size:17px}.gst-calculation span:last-child{padding-top:9px;border-top:1px solid #d8e4eb;color:#285b7e}.gst-pool{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px;padding:12px;border-left:4px solid #3c8b70;border-radius:8px;background:#eff8f4}.gst-pool.warning{border-left-color:#d0a13d;background:#fff9ea}.gst-pool span{display:grid;gap:3px}.gst-pool small{font-size:9px;color:var(--muted);text-transform:uppercase}.gst-payment-invoices{display:grid;gap:8px}.gst-payment-choice{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:13px;border:1px solid #d7e2e9;border-radius:9px;background:#fff;cursor:pointer}.gst-payment-choice.selected{border-color:#5b87aa;background:#eef6fb;box-shadow:inset 4px 0 #5b87aa}.gst-payment-choice input{width:18px;height:18px}.gst-payment-choice span{display:grid;gap:3px}.gst-payment-choice small{color:var(--muted)}.gst-payment-choice b{color:#9c3541}.gst-detail-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0}.dashboard-gst .panel-head{background:linear-gradient(90deg,#edf6fb,#fff)}.party-gst-section{padding:18px;border:1px solid #d9e5ec;border-radius:12px;background:linear-gradient(145deg,#f6fbfe,#fff 55%)}.gst-settings-card{border-top-color:#5b87aa}.badge.navy{background:#e5f0f7;color:#285b7e}

@media(max-width:820px){.gst-mini-stats{grid-template-columns:1fr 1fr}.gst-mini-stats .stat:last-child{grid-column:1/3}.section-title{align-items:stretch;flex-direction:column}.section-title .btn{width:100%}.gst-filter-panel,.gst-invoice-panel,.party-gst-section{width:calc(100% + 36px);margin-left:-18px;margin-right:-18px;border-radius:8px}.party-gst-section{padding:14px 16px}.gst-filters{padding:13px 16px}.gst-filters .search,.gst-filters label{min-width:100%;width:100%}.gst-table-wrap{overflow:visible}.mobile-gst{display:block!important;min-width:0!important;width:100%}.mobile-gst thead{display:none}.mobile-gst tbody{display:block}.mobile-gst tr{display:grid;grid-template-columns:minmax(0,1fr) auto;width:calc(100% - 4px);margin:0 2px;padding:13px 12px;gap:8px 12px;border-top:1px solid var(--line)}.mobile-gst td{display:block!important;padding:0!important;border:0!important;min-width:0;text-align:left!important}.mobile-gst td:nth-child(1){grid-column:1}.mobile-gst td:nth-child(2){grid-column:1}.mobile-gst:not(.compact) td:nth-child(3){grid-column:1;font-size:12px}.mobile-gst:not(.compact) td:nth-child(4){grid-column:2;grid-row:1/3;text-align:right!important}.mobile-gst:not(.compact) td:nth-child(5){grid-column:1}.mobile-gst:not(.compact) td:nth-child(6){grid-column:2;grid-row:3/5;align-self:end}.mobile-gst.compact td:nth-child(3){grid-column:2;grid-row:1/3;text-align:right!important}.mobile-gst.compact td:nth-child(4){grid-column:1}.mobile-gst.compact td:nth-child(5){grid-column:2;grid-row:3/5;align-self:end}.mobile-gst .row-actions{justify-content:flex-end;flex-wrap:wrap}.gst-form-layout{grid-template-columns:1fr}.gst-payment-choice{grid-template-columns:auto 1fr}.gst-payment-choice b{grid-column:2}.invoice-number-field{align-items:stretch}.invoice-number-field .btn{white-space:nowrap}.gst-detail-status{align-items:stretch;flex-direction:column}}
@media(max-width:520px){.gst-mini-stats{grid-template-columns:1fr 1fr}.gst-mini-stats .stat-value{font-size:20px}.gst-form-layout .form-grid{grid-template-columns:1fr}.gst-form-layout .span2{grid-column:auto}.invoice-number-field{display:grid}.gst-pool{grid-template-columns:1fr}.mobile-gst tr{padding:12px 10px}.mobile-gst .btn.small{padding:7px 9px}.party-gst-section{padding:14px 16px}}
.gst-pool em{font-size:10px;color:var(--muted);font-style:normal}
.gst-filters label{margin-bottom:0}
.month-dues-table tfoot{background:#eef4f7}.month-dues-table tfoot th{font-size:14px;border-top:2px solid #cbd9e2}.month-dues-table tfoot .amount{font-size:16px}
@media(max-width:820px){.month-dues-table td:nth-child(2):before{content:'Billed amount'}.month-dues-table td:nth-child(3):before{content:'Received'}.month-dues-table td:nth-child(4):before{content:'Discount'}.month-dues-table td:nth-child(5):before{content:'Balance due'}.month-dues-table tfoot{display:block}.month-dues-table tfoot tr{display:grid;grid-template-columns:1fr 1fr;width:calc(100% - 4px);margin:0 2px;padding:12px;gap:8px 12px;border-top:2px solid #cbd9e2}.month-dues-table tfoot th{display:block;padding:0;border:0;text-align:left!important}.month-dues-table tfoot th:first-child{grid-column:1/3;font-size:15px}.month-dues-table tfoot th:nth-child(n+2):before{display:block;color:var(--muted);font-size:8px;text-transform:uppercase;letter-spacing:.5px;margin-bottom:2px}.month-dues-table tfoot th:nth-child(2):before{content:'Total billed'}.month-dues-table tfoot th:nth-child(3):before{content:'Total received'}.month-dues-table tfoot th:nth-child(4):before{content:'Total discount'}.month-dues-table tfoot th:nth-child(5):before{content:'Total due'}.month-dues-table tfoot th:nth-child(odd):not(:first-child){text-align:right!important}}

/* Mobile field alignment, modal layering and amount-based summary colours */
.gst-filters label.search{position:relative}.gst-filters .search input{padding-left:48px}.gst-filters .search-icon{left:15px;bottom:13px;pointer-events:none;z-index:2}.date-picker-open{top:0;bottom:0;margin:auto 0;transform:none;z-index:1}.modal-head{z-index:20}.modal-head .icon-btn{position:relative;z-index:2;flex:none}.stat.tone-danger{background:#fff7f8;color:var(--ink);border-color:#efc9cf;border-top:3px solid var(--red)}.stat.tone-danger .stat-label,.stat.tone-danger .stat-note{color:#8b6268}.stat.tone-danger .stat-label .icon,.stat.tone-danger .stat-value{color:var(--red)}.stat.tone-success{background:#f5fbf8;color:var(--ink);border-color:#cde5d9;border-top:3px solid var(--green)}.stat.tone-success .stat-label,.stat.tone-success .stat-note{color:#5f7e70}.stat.tone-success .stat-label .icon,.stat.tone-success .stat-value{color:var(--green)}
.stats>.stat.tone-danger{border-top:3px solid var(--red)!important;background:linear-gradient(180deg,#fff1f3,#fff 48%)!important}.stats>.stat.tone-success{border-top:3px solid var(--green)!important;background:linear-gradient(180deg,#edf8f2,#fff 48%)!important}

/* Party Master sorting control */
.party-head .actions #party-sort{width:auto;min-width:160px}
@media(max-width:820px){.party-head .actions #party-sort{flex:1;min-width:150px}}
@media(max-width:520px){.party-head .actions #party-sort{width:100%;flex-basis:100%}}

/* Clear, consistent icon colours */
nav a[href="#dashboard"] .icon,.mobile-bottom-nav a[href="#dashboard"] .icon{color:#62a7d6}
nav a[href="#register"] .icon,.mobile-bottom-nav a[href="#register"] .icon{color:#d8ad48}
nav a[href="#pending"] .icon,.mobile-bottom-nav a[href="#pending"] .icon{color:#df8650}
nav a[href="#payments"] .icon{color:#55ad83}
nav a[href="#invoices"] .icon{color:#8d79cb}
nav a[href="#parties"] .icon,.mobile-bottom-nav a[href="#parties"] .icon{color:#66a2c7}
nav a[href="#reports"] .icon,.mobile-bottom-nav a[href="#reports"] .icon{color:#62a875}
nav a[href="#import"] .icon{color:#d29b3f}nav a[href="#activity"] .icon{color:#8d79cb}nav a[href="#staff"] .icon{color:#61a5b0}nav a[href="#backups"] .icon{color:#55ad83}nav a[href="#profile"] .icon{color:#d8ad48}
nav a.active .icon,.mobile-bottom-nav a.active .icon{filter:saturate(1.35);stroke-width:2.25}
.btn .icon{color:#477fa4}.btn.primary .icon{color:#493713}.btn.dark .icon{color:#edc96e}.btn.danger .icon,.icon-btn.danger .icon{color:var(--red)}
.icon-btn{color:#477fa4;background:#f7fbfe;border-color:#d5e3ec}.icon-btn[data-action*="edit"]{color:#397ba8;background:#edf6fb}.icon-btn[data-action*="photo"],.icon-btn[data-action*="file"]{color:#34856b;background:#edf8f4}.icon-btn[data-action*="archive"]{color:#a8791e;background:#fff8e8}.icon-btn[data-action*="report"]{color:#7363a9;background:#f4f1fb}.icon-btn[data-action*="delete"],.icon-btn[data-action*="cancel"]{color:#ae3542;background:#fff1f3}
.notice:not(.error)>.icon{color:#b37d18}.notice.info>.icon{color:#397ba8}.notice.error>.icon{color:var(--red)}.photo-panel>.icon{color:#548faf}.empty>.icon{color:#6e97b2}.backup-alert-small:before{color:var(--red)}
.settlement-check{align-items:flex-start}.settlement-check>span{display:grid;gap:4px}.settlement-check strong{font-size:14px}.settlement-check small{margin:0;font-size:11px;line-height:1.45;color:var(--muted)}

/* Installable app and trusted-device controls */
.trusted-device-check{align-items:flex-start;margin:4px 0 20px;padding:12px 13px;border:1px solid #d9e4eb;border-radius:9px;background:#f7fafc}.trusted-device-check input{margin:2px 0 0}.trusted-device-check span{display:grid;gap:3px}.trusted-device-check strong{font-size:13px}.trusted-device-check small{margin:0;font-size:11px;line-height:1.4;color:var(--muted)}
#nav .nav-install{display:flex;align-items:center;gap:12px;width:100%;min-height:45px;padding:12px 14px;border:0;border-radius:8px;background:transparent;color:#afc2d1;text-align:left;font-size:14px}#nav .nav-install:hover{background:#ffffff0b;color:#fff}#nav .nav-install .icon{color:#55ad83}
.trusted-device-card h2{display:flex;align-items:center;gap:9px}.trusted-device-card h2 .icon{color:#3c8b70}.install-app-info{text-align:center}.install-app-info>img{display:block;width:92px;height:92px;margin:0 auto 18px;border-radius:21px;box-shadow:0 10px 28px #11263826}.install-app-info h3{margin-bottom:14px}.install-app-info ol{max-width:390px;margin:18px auto;padding-left:28px;text-align:left;color:var(--ink);line-height:1.8}.install-app-info>p{max-width:430px;margin-left:auto;margin-right:auto}
@media(min-width:821px){body.sidebar-collapsed #sidebar .nav-install span{display:none}body.sidebar-collapsed #sidebar .nav-install{justify-content:center;padding-left:10px;padding-right:10px}}

/* Keep navigation and page actions on one compact toolbar. */
.topbar {height:auto;min-height:48px;justify-content:flex-start;padding:6px 22px;gap:12px;flex-wrap:wrap}
.topbar h1 {margin:0;font-size:clamp(17px,2vw,23px);line-height:1.2;letter-spacing:-.035em}
.topbar #page-actions {margin-left:auto;gap:6px;flex-wrap:wrap}
.topbar .btn,.filterbar .btn {min-height:32px;padding:5px 10px;font-size:13px}
.topbar .top-meta {margin-left:0;gap:8px}
.page {padding:9px 16px 30px}
.desktop-sidebar-toggle {top:8px}
.challan-fab {padding:0;line-height:0;display:grid;place-items:center}
.challan-fab .icon {display:block;width:25px;height:25px}
.filterbar {padding:7px 10px;gap:6px;flex-wrap:wrap}
.filterbar label {flex:0 1 auto;min-width:0;font-size:11px}
.filterbar label.search {min-width:0;flex:0 1 240px}
.filterbar label:has(#filter-quick) {min-width:0}
.filterbar label.year-input {max-width:80px}
.filterbar label.party-filter {min-width:0;flex:0 1 180px}
.filterbar input,.filterbar select {min-height:31px;height:31px;margin-top:2px;padding:4px 7px;font-size:13px}
.filterbar .search input {padding-left:28px}
.filterbar .search-icon {width:15px;height:15px;left:8px;bottom:8px;pointer-events:none}
#register-summary {margin:7px 0;gap:8px}
#register-summary .stat {padding:10px 12px}
.register-summary-button[aria-expanded="true"] {background:#e6eff4;color:#164363;border-color:#7ea7bf}
body[data-view="register"] .table-bottom {padding:6px 10px}
body[data-view="dashboard"] .finance-dashboard {grid-template-columns:minmax(0,1fr)}
body[data-view="dashboard"] .challan-overview-stats {grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr))}
#challan-form .date-picker-field input {cursor:text}
@media(min-width:821px){
 body[data-view="register"] .mobile-register {table-layout:auto}
 body[data-view="register"] .register-wrap :is(th,td) {padding:4px 8px;width:auto}
 body[data-view="register"] .register-wrap .serial {width:58px;white-space:nowrap;color:var(--muted);font-variant-numeric:tabular-nums}
 body[data-view="register"] .register-wrap :is(th,td):nth-last-child(6) {width:100px;white-space:nowrap}
 body[data-view="register"] .register-wrap :is(th,td):nth-last-child(5) {width:clamp(170px,23vw,340px)}
 body[data-view="register"] .register-wrap :is(th,td):nth-last-child(4) {width:90px}
 body[data-view="register"] .register-wrap :is(th,td):nth-last-child(3) {width:100px}
 body[data-view="register"] .register-wrap :is(th,td):nth-last-child(2) {width:120px}
 body[data-view="register"] .mobile-register th:last-child {text-align:left}
 body[data-view="register"] .compact-row-actions {justify-content:flex-start;gap:4px}
 body[data-view="register"] .compact-row-actions .icon-btn {width:28px;height:28px}
}
@media(max-width:820px){
 .topbar {padding:6px 10px;gap:6px}
 .topbar h1 {font-size:17px}
 .topbar #page-actions {max-width:100%}
 .topbar .top-meta {display:none}
 .page {padding:7px 18px 24px}
 .filterbar {display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:5px}
 .filterbar label,.filterbar label.year-input,.filterbar label.party-filter {min-width:0;max-width:none}
 .filterbar input,.filterbar select {width:100%}
 body[data-view="register"] .mobile-register tr {grid-template-columns:auto auto minmax(0,1fr) auto!important;gap:4px 8px!important;padding:7px 10px!important}
 body[data-view="register"] .mobile-register .serial {grid-column:1!important;grid-row:1!important;color:var(--muted);font-size:12px}
 body[data-view="register"] .mobile-register .serial:before {content:'SR No.'!important}
 body[data-view="register"] .mobile-register td:nth-last-child(6) {grid-column:2!important}
 body[data-view="register"] .mobile-register td:nth-last-child(4) {grid-column:3!important}
 body[data-view="register"] .table-bottom {flex-direction:row;align-items:center;flex-wrap:wrap}
}
@media(max-width:520px){
 .topbar:has(#page-actions:not(:empty)) #page-actions {flex:1 1 auto;justify-content:flex-end}
 .topbar .btn {padding:4px 7px;font-size:12px}
 .filterbar label.search {grid-column:1/-1;max-width:245px}
}
.error-message,.toast,input::placeholder,textarea::placeholder {text-transform:capitalize}
#party-results[hidden] {display:none!important}
#party-results button:focus-visible {background:#e3eff7;outline:2px solid #547e9b;outline-offset:-2px}
@media(min-width:821px){
 body[data-view="register"] .page {padding:14px 22px 32px}
 body[data-view="register"] .topbar {min-height:54px;padding-left:30px}
 body[data-view="register"] .filterbar {display:flex;align-items:flex-end;gap:9px;padding:10px 14px;border-bottom:1px solid var(--line);border-radius:11px;margin-bottom:10px}
 body[data-view="register"] .filterbar label.search {flex:1 1 190px;max-width:320px}
 body[data-view="register"] .filterbar label.party-filter {flex:1 1 160px;max-width:275px}
 body[data-view="register"] .record-edge {border-radius:11px;overflow:hidden}
 body[data-view="register"] .register-wrap .mobile-register {width:100%;table-layout:fixed}
 body[data-view="register"] .register-wrap .mobile-register :is(th,td) {padding:7px 10px;overflow-wrap:anywhere}
 body[data-view="register"] .register-wrap .mobile-register :is(th,td):nth-child(1){width:6%}
 body[data-view="register"] .register-wrap .mobile-register :is(th,td):nth-child(2){width:13%}
 body[data-view="register"] .register-wrap .mobile-register :is(th,td):nth-child(3){width:32%}
 body[data-view="register"] .register-wrap .mobile-register :is(th,td):nth-child(4){width:13%}
 body[data-view="register"] .register-wrap .mobile-register :is(th,td):nth-child(5){width:12%}
 body[data-view="register"] .register-wrap .mobile-register :is(th,td):nth-child(6){width:13%}
 body[data-view="register"] .register-wrap .mobile-register :is(th,td):last-child{width:11%;text-align:right}
 body[data-view="register"] .compact-row-actions {justify-content:flex-end}
 body[data-view="register"] .register-wrap {overflow-x:auto}
 body[data-view="register"] .mobile-register {min-width:760px}
}

body[data-view="register"] .register-wrap .mobile-register :is(th,td):nth-last-child(2) {display:none!important}
body[data-view="register"] .register-wrap .mobile-register td .number {
 font-family:inherit;font-size:15px!important;font-weight:700;color:#18394e;
 font-variant-numeric:lining-nums tabular-nums;letter-spacing:normal;
}
@media(min-width:821px){
 body[data-view="register"] .page {max-width:1320px;margin-left:0}
 body[data-view="register"] .register-wrap .mobile-register :is(th,td) {padding:4px 8px}
 body[data-view="register"] .register-wrap .party-link {padding-block:3px;min-height:26px}
}
@media(max-width:820px){
 body[data-view="register"] .register-wrap .mobile-register tr {gap:3px 7px!important;padding:5px 9px!important}
}
.serial-sort{padding:1px 4px;border:0;border-radius:4px;color:#205474;background:#e7eff5;line-height:1;font-size:13px;font-weight:600;cursor:pointer}
.mobile-serial-sort{display:none}
.entry-recent{min-width:0;align-self:start;padding:14px;border:1px solid var(--line);border-radius:10px}
.entry-recent h3{margin:0 0 8px;font-size:16px}
.entry-recent-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;padding:8px 0;border-top:1px solid var(--line);font-size:13px}
.entry-recent-row strong{overflow-wrap:anywhere}
.entry-recent-row small{grid-column:1/-1;color:var(--muted)}
@media(min-width:821px){
 dialog:has(#challan-form) .modal-head, #challan-form .modal-foot{padding:9px 22px}
 dialog:has(#challan-form) .modal-head p{display:none}
 #challan-form .challan-layout{max-width:1550px;gap:16px;padding:14px 22px;align-items:start}
 #challan-form .challan-layout:has(.entry-recent){grid-template-columns:minmax(345px,1.5fr) minmax(180px,.85fr) minmax(190px,1fr)}
 #challan-form .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}
 #challan-form .form-grid label.span2{grid-column:auto;margin:0}
 #challan-form .form-grid label:has(textarea){grid-column:1/-1}
 #challan-form .form-grid input,#challan-form .form-grid textarea{min-height:32px;padding-block:5px;margin-top:3px}
 #challan-form textarea{height:60px}
 #challan-form .notice{padding:8px;margin:0 0 8px}
 #challan-form .photo-panel{min-height:0;padding:12px}
 #challan-form .photo-preview{max-height:100px;object-fit:contain}
 #challan-form .draft-recovery .actions{flex-wrap:nowrap}
 body[data-view="register"] .register-wrap .mobile-register th.serial{padding-inline:3px;white-space:nowrap}
}
@media(max-width:820px){.mobile-serial-sort{display:inline-flex;gap:3px;align-items:center}}
.modal-head:has(.challan-upload)>div{display:flex;align-items:center;gap:10px}
.modal-head:has(.challan-upload) p{display:none}
.challan-upload{position:relative;z-index:8}
.challan-upload summary{list-style:none;cursor:pointer;display:grid;place-items:center;background:#edf4f8;color:#205474;border-radius:7px;width:32px;height:32px}
.challan-upload summary::-webkit-details-marker{display:none}
.upload-options{position:absolute;top:100%;left:0;padding:12px;width:min(245px,52vw);background:white;border:1px solid var(--line);border-radius:9px;box-shadow:0 6px 18px #1232}
.upload-options .photo-preview{max-height:105px;object-fit:contain}
#challan-form .mal-return{display:flex;align-items:center;gap:6px;margin:0;font-size:13px}
#challan-form .mal-return input{width:16px;height:16px;min-height:0;margin:0}
#challan-form .entry-recent{display:flex;flex-direction:column;height:min(52vh,460px)}
#challan-form [data-recent-entries]{flex:1;min-height:0;overflow:hidden}
#challan-form .entry-recent-row{height:48px;box-sizing:border-box;padding:4px 0;align-content:center}
.entry-recent-row strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(min-width:821px){
 dialog.fullscreen:has(#challan-form) #dialog-body{height:100%;display:flex;flex-direction:column}
 #challan-form{flex:1;min-height:0;display:flex;flex-direction:column}
 #challan-form .challan-layout,#challan-form .challan-layout:has(.entry-recent){width:100%;max-width:none;flex:1;min-height:0;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);padding:12px clamp(16px,3vw,60px)}
 #challan-form .challan-layout>div:first-child{height:100%;overflow:auto;padding:0 10px 0 2px}
 #challan-form .form-grid{grid-template-columns:1fr;gap:clamp(3px,1vh,12px)}
 #challan-form .form-grid label.span2{grid-column:1}
 #challan-form .form-grid textarea{height:clamp(48px,9vh,105px)}
 #challan-form .entry-recent{height:100%;align-self:stretch}
 #challan-form .modal-foot{position:static;flex:none;margin-top:auto}
 #challan-form .photo-panel,.modal-head:has(.challan-upload) p{display:none}
}
@media(min-width:821px) and (max-height:760px){
 #challan-form label small:not(#number-note),#challan-form .challan-layout>div>.caption{display:none}
 #challan-form .draft-recovery p {font-size:12px}
}

#challan-form .form-grid{display:flex;flex-direction:column;align-items:stretch}
#challan-form .remarks-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
#challan-form .remarks-heading label{margin:0}
#challan-form .remarks-box{border:1px solid #cfd9e2;border-radius:8px;background:white;overflow:hidden}
#challan-form .remarks-box textarea{display:block;margin:0;border:0;resize:none;min-height:32px}
#challan-form .remarks-box .mal-return{padding:5px 10px;background:#f6f9fb;border-top:1px solid var(--line);cursor:pointer}
#challan-form .upload-options{top:auto;bottom:100%;left:auto;right:0}
#challan-form .challan-upload summary{border:1px solid #ccdae5;border-radius:8px}
#challan-form [data-recent-entries]{overflow:auto}
#challan-form .recent-register{min-width:0;width:max-content;table-layout:auto;border-collapse:collapse}
#challan-form .recent-register :is(th,td){padding:2px 5px;font-size:13px}
#challan-form .recent-register th{position:sticky;top:0;background:#eff5f8;z-index:1}
#challan-form .recent-register td:last-child{white-space:nowrap}
#challan-form .recent-register tbody tr:nth-child(even){background:#f2f7fa}
#challan-form .recent-register .icon-btn{width:22px;height:22px;min-height:0;margin:0 1px;padding:2px}
@media(min-width:821px){
 #dialog.fullscreen:has(#challan-form){height:100dvh;max-height:100dvh}
 #dialog.fullscreen:has(#challan-form) #dialog-body{height:100%;min-height:0}
 #challan-form .challan-layout:has(.entry-recent){display:grid;grid-template-columns:minmax(270px,.85fr) minmax(0,1.5fr)}
 #challan-form .form-grid{gap:clamp(3px,.8vh,10px)}
 #challan-form .entry-recent{min-height:0}
}

#register-summary .stat:has(.missing-filter){position:relative}
#register-summary .missing-filter{position:absolute;inset:0;z-index:1;border:0;border-radius:inherit;background:transparent}
#register-summary .missing-filter:is(:hover,:focus-visible,[aria-pressed=true]){box-shadow:inset 0 0 0 2px var(--amber)}
#challan-form .recent-register td{line-height:1.2}
#challan-form .recent-register td:not(:nth-child(2)){white-space:nowrap}
#challan-form .recent-register td:nth-child(2){max-width:32ch;white-space:normal;overflow-wrap:anywhere}
@media(min-width:821px){
 #challan-form .challan-layout:has(.entry-recent){max-width:1280px;grid-template-columns:minmax(270px,1fr) minmax(0,max-content);justify-content:center;padding-inline:16px}
 #challan-form .entry-recent{max-width:100%;width:fit-content;padding:10px}
}
#challan-form .recent-register th{white-space:nowrap}
#challan-form .recent-register .icon{width:15px;height:15px}

#challan-form .entry-party-field label{margin:0}
#challan-form .entry-party-options:not([hidden]){display:block;margin:5px 0 0;padding:3px;max-height:clamp(84px,16vh,140px);overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:8px;background:white}
#challan-form .entry-party-options button{display:block;width:100%;text-align:left;border:0;border-radius:4px;background:white;padding:5px 9px;line-height:1.3}
#challan-form .entry-party-options button:is(:hover,:focus-visible){background:#e8f2f8;outline-offset:-2px}
#challan-form #party-lookup:focus-visible{outline-offset:-2px}
html:has(#dialog[open] #challan-form),body:has(#dialog[open] #challan-form){overflow:hidden;overscroll-behavior:none}
@media(min-width:821px){
 #dialog.fullscreen:has(#challan-form){position:fixed;inset:0;width:100%;overflow:clip;overscroll-behavior:none}
 #dialog.fullscreen:has(#challan-form) #dialog-body{display:grid;grid-template-rows:auto minmax(0,1fr);overflow:clip}
 #challan-form .challan-layout{overflow:clip}
 #challan-form .challan-layout>div:first-child{min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable;padding-inline:7px;overflow-anchor:none}
 #challan-form [data-recent-entries]{overscroll-behavior:contain}
}
#challan-form .entry-actions{display:flex;justify-content:flex-end;gap:8px;margin:10px 0 0}
#challan-form .entry-actions .btn{min-height:36px}

#challan-form .entry-party-options button,#challan-form #party-lookup{font-weight:700}
#challan-form .entry-party-options .caption{font-weight:500}

[data-edit-amount]{cursor:text}
[data-edit-amount] input{width:100%;min-width:0;min-height:26px;margin:0;padding:3px 5px;text-align:right;font-weight:600}
@media(min-width:821px){
body[data-view=profile] .settings-page{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
body[data-view=profile] .settings-card{min-width:0;margin:0;padding:14px}
body[data-view=profile] .settings-card input,body[data-view=profile] .settings-card select{padding:6px 8px;min-height:32px}
body[data-view=parties] .mobile-parties :is(th,td){padding:3px 7px}
body[data-view=parties] .mobile-parties .icon-btn{width:26px;height:26px;min-height:0}
}
body[data-view=payments] :is(.stats,.notice,.panel,.filterbar,.payment-tabs){margin-block:6px}
body[data-view=payments] .stat{min-height:0;padding:8px 12px}
body[data-view=payments] .stat-value{margin-block:4px;font-size:22px}
body[data-view=payments] :is(.panel-head,.notice,.filterbar),body[data-view=parties] :is(.panel-head,.bulk-bar){padding:6px 10px}
body[data-view=payments] .finance-summary-cards{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))}
.finance-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
#register-summary a.stat{display:block;cursor:pointer;position:relative;z-index:1}
body[data-view=payments] .finance-tabs{margin:6px 0;padding:3px}
body[data-view=payments] .finance-tabs button{min-height:28px;padding:4px 10px}
body[data-view=parties] .party-head h2,body[data-view=payments] .panel-head h2{margin:0}

body[data-view=dashboard] .finance-dashboard {margin-bottom:12px}
body[data-view=dashboard] .finance-dashboard .panel-head {padding:7px 12px}
body[data-view=dashboard] .finance-dashboard :is(th,td) {padding:4px 12px;line-height:1.25}
body[data-view=dashboard] .finance-dashboard .party-link {min-height:24px}

.phone-challans{display:none}
@media(max-width:820px){
 body[data-view=register] :is(#desktop-sidebar-toggle,#mobile-bottom-nav,#challan-fab,#register-summary,.workspace>footer,.register-wrap,.mobile-serial-sort),
 body[data-view=register] #page-actions [data-action]:not([data-action=add]){display:none!important}
 body[data-view=register] .workspace{margin:0;padding:0}
 body[data-view=register] .topbar{position:sticky;top:0;z-index:4;flex-wrap:nowrap;min-height:52px;padding:5px 12px;background:white}
 body[data-view=register] .topbar h1{white-space:nowrap}
 body[data-view=register] #page-actions{display:flex;align-items:center;flex-wrap:nowrap}
 body[data-view=register] #page-actions [data-action=add]{display:inline-flex;min-height:40px}
 body[data-view=register] #page-actions [data-action=add] span{display:inline}
 body[data-view=register] #menu-toggle{order:-1;display:inline-flex;flex:0 0 40px;width:40px;height:40px}
 body[data-view=register] .phone-filters{position:relative}
 body[data-view=register] .phone-filters .party-filter{width:100%;min-width:0;margin:0}
 body[data-view=register] .phone-filters .filter-party-picker{position:static}
 body[data-view=register] .phone-filters .picker-results{inset:44px 4px auto;max-height:min(220px,38dvh);z-index:8}
 body[data-view=register] #phone-month{grid-column:1/-1;box-sizing:border-box;margin:0}
 body[data-view=register] #filter-party-search{margin:0}
 body[data-view=register] .page{width:100%;padding:6px 8px max(8px,env(safe-area-inset-bottom))}
 body[data-view=register] .page{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
 body[data-view=register] #content>.record-edge{width:100%;min-width:0;margin-inline:0}

 body[data-view=register] .filterbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.8fr);gap:6px;margin:0 0 6px;padding:5px}
 body[data-view=register] .filterbar :is(input,select){min-width:0;width:100%;min-height:38px;font-size:16px}
 .phone-challans{display:block;--columns:max(64px,9.5ch) minmax(0,1fr) minmax(0,.45fr) minmax(5ch,.65fr);--edit:0px}
 .phone-challans.with-edit{--edit:36px}
 .phone-entry{display:grid;grid-template-columns:minmax(0,1fr) var(--edit);align-items:center;border-top:1px solid var(--line)}
 .phone-entry:nth-of-type(odd){background:#f4f8fa}
 .phone-column-head,.phone-challan{display:grid;grid-template-columns:var(--columns);gap:4px;align-items:center;padding:6px;font:inherit;font-size:12px;text-align:left}
 .phone-column-head{padding-right:calc(6px + var(--edit));background:#eff5f8;color:var(--muted);font-weight:600}
 .phone-column-head span:last-child,.phone-challan b{text-align:right}
 .phone-challan{width:100%;min-height:42px;border:0;background:transparent;color:var(--ink);cursor:pointer}
 .phone-challan>*,.phone-column-head>*{min-width:0;overflow-wrap:anywhere}
 .phone-challan>span:first-child{white-space:nowrap;font-size:11px;font-variant-numeric:tabular-nums}
 .phone-challan strong{font-size:13px}
 .phone-edit{display:grid;place-items:center;width:100%;min-height:42px;padding:0;border:0;background:transparent;color:#3578a2}
 .phone-edit .icon{width:17px;height:17px}
 #dialog:has(.challan-detail-grid) .modal-foot{display:none}
 #dialog:has(.challan-detail-grid) .modal-content{padding:12px 16px}
 #dialog .challan-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;overflow-wrap:anywhere}
 #dialog.fullscreen:has(#challan-form){width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:0;overflow:auto}
 #dialog:has(#challan-form) .modal-head{padding:8px 12px;min-height:46px}
 #dialog:has(#challan-form) .modal-head p,#challan-form .entry-recent,#challan-form .form-grid label small,#challan-form .entry-actions [data-action=close]{display:none}
 #challan-form .challan-layout{display:block;padding:10px 12px max(12px,env(safe-area-inset-bottom));min-height:0}
 #challan-form .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
 #challan-form .form-grid>label,#challan-form .entry-party-field,#challan-form .remarks-field{grid-column:1/-1;margin:0;min-width:0}
 #challan-form .form-grid>.challan-number-field,#challan-form .form-grid>label:has([name=amount]){grid-column:auto}
 #challan-form input:not([type=checkbox]),#challan-form textarea{font-size:16px;min-width:0}
 #challan-form .form-grid textarea{height:48px}
 #challan-form .entry-actions button[type=submit]{width:100%;min-height:44px}
}

body[data-view=register] #phone-month{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:38px;padding-inline:10px;font-size:16px}
.register-month-picker{padding:12px;display:grid;gap:12px}
.month-year{display:flex;align-items:center;justify-content:space-between}
.month-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.register-month-picker [aria-pressed=true]{background:var(--navy);color:white}
.phone-totals{display:flex;justify-content:space-between;flex-wrap:wrap;gap:3px 10px;margin-bottom:6px;padding:7px 10px;background:#edf5ec;border-radius:6px;font-size:13px}
.phone-totals b{margin-left:3px;font-variant-numeric:tabular-nums}

@media(min-width:821px){
 #sidebar{padding-block:clamp(6px,1.5vh,16px)}
 #sidebar .brand{padding-bottom:6px}
 #sidebar .side-label{margin:6px 0}
 #sidebar #nav{gap:2px}
 #sidebar #nav :is(a,.nav-install){min-height:clamp(25px,4.7vh,40px);padding-block:3px}
 #sidebar .side-bottom{margin-top:6px;padding-top:0}
 #sidebar .profile{padding-block:4px}
 #sidebar .logout{margin-top:0;padding-block:3px}
}
@media(min-width:821px) and (max-height:620px){
 #sidebar .side-label{display:none}
 #sidebar .brand img{height:32px;width:32px}
}
