:root{--navy:#1F3864;--navy2:#3B6EA8;--bg:#F6F7FB;--card:#fff;--line:#E1E5EE;--text:#1b2433;--muted:#5d6b82;--err:#B3261E}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font:16px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;-webkit-text-size-adjust:100%}
#app{min-height:100vh;min-height:100dvh;max-width:760px;margin:0 auto;background:var(--bg)}
.bar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:8px;background:var(--navy);color:#fff;padding:calc(10px + env(safe-area-inset-top)) 12px 10px}
.bar h1{flex:1;margin:0;font-size:18px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar button{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.45);border-radius:8px;padding:6px 10px;font-size:14px;cursor:pointer}
.bar button.icon{border:0;font-size:22px;padding:2px 8px}
main{padding:16px 14px calc(24px + env(safe-area-inset-bottom))}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.cat{display:flex;flex-direction:column;justify-content:space-between;gap:14px;min-height:128px;text-align:left;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px;cursor:pointer;color:inherit;font:inherit}
.cat:active{background:#eef2fa}
.cat .name{font-weight:600}
.cat .count{color:var(--muted);font-size:13px}
.badge{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;color:#fff;font-weight:700;font-size:15px}
.c0{background:#1F3864}.c1{background:#2F6F8F}.c2{background:#4B7F52}.c3{background:#8A6D1F}.c4{background:#7A3E8F}.c5{background:#B25B1E}.c6{background:#A33A4A}.c7{background:#3E6B6B}
.search{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;font-size:16px;background:#fff;margin-bottom:8px}
.status{color:var(--muted);font-size:13px;margin:4px 2px 10px}
.list{display:flex;flex-direction:column;gap:8px}
.row{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px;cursor:pointer;color:inherit;font:inherit}
.row:active{background:#eef2fa}
.row .ext{flex:none;width:38px;height:38px;border-radius:10px;background:var(--bg);color:var(--navy);font-weight:700;font-size:11px;display:flex;align-items:center;justify-content:center;text-transform:uppercase;border:1px solid var(--line)}
.row .meta{min-width:0}
.row .fname{overflow-wrap:anywhere}
.row .sub{color:var(--muted);font-size:13px}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px}
.login{max-width:420px;margin:0 auto}
.hero{text-align:center;padding:48px 16px 18px}
.hero img{width:72px;height:72px;border-radius:18px}
.hero h1{margin:12px 0 4px;color:var(--navy)}
.hero p{margin:0;color:var(--muted)}
label{display:block;font-weight:600;margin:0 0 6px}
input.field{width:100%;padding:13px 14px;border:1px solid #c5ccda;border-radius:12px;font-size:18px;letter-spacing:.5px;margin-bottom:14px}
.btn{display:inline-block;text-align:center;text-decoration:none;background:var(--navy);color:#fff;border:0;border-radius:12px;padding:13px 18px;font-size:16px;font-weight:600;cursor:pointer;width:100%}
.btn.secondary{background:#fff;color:var(--navy);border:1px solid var(--navy)}
.btn:disabled{opacity:.6;cursor:default}
.link{background:none;border:0;color:var(--navy2);font-size:15px;padding:10px 4px;cursor:pointer}
.error{color:var(--err);margin:12px 0 0;min-height:1.2em}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.actions .btn{flex:1 1 140px;width:auto}
.pdf{width:100%;height:calc(100dvh - 190px);min-height:420px;border:1px solid var(--line);border-radius:10px;background:#fff}
.imgwrap{overflow:auto;border:1px solid var(--line);border-radius:10px;background:#E3E6EC;max-height:calc(100dvh - 190px)}
.imgwrap img{display:block;width:100%;height:auto;cursor:zoom-in}
.imgwrap img.full{width:auto;max-width:none;cursor:zoom-out}
.note{color:var(--muted);font-size:14px;text-align:center;padding:24px 8px}

.tabs{display:flex;gap:6px;margin:0 0 10px}
.tab{flex:1;padding:10px 6px;border:1px solid #c9d2e3;background:#fff;border-radius:10px;font:inherit;font-weight:600;color:#1f3864;cursor:pointer}
.tab.on{background:#1f3864;color:#fff;border-color:#1f3864}
.filters{display:flex;gap:8px;margin:0 0 10px}
.filters .sel{flex:1;min-width:0;padding:10px 8px;margin:0}
.grp{margin:0 0 14px}
.gh{margin:14px 2px 6px;font-size:15px;color:#1f3864}
.filters select{border:1px solid #c5ccda;border-radius:10px;background:#fff;font-size:15px;color:#222}
.gh.party{font-size:17px;border-bottom:2px solid #1f3864;padding-bottom:4px}.sh{margin:10px 2px 4px;font-size:13px;font-weight:600;color:#5b6477;text-transform:uppercase}

.tabs{overflow-x:auto;white-space:nowrap}.tabs .tab{flex:0 0 auto;padding:10px 14px}
.range{display:flex;gap:8px;align-items:flex-end;margin:0 0 12px}.range label{flex:1;font-size:13px;color:#5b6477;display:flex;flex-direction:column;gap:4px}
input.field.date{font-size:16px;letter-spacing:0;margin:0;padding:10px}
.btn.small{flex:0 0 auto;padding:11px 18px;width:auto}
.dcard{border-radius:14px;padding:14px 16px;margin:0 0 12px;color:#fff}.dcard.c1{background:#e08a00}.dcard.c2{background:#2f7d5b}.dcard.c3{background:#1f3864}
.dcard .dt{font-size:16px;font-weight:600}.dcard .dp{font-weight:400;opacity:.9}.dcard .dm{font-size:32px;font-weight:700;text-align:right}.dcard .du{font-size:13px;font-weight:400}
.note.small{font-size:12px;color:#5b6477;text-align:center}
.srow{background:#fff;border:1px solid #e1e6f0;border-radius:12px;padding:10px 12px;margin:0 0 8px}.srow .sn{font-weight:600;color:#1f3864}.srow .sd{font-weight:400;color:#8a5a00;font-size:13px}.srow .ss{font-size:13px;color:#4a5468;margin-top:2px}

.pdfbar{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}.pbtn{flex:1 1 90px;padding:9px 6px;border:1px solid #1f3864;background:#fff;color:#1f3864;border-radius:10px;font:inherit;font-weight:600;font-size:14px;cursor:pointer}.pbtn:active{background:#1f3864;color:#fff}
.pdfbar .note{flex:1 1 100%;margin:0;text-align:left}
.tabs.sub{margin:0 0 8px}.tabs.sub .tab{padding:7px 12px;font-size:14px}
.dcard.c4{background:#b4540a}.bcard{background:#fff;border:1px solid #e1e6f0;border-radius:12px;padding:10px 12px;margin:0 0 10px}.bcard .sn{font-weight:700;color:#1f3864;margin-bottom:4px}.bl{display:flex;justify-content:space-between;gap:8px;font-size:13px;padding:3px 0;border-top:1px solid #eef1f7}.bv{font-weight:600;white-space:nowrap}
.srow .ss.b{font-weight:600;color:#222}
