:root{
  --ink:#152638; --ink-2:#233248; --text:#2c3e50; --muted:#647387; --soft:#5c6c7d; --faint:#8494a7;
  --bg:#f1f4f8; --surface:#ffffff; --line:#dce2e9; --line-soft:#edf0f4;
  --blue:#245ce7; --blue-d:#174cc5; --blue-soft:#e4edff; --link:#214fb0;
  --nav:#0d1c30; --nav-2:#101d30;
  --green:#1e7a3c; --green-bg:#e3f2e7; --red:#a3453e; --red-bg:#fbe8e6;
  --amber:#97600e; --amber-bg:#fdf0d3; --violet:#4a4ac0; --violet-bg:#e7e9fd;
  --radius:9px; --shadow:none;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--ink);font-size:13.5px;line-height:1.5;-webkit-font-smoothing:antialiased}
a{color:var(--link);text-decoration:none;font-weight:600}
a:hover{text-decoration:underline}
/* ================= top bar ================= */
.topbar{position:fixed;z-index:60;top:0;left:0;right:0;height:53px;background:linear-gradient(180deg,var(--nav-2),var(--nav));color:#fff;display:flex;align-items:center;padding:0 20px;gap:14px}
.burger{display:none;background:transparent;color:#fff;border:1px solid #496075;border-radius:5px;padding:6px 10px;font-size:14px;cursor:pointer}
.tb-brand{display:flex;align-items:center;gap:9px;font-size:20px;font-weight:700;letter-spacing:-.9px;color:#fff;white-space:nowrap}
.tb-mark{height:29px;width:29px;background:#4178ff;border-radius:7px;display:grid;place-items:center;flex:0 0 29px}
.tb-mark svg{width:19px;height:19px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tb-suite{border-left:1px solid #425065;padding-left:18px;margin-left:8px;color:#bdcadc;font-size:12px;white-space:nowrap}
.tb-right{margin-left:auto;display:flex;align-items:center;gap:16px}
.tb-search{display:flex;align-items:center;gap:8px;background:#1d2c41;border:1px solid #36465b;border-radius:5px;padding:0 10px;height:31px;min-width:215px}
.tb-search svg{width:13px;height:13px;stroke:#c4d2e6;fill:none;stroke-width:2.2;stroke-linecap:round}
.tb-search input{flex:1;background:transparent;border:0;color:#e6edf7;font-size:12px;padding:0;width:110px}
.tb-search input::placeholder{color:#d1daea}
.tb-search input:focus{outline:0;box-shadow:none}
.tb-search kbd{font-family:inherit;font-size:10px;color:#c4d2e6}
.tb-avatar{display:grid;place-items:center;border-radius:50%;height:30px;width:30px;color:#183a66;background:#cddef7;font-size:10px;font-weight:700;text-decoration:none}
.tb-avatar:hover{text-decoration:none;background:#b9d2f7}
/* ================= sidebar ================= */
.sidebar{position:fixed;z-index:55;top:53px;left:0;bottom:0;width:211px;background:#fafbfd;border-right:1px solid var(--line);padding:14px 11px 10px;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin}
.workspace{display:flex;align-items:center;gap:10px;padding:8px 7px 15px;border-bottom:1px solid var(--line);font-weight:700;font-size:13px;color:var(--ink-2)}
.workspace small{display:block;font-size:10px;color:#6b798a;font-weight:400;margin-top:3px}
.ws-ico{background:#e6edff;color:#2b57b9;width:30px;height:30px;border-radius:7px;display:grid;place-items:center;flex:0 0 30px;font-size:11px;font-weight:700}
.sidebar nav{padding-top:2px;flex:1}
.nav-sec{color:#6e7b8b;letter-spacing:1.2px;font-size:9px;font-weight:700;text-transform:uppercase;margin:18px 9px 6px}
.sidebar nav a{display:flex;align-items:center;gap:10px;color:#3a4d60;font-size:12px;font-weight:400;padding:8px 9px;border-radius:5px;margin-bottom:1px}
.sidebar nav a svg{width:15px;height:15px;flex:0 0 15px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sidebar nav a:hover{background:#eaf0f5;text-decoration:none}
.sidebar nav a.active{box-shadow:inset 3px 0 var(--blue);background:var(--blue-soft);color:#1447b7;font-weight:700}
.profile{display:flex;gap:9px;align-items:center;color:#3a4b63;font-size:12px;border-top:1px solid var(--line);padding:12px 7px 2px;margin-top:12px}
.profile .avatar{background:#e1e8f1;color:#3a516a;width:30px;height:30px;border-radius:8px;display:grid;place-items:center;font-weight:700;font-size:10.5px;flex:0 0 30px}
.profile strong{display:block;font-size:12px;color:#233248}
.profile small{color:#627285;font-size:10px;display:block}
.side-links{padding:6px 7px 4px;font-size:11px}
.side-links a{color:#43556e;font-weight:400}
/* ================= main ================= */
.main{margin:53px 0 0 211px;min-height:calc(100vh - 53px);display:flex;flex-direction:column}
.wrap{padding:20px clamp(18px,2.4vw,44px) 40px;max-width:2000px;width:100%;margin:0 auto;flex:1}
.crumbline{display:flex;gap:9px;align-items:center;font-size:11px;color:#617185;margin-bottom:13px}
.crumbline b{color:#3a4e63}
.crumbline .period{margin-left:auto;font-size:10px;color:#617185}
.head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:17px;flex-wrap:wrap}
.head h1{font-size:clamp(27px,2.5vw,38px);letter-spacing:-1.4px;margin:0;font-weight:750;color:var(--ink)}
.head p{color:var(--muted);font-size:13px;margin:6px 0 0}
.head-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.foot{border-top:1px solid var(--line);padding:13px clamp(18px,2.4vw,44px);font-size:10.5px;color:var(--faint);display:flex;justify-content:space-between;gap:10px}
/* legacy aliases used by some templates */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:17px;flex-wrap:wrap}
.page-head h2{margin:0;font-size:27px;font-weight:750;color:var(--ink);letter-spacing:-1px}
.page-head p{margin:6px 0 0;color:var(--muted);font-size:13px;max-width:720px}
.page-head .ph-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.top-title{display:none}
/* ================= tabs ================= */
.tabs{display:flex;gap:20px;border-bottom:1px solid #cbd5e1;margin-bottom:15px;overflow-x:auto}
.tabs a,.tabs span{border-bottom:3px solid transparent;color:#526477;padding:9px 1px;white-space:nowrap;font-size:12px;font-weight:400}
.tabs a:hover{text-decoration:none;color:var(--ink)}
.tabs .sel{color:var(--blue-d);border-color:var(--blue);font-weight:700}
/* ================= panels / cards ================= */
.card,.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:0;margin-bottom:14px;overflow:hidden}
.card .in,.panel .in{padding:17px 18px}
.panelhead{padding:17px 18px 14px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.panelhead h2,.panelhead h3,.card h3{font-size:17px;letter-spacing:-.5px;margin:0;color:var(--ink);font-weight:700}
.panelhead p,.card .card-sub{color:var(--muted);font-size:11px;margin:4px 0 0}
.card>h3,.card>.card-sub{margin-left:18px;margin-right:18px}
.card>h3{margin-top:15px}
.card>p,.card>.flex,.card>form,.card>.drop,.card>.table-wrap{margin-left:18px;margin-right:18px}
.card>p:last-child,.card>form:last-child{margin-bottom:16px}
.grid{display:grid;gap:14px}
.cols2{grid-template-columns:minmax(0,1.64fr) minmax(288px,1fr)}
/* ================= stat strip ================= */
.gridStats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:#fff;border:1px solid var(--line);border-radius:9px;margin:0 0 14px;overflow:hidden}
.stat{padding:15px clamp(10px,1.15vw,20px);border-right:1px solid var(--line);min-width:0}
.stat:last-child{border-right:0}
.statlabel{display:flex;gap:7px;align-items:center;color:#485b70;font-size:11px;font-weight:600}
.statlabel svg{width:15px;height:15px;color:#4366a3;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:0 0 15px}
.stat strong{display:block;letter-spacing:-1px;font-variant-numeric:tabular-nums;font-size:clamp(20px,1.8vw,31px);margin:10px 0 5px;font-weight:700;color:var(--ink)}
.stat small{font-weight:400;font-size:10px;color:#607188;display:block}
.stat em{font-style:normal;font-weight:700;color:#1a4aa2}
/* ================= KPI cards (reports) ================= */
.kpis{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin-bottom:14px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:9px;padding:16px 18px}
.kpi .k-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.kpi .k-label{font-size:12.5px;color:#485b70;font-weight:600;padding-top:6px}
.kpi .k-ico{width:33px;height:33px;border-radius:8px;background:#edf1ff;color:#415caa;display:flex;align-items:center;justify-content:center;flex:0 0 33px}
.kpi .k-ico svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kpi .k-value{font-size:25px;font-weight:700;color:var(--ink);margin:10px 0 4px;letter-spacing:-.6px;font-variant-numeric:tabular-nums;white-space:nowrap}
.kpi .k-sub{font-size:11px;color:#607188}
/* ================= chart panel ================= */
.analysis{background:linear-gradient(115deg,#172d4d,#10233b 75%);color:#fff;border-radius:9px;display:flex;flex-direction:column;overflow:hidden;border:1px solid #10233b}
.analysis .panelhead{padding-bottom:9px}
.analysis h2{font-size:20px;color:#fff;margin:0;letter-spacing:-.5px}
.analysis .panelhead p{color:#bbc9dc;font-size:11px;margin:4px 0 0}
.analysis select{background:#223953;color:#fff;border-color:#405670;padding:6px;font-size:11px;width:auto}
.chartkeys{display:flex;gap:16px;font-size:10px;color:#d3deec;padding:3px 19px 0}
.chartkeys i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:5px}
.plot{display:flex;min-height:150px;flex:1;padding:13px 18px 8px;gap:8px}
.axisY{display:flex;flex-direction:column;justify-content:space-between;font:9px monospace;color:#a9b9ce;width:36px;text-align:right;margin-bottom:21px}
.bars{flex:1;display:flex;align-items:stretch;gap:4px;min-width:0;background:repeating-linear-gradient(to top,#53698266 0,#53698266 1px,transparent 1px,transparent calc(50% - .01px));background-size:100% calc(100% - 21px);background-repeat:no-repeat}
.cg{flex:1;display:flex;flex-direction:column;min-width:0}
.sticks{flex:1;min-height:100px;display:flex;align-items:flex-end;justify-content:center;gap:3px;width:100%}
.sticks i{width:min(32%,19px);min-height:1px;border-radius:2px 2px 0 0;display:block}
.sticks i.rq{background:#6197ff}.sticks i.ap{background:#88e4cf}
.cg span{height:21px;display:grid;align-items:end;justify-content:center;width:100%;font-size:9px;color:#c7d6e7}
.chartbase{display:flex;align-items:center;justify-content:space-between;padding:11px 19px;border-top:1px solid #ffffff20;font-size:11px;color:#c0d1e6}
.chartbase a{color:#b8d2ff}
/* ================= worklist ================= */
.wl-item{padding:12px 17px;display:flex;gap:10px;align-items:center;width:100%;border-top:1px solid var(--line-soft)}
.wl-item:first-of-type{border-top:0}
.sig{height:33px;width:33px;flex:none;display:grid;place-items:center;border-radius:8px;background:#edf1ff;color:#415caa}
.sig svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sig.amber{background:#fff0cd;color:#97600e}.sig.rose{background:#fbe8e6;color:#a3453e}
.wl-item b{font-size:12px;display:block;color:var(--ink)}
.wl-item small{display:block;font-weight:400;font-size:11px;color:#687788;margin-top:3px}
.count{margin-left:auto;padding:3px 7px;border:1px solid #dde2ea;border-radius:4px;color:#435369;font:600 12px monospace}
.panel .foot{border-top:1px solid var(--line-soft);padding:11px 18px;font-size:11px;display:flex;justify-content:space-between;color:var(--muted)}
/* ================= tables ================= */
table{width:100%;border-collapse:collapse;font-size:12.5px}
th{background:#f3f6fa;color:#53647b;text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);font-size:9.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap}
td{padding:11px 14px;border-bottom:1px solid var(--line-soft);vertical-align:top;color:var(--text)}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:#f7fafc}
tr.over td{background:#fff7f6}
tfoot td{background:#f2f5fa;font-weight:700;color:var(--ink)}
.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
th.num{text-align:right}
.table-wrap{overflow-x:auto}
.deptcode{font:10px monospace;color:#446080;background:#eff3f8;border:1px solid #dfe6ee;padding:3px;border-radius:3px;vertical-align:2px}
.ratio{display:inline-block;background:#e4ebf2;height:5px;border-radius:2px;width:42px;margin-right:6px;vertical-align:middle}
.ratio i{display:block;height:100%;background:#4e83df;border-radius:2px}
/* ================= badges / buttons ================= */
.badge{display:inline-block;padding:3px 8px;border-radius:5px;font-size:10.5px;font-weight:600;white-space:nowrap;background:#eef2f6;color:#54687f}
.b-pending{background:var(--amber-bg);color:var(--amber)} .b-approved{background:var(--green-bg);color:var(--green)}
.b-partial{background:var(--blue-soft);color:#1447b7} .b-rejected{background:var(--red-bg);color:var(--red)}
.b-selected{background:var(--violet-bg);color:var(--violet)} .b-paid{background:var(--green-bg);color:var(--green)}
.b-prepared{background:var(--amber-bg);color:var(--amber)} .b-issued{background:var(--blue-soft);color:#1447b7}
.b-cleared{background:var(--green-bg);color:var(--green)} .b-cancelled{background:var(--red-bg);color:var(--red)}
.b-printed{background:#eef2f6;color:#54687f}
.btn{display:inline-flex;align-items:center;gap:7px;background:var(--blue);border:1px solid var(--blue);color:#fff;border-radius:5px;padding:8px 14px;font-size:12.5px;font-weight:600;cursor:pointer}
.btn:hover{background:#1a4bd0;text-decoration:none}
.btn.navy{background:var(--ink);border-color:var(--ink)} .btn.navy:hover{background:var(--ink-2)}
.btn.gold{background:var(--blue);border-color:var(--blue)} .btn.gold:hover{background:#1a4bd0}
.btn.ghost{background:#fff;color:var(--ink-2);border-color:#cbd5e1}
.btn.ghost:hover{background:#f3f6fa}
.btn.red{background:#fff;color:var(--red);border-color:#eec9c5}
.btn.red:hover{background:var(--red-bg)}
.btn.sm{padding:5px 10px;font-size:12px}
.btn:disabled{opacity:.45;cursor:not-allowed}
/* ================= forms / misc ================= */
.flash{margin:0 0 14px;padding:11px 15px;border-radius:6px;font-size:12.5px;font-weight:600}
.flash.success{background:var(--green-bg);color:var(--green);border:1px solid #bfe3cd}
.flash.error{background:var(--red-bg);color:var(--red);border:1px solid #f3c1bb}
form .row{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:13px;margin-bottom:13px}
label.fl{display:block;font-size:12px;font-weight:600;color:var(--ink-2);margin-bottom:6px}
input,select,textarea{width:100%;padding:8px 10px;border:1px solid #c3cedb;border-radius:5px;font-size:12.5px;background:#fff;font-family:inherit;color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--blue);box-shadow:0 0 0 3px rgba(36,92,231,.15)}
textarea{resize:vertical}
.filters{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.filters>div{min-width:150px}
.filters .grow{flex:1 1 220px}
.bar{height:6px;background:#e4ebf2;border-radius:99px;overflow:hidden;min-width:80px}
.bar>i{display:block;height:100%;background:#4e83df;border-radius:99px}
.bar.over-bar>i{background:var(--red)}
.mut{color:var(--muted);font-size:12px}
.small{font-size:11.5px}
.right{text-align:right}
.flex{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.spread{justify-content:space-between}
.drop{border:1.5px dashed #b9c8dd;border-radius:8px;padding:24px;text-align:center;background:#f7fafc}
.drop input{border:0;background:transparent}
.pill{display:inline-block;background:#eef2f6;color:#42556c;border:1px solid var(--line-soft);border-radius:99px;padding:2px 10px;font-size:11px;font-weight:600}
.unit{font-size:10px;border:1px solid var(--line);border-radius:4px;color:#586b7e;padding:4px 6px;background:#fff}
.count-chip{display:inline-block;padding:2px 7px;border-radius:4px;font:600 11px monospace;border:1px solid #dde2ea;color:#435369}
.count-chip.bad{background:var(--red-bg);color:var(--red);border-color:#f0cfc9}
.count-chip.ok{background:var(--green-bg);color:var(--green);border-color:#c4e2cd}
.hero{display:none}
/* ================= auth ================= */
.auth-wrap{min-height:100vh;display:grid;grid-template-columns:1.05fr 1fr;background:#fff}
.auth-side{background:radial-gradient(900px 480px at 15% -10%,rgba(65,120,255,.22),transparent 60%),linear-gradient(165deg,#0d1c30,#172d4d 60%,#10233b);color:#d7e1ee;padding:52px 56px;display:flex;flex-direction:column}
.auth-side .brand-mark{height:44px;width:44px;background:#4178ff;border-radius:10px;display:grid;place-items:center}
.auth-side .brand-mark svg{width:26px;height:26px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.auth-side h1{color:#fff;font-size:30px;line-height:1.18;letter-spacing:-.8px;margin:32px 0 12px;font-weight:750;max-width:430px}
.auth-side p{color:#a9bcd4;font-size:14px;max-width:430px;margin:0}
.auth-feats{margin-top:36px;display:grid;gap:15px;max-width:440px}
.auth-feats div{display:flex;gap:12px;align-items:flex-start;font-size:13px;color:#c3d2e6}
.auth-feats svg{width:19px;height:19px;flex:0 0 19px;stroke:#88e4cf;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;margin-top:1px}
.auth-feats strong{color:#fff;display:block;font-size:13.5px}
.auth-side .foot-note{margin-top:auto;color:#7190b3;font-size:12px}
.auth-main{display:flex;align-items:center;justify-content:center;padding:36px 24px;background:#fff}
.auth-card{width:100%;max-width:400px}
.auth-card h2{margin:0 0 5px;font-size:22px;color:var(--ink);letter-spacing:-.6px;font-weight:750}
.auth-card .sub{margin:0 0 22px;color:var(--muted);font-size:13px}
.auth-card .fl{margin-bottom:14px}
.auth-card .btn{width:100%;padding:10px;font-size:13.5px;justify-content:center}
.auth-card .flash{margin:0 0 14px}
@media(max-width:860px){.auth-wrap{grid-template-columns:1fr}.auth-side{display:none}}
/* ================= cheque print ================= */
.cheque{border:2px solid var(--ink);border-radius:8px;padding:22px 26px;max-width:820px;background:linear-gradient(170deg,#fffdf4,#ffffff 45%);font-family:Georgia,serif;color:#111}
.cheque .ch-top{display:flex;justify-content:space-between;border-bottom:3px double var(--ink);padding-bottom:10px;margin-bottom:14px}
.cheque .payee-line{border-bottom:1px solid #999;padding:6px 4px;font-size:17px}
.cheque .amt-box{border:2px solid var(--ink);padding:8px 14px;font-size:19px;font-weight:800;display:inline-block;background:#fff}
@media print{
  .sidebar,.topbar,.foot,.no-print,.crumbline,.head{display:none!important}
  .main{margin:0}.wrap{padding:0}body{background:#fff}
  .card{border:0}
}
@media(max-width:900px){
  .sidebar{left:-230px;transition:left .25s;box-shadow:none}
  .sidebar.open{left:0;box-shadow:0 0 60px rgba(0,0,0,.35)}
  .burger{display:block}
  .tb-suite{display:none}
  .tb-search{display:none}
  .main{margin-left:0}
  .gridStats{grid-template-columns:1fr 1fr}
  .stat{border-bottom:1px solid var(--line)}
  .cols2{grid-template-columns:1fr}
  .kpis{grid-template-columns:1fr 1fr}
  .head h1{font-size:25px}
  .wrap{padding:16px 14px 30px}
}
.tb-logo{height:29px;width:29px;border-radius:7px;display:block;flex:0 0 29px}
.auth-side .auth-logo{height:44px;width:44px;border-radius:10px;display:block}
