*{box-sizing:border-box}
:root{--ink:#1F2328;--muted:#555B63;--line:#E5E7EB;--bg:#F5F5F6;--brand:#D61F2C;--brand-d:#B0141F;--brand-soft:#FDECEE;--side:#232629;--pos:#047857;--neg:#B91C1C;--warn:#B45309}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:'Inter','Hind Siliguri',system-ui,sans-serif;font-size:15px;line-height:1.5}
a{color:var(--brand)}a:hover{color:var(--brand-d)}
h1,h2,h3{margin:0;line-height:1.25}
h2{font-size:18px}
.shell{display:flex;flex-wrap:wrap;min-height:100vh}
.side{flex:1 1 220px;max-width:100%;background:var(--side);color:#E8E8E8;padding:18px 12px;display:flex;flex-direction:column;gap:16px}
.brand{display:flex;align-items:center;gap:10px;padding:0 6px}
.brand{flex-direction:column;align-items:flex-start;gap:4px}.logoimg{height:34px;width:auto;display:block}.brand small{display:block;color:#B9BDC2;font-size:12px;letter-spacing:.08em;text-transform:uppercase;padding-left:2px}.brand b{display:block;font-size:17px}
.brand.dark{padding:0;color:var(--ink);flex-direction:row;align-items:center}
.logo{width:38px;height:38px;border-radius:50%;background:var(--brand);color:#fff;font-family:Inter,sans-serif;font-weight:700;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.links{display:flex;flex-wrap:wrap;gap:4px}
.links a{flex:1 1 150px;display:flex;align-items:center;min-height:42px;padding:0 12px;border-radius:8px;color:#D9DBDE;text-decoration:none;border-left:3px solid transparent}
.links a:hover{background:#2E3236;color:#fff}
.links a.on{background:#33373B;color:#fff;font-weight:600;border-left-color:var(--brand)}
.me{margin-top:auto;display:flex;flex-direction:column;gap:6px;font-size:13px;color:#B9BDC2;padding:0 6px}
.me a{color:#F3B4B9}
.linkbtn{background:none;border:0;color:#F3B4B9;font:inherit;padding:0;cursor:pointer;text-decoration:underline}
.navtoggle{display:none}
.main{flex:999 1 560px;min-width:0;padding:22px clamp(12px,3vw,34px);display:flex;flex-direction:column;gap:18px}
.main.solo{min-height:100vh;align-items:center;justify-content:center}
.ph{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.ph h1{font-size:26px}.sub{margin:2px 0 0;color:var(--muted);font-size:14px}
.acts{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:12px;min-width:0}
.card.narrow{max-width:520px}
.authbox{width:min(420px,100%)}
.cols{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start}
.grow1{flex:1 1 280px;min-width:0}.grow2{flex:2 1 420px;min-width:0}.grow3{flex:3 1 480px;min-width:0}
.stack{display:flex;flex-direction:column;gap:16px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.stat{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:4px;min-width:0}
.stat span{color:var(--muted);font-size:14px}.stat b{font-family:Inter,'Hind Siliguri',sans-serif;font-size:24px;line-height:1.2;overflow-wrap:anywhere}.stat small{color:var(--muted);font-size:13px}
.alerts{display:flex;flex-wrap:wrap;gap:10px}
.alert{flex:1 1 260px;display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:10px;text-decoration:none;border:1px solid}
.alert b{font-size:15px}.alert small{font-size:13px}
.alert.red{background:#FEF2F2;border-color:#FECACA;color:#7F1D1D}
.alert.orange{background:#FFF7ED;border-color:#FED7AA;color:#7C2D12}
.alert.blue{background:#EFF6FF;border-color:#BFDBFE;color:#1E3A8A}
.alert.green{background:#F0FDF4;border-color:#BBF7D0;color:#14532D}
label{display:flex;flex-direction:column;gap:5px;font-size:14px;font-weight:600;color:#374151;flex:1 1 220px;min-width:0}
label small{font-weight:400;color:var(--muted)}
input,select,textarea{min-height:44px;width:100%;padding:0 12px;border:1px solid #D1D5DB;border-radius:8px;background:#fff;font:inherit;font-weight:400;color:var(--ink)}
textarea{padding:10px 12px;min-height:64px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:2px solid #F7A8AE;border-color:var(--brand)}
input[type=checkbox],input[type=radio]{width:20px;height:20px;min-height:0;accent-color:var(--brand)}
.money{font-family:Inter,sans-serif;font-size:18px}
.otp{font-family:Inter,sans-serif;letter-spacing:6px;font-size:20px}
.row{display:flex;flex-wrap:wrap;gap:12px}
.seg{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:8px}
.seg legend{font-size:14px;font-weight:600;color:#374151;margin-bottom:6px}
.segopt{flex:0 1 auto;flex-direction:row;align-items:center;gap:8px;border:1px solid #F2B8BD;border-radius:999px;padding:8px 14px;cursor:pointer;font-weight:500}
.segopt:has(input:checked){background:var(--brand-soft);border-color:var(--brand)}
.btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:0 18px;border-radius:8px;background:var(--brand);color:#fff;font:inherit;font-weight:600;border:1px solid var(--brand);text-decoration:none;cursor:pointer;white-space:nowrap}
.btn:hover{background:var(--brand-d);color:#fff}
.btn.ghost{background:#fff;color:var(--brand);border-color:#F2B8BD}.btn.ghost:hover{background:var(--brand-soft)}
.btn.danger{background:#fff;color:var(--neg);border-color:#FECACA}.btn.danger:hover{background:#FEF2F2}
.btn.sm{min-height:36px;padding:0 12px;font-size:14px}
.tabs{display:flex;flex-wrap:wrap;gap:8px}
.tab{min-height:44px;display:inline-flex;align-items:center;padding:0 16px;border-radius:999px;border:1px solid #F2B8BD;background:#fff;color:var(--brand);font-weight:600;text-decoration:none}
.tab.on{background:var(--brand);border-color:var(--brand);color:#fff}
.flash{padding:10px 14px;border-radius:8px;background:#ECFDF5;border:1px solid #A7F3D0;color:#065F46}
.flash.err{background:#FEF2F2;border-color:#FECACA;color:#7F1D1D}
.flash.warn{background:#FFF7ED;border-color:#FED7AA;color:#7C2D12}
.hint{margin:0;font-size:14px;color:#1D4ED8}
.muted{color:var(--muted)}.small{font-size:13px}
.pos{color:var(--pos)}.neg{color:var(--neg)}.warnc{color:var(--warn)}
.li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #F3F4F6}
.li:last-child{border-bottom:0}
.li small{display:block;color:var(--muted);font-size:13px}
.pill{display:inline-block;padding:2px 10px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.pill.ok{background:#DCFCE7;color:#166534}.pill.warn{background:#FFEDD5;color:#9A3412}.pill.bad{background:#FEE2E2;color:#991B1B}.pill.info{background:#E0E7FF;color:#3730A3}.pill.gray{background:#F3F4F6;color:#374151}
.tw{overflow-x:auto;-webkit-overflow-scrolling:touch}
table.t{width:100%;border-collapse:collapse;font-size:14px}
table.t th{text-align:left;font-weight:600;color:var(--muted);padding:8px 6px;border-bottom:1px solid var(--line);white-space:nowrap}
table.t td{padding:9px 6px;border-bottom:1px solid #F3F4F6;vertical-align:top}
table.t td.n,table.t th.n{text-align:right;font-family:Inter,'Hind Siliguri',sans-serif;white-space:nowrap}
table.t tr.tot td{font-weight:700;border-top:2px solid var(--ink)}
table.t tr.sel td{background:var(--brand-soft)}
.bar{height:9px;background:#F3F4F6;border-radius:5px;overflow:hidden}.bar i{display:block;height:9px;background:var(--brand)}
.chart{width:100%;height:220px;display:block}
.legend{display:flex;flex-wrap:wrap;gap:14px;font-size:13px;color:#374151}
.legend i{display:inline-block;width:14px;height:4px;margin-right:6px;vertical-align:middle}
.filters{flex-direction:row;flex-wrap:wrap;align-items:flex-end}
.filters label{flex:1 1 160px}
.check{display:flex;align-items:center;justify-content:center;width:44px;height:44px;cursor:pointer;flex:0 0 auto}
.hide{display:none!important}
/* Letterhead pages (vouchers, statements, reports) */
.printbar{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--line);padding:10px;display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center;z-index:5;width:100%}
.main.solo:has(.paper){justify-content:flex-start;padding:0 0 30px}
.paper{position:relative;background:#fff;width:100%;max-width:794px;margin:18px auto 0;box-shadow:0 1px 4px rgba(0,0,0,.12);display:flex;flex-direction:column;min-height:1123px;overflow:hidden}
.lh-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:34px 40px 14px}
.lh-logo{height:46px;width:auto}
.lh-addr{display:flex;flex-direction:column;font-family:Poppins,Inter,sans-serif;font-size:11px;color:#333;text-align:left;line-height:1.55}
.lh-addr b{color:#EE2731;font-size:15px;font-weight:600}
.lh-rule{margin:0 40px;height:2px;background:#EE2731;position:relative}
.lh-rule i{position:absolute;left:28%;width:44%;top:-1.5px;height:5px;background:#EE2731;border-radius:3px}
.lh-mark{position:absolute;left:50%;top:50%;width:230px;transform:translate(-50%,-50%);opacity:.9;pointer-events:none;z-index:0}
.lh-foot{background:#EE2731;color:#fff;text-align:center;font-family:Poppins,Inter,sans-serif;font-weight:500;font-size:14px;padding:10px 16px}
.lh-bottom{margin-top:auto}
.lhwrap{width:100%;border-collapse:collapse;position:relative;z-index:1;flex:1 1 auto}
.lhwrap>thead>tr>td,.lhwrap>tfoot>tr>td{padding:0}
.lh-sp-top,.lh-sp-bot{height:0}
.lh-body{padding:22px 40px 30px;vertical-align:top}
.sheet{display:flex;flex-direction:column;gap:14px;min-height:860px;page-break-after:always;break-after:page;padding-bottom:10px}
.sheet:last-child{page-break-after:auto;break-after:auto}
.sheet+.sheet{border-top:1px dashed #ddd;padding-top:22px}
.sh-title{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;flex-wrap:wrap}
.sh-title h2{font-size:22px;letter-spacing:.02em}
.sh-meta{text-align:right;font-size:13px;color:#333}
.sigs{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:18px;margin-top:auto;padding-top:70px;font-size:12px;text-align:center;color:#374151}
.sigs div{border-top:1px solid #6B7280;padding-top:6px}
.kv{display:grid;grid-template-columns:minmax(120px,32%) 1fr;gap:8px 14px;font-size:14px}
.kv span:nth-child(odd){color:var(--muted)}
.amtbox{border-radius:8px;padding:14px;display:flex;flex-direction:column;gap:2px}
.amtbox b{font-family:Inter,sans-serif;font-size:26px}
.copy{color:#B91C1C;font-weight:700;border:2px solid #B91C1C;padding:2px 10px;border-radius:6px;align-self:flex-start;letter-spacing:.1em}
.rep h2{font-size:17px;margin:6px 0}
.rep table.t{font-size:12.5px}
@media (max-width:779px){
  .navtoggle{display:inline-flex;align-self:center;min-height:40px;padding:0 14px;border-radius:8px;border:1px solid #4A4F55;background:#33373B;color:#fff;font:inherit;cursor:pointer}
  .side{padding:12px}
  .side .links{display:none}
  .side.open .links{display:flex}
  .side{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between}
  .side .links,.side .me{flex:1 1 100%}
  .me{margin-top:0}
  .ph h1{font-size:22px}
  .stat b{font-size:20px}
  .sheet{padding:20px 16px;min-height:0}
}
@media print{
  @page{size:A4;margin:0}
  html,body{background:#fff}
  body{font-size:11pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .side,.printbar,.noprint,.flash,.navtoggle{display:none!important}
  .main,.main.solo{padding:0!important;display:block}
  .paper{box-shadow:none;margin:0;max-width:none;min-height:0;overflow:visible;display:block}
  .lh-top{position:fixed;top:0;left:0;right:0;background:#fff;z-index:2}
  .lh-bottom{position:fixed;bottom:0;left:0;right:0;z-index:2}
  .lh-mark{position:fixed;top:50%;left:50%}
  .lh-sp-top{height:120px}
  .lh-sp-bot{height:60px}
  .lh-body{padding:8px 40px 0}
  .sheet{min-height:0;height:auto;border:0!important;padding-top:0!important}
  .sheet .sigs{padding-top:60px}
  .card{border:0;padding:0;box-shadow:none}
  a{color:inherit;text-decoration:none}
  .tw{overflow:visible}
  table.t tr{break-inside:avoid}
}
table.t td.c,table.t th.c{text-align:center}
table.t.perm input{width:18px;height:18px}
table.t tr.on td{background:#FFF1F2}
.card>label,.card>.segopt,.authbox label{flex:0 0 auto}
