:root{
  --bg:#f3f6ff;
  --card:#ffffff;
  --muted:#5b6472;
  --text:#111827;

  --accent:#5b5df7;
  --accent2:#22c55e;
  --danger:#ff3b30;

  --shadow: 0 16px 40px rgba(17, 24, 39, .10);
  --radius:22px;

  --g1: linear-gradient(135deg, #5b5df7 0%, #3b82f6 55%, #22c55e 120%);
  --g2: linear-gradient(135deg, #ff4d8d 0%, #ff8a00 55%, #ffd166 120%);
  --g3: linear-gradient(135deg, #06b6d4 0%, #3b82f6 55%, #8b5cf6 120%);
  --glass: rgba(255,255,255,.82);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Hind Siliguri", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(91,93,247,.25), transparent 55%),
              radial-gradient(900px 500px at 110% 10%, rgba(255,77,141,.18), transparent 60%),
              radial-gradient(900px 500px at 40% 110%, rgba(34,197,94,.16), transparent 60%),
              var(--bg);
  color:var(--text);
}
a{color:inherit;text-decoration:none}
.hidden{display:none !important}

.app{display:flex;min-height:100vh}

/* Sidebar (Desktop) */
.sidebar{width:290px;padding:18px;display:none}
.sideCard{
  background: var(--glass);
  border:1px solid rgba(0,0,0,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
  position:sticky; top:16px;
  backdrop-filter: blur(14px);
}
.brand{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.logo{
  width:44px;height:44px;border-radius:16px;
  background: rgba(91,93,247,.12);
  border:1px solid rgba(0,0,0,.06);
  display:grid;place-items:center;
  font-weight:900;
  color: var(--accent);
}
.brand h1{font-size:18px;margin:0}
.brand p{margin:0;color:var(--muted);font-size:13px}

.nav{margin-top:10px;display:grid;gap:10px}
.navbtn{
  padding:12px 12px;border-radius:16px;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.65);
  color:var(--text);
  display:flex;align-items:center;gap:10px;
  cursor:pointer;
  transition:.18s;
  user-select:none;
}
.navbtn:hover{transform:translateY(-1px);background:rgba(255,255,255,.9)}
.navbtn.active{
  border-color: rgba(91,93,247,.35);
  box-shadow:0 0 0 4px rgba(91,93,247,.10) inset;
  background: rgba(91,93,247,.08);
}
.navIcon{width:22px;height:22px;opacity:.95}

/* Main */
.main{
  flex:1;
  padding:16px 14px 110px;
  max-width:1100px;
  margin:0 auto;
  width:100%;
}

/* Header (Mobile only; hidden on desktop) */
.header{
  background: var(--glass);
  border:1px solid rgba(0,0,0,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  position:sticky;
  top:12px;
  z-index:10;
  backdrop-filter: blur(14px);
}
.profileMini{display:flex;align-items:center;gap:12px;cursor:pointer;min-width:0}
.avatar{
  width:46px;height:46px;border-radius:16px;
  background: rgba(0,0,0,.03);
  border:1px solid rgba(0,0,0,.08);
  overflow:hidden;
  flex:0 0 auto;
  display:grid;place-items:center;
}
.avatar img{width:100%;height:100%;object-fit:cover}
.pmeta{min-width:0}
.pname{font-weight:800;font-size:16px;line-height:1.1;margin:0}
.pdate{margin:3px 0 0;color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.logoutBtn{
  width:44px;height:44px;border-radius:16px;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.6);
  display:grid;place-items:center;
  cursor:pointer;
  transition:.18s;
}
.logoutBtn:hover{transform:translateY(-1px);background:rgba(255,255,255,.95)}
.icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2}

/* Cards & layout */
.grid{display:grid; gap:12px; margin-top:12px;}
.grid2{display:grid; gap:12px;}
.card{
  background: var(--glass);
  border:1px solid rgba(0,0,0,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:14px;
  backdrop-filter: blur(14px);
}
.card h2{margin:0 0 8px;font-size:16px}
.muted{color:var(--muted)}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

.badge{
  display:inline-flex;align-items:center;gap:6px;
  font-size:12px;padding:6px 10px;border-radius:999px;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.7);
  color:var(--muted);
}

.btn{
  border:none;border-radius:16px;
  padding:12px 14px;
  background: var(--g1);
  color: white;font-weight:900;
  cursor:pointer;transition:.18s;
}
.btn:hover{transform:translateY(-1px); filter:saturate(1.08);}
.btn.secondary{
  background: rgba(255,255,255,.78);
  border:1px solid rgba(0,0,0,.10);
  color: var(--text);
  font-weight:800;
}
.btn.danger{
  background: rgba(255,59,48,.12);
  border:1px solid rgba(255,59,48,.30);
  color: #b42318;
}
.btn.small{padding:8px 10px;border-radius:14px;font-weight:800}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none}

.input{
  width:100%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.82);
  color:var(--text);
  outline:none;
  font-size:15px;
}
.input:focus{
  box-shadow:0 0 0 4px rgba(91,93,247,.18);
  border-color: rgba(91,93,247,.45);
}
label{display:block;margin:10px 0 6px;color:var(--muted);font-size:13px}

/* Dashboard Modern Card */
.heroCard{
  padding:16px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(91,93,247,.18), rgba(255,77,141,.12), rgba(34,197,94,.10));
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--shadow);
}
.heroTop{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.heroTitle{font-weight:900;font-size:18px;margin:0}
.heroSub{color:var(--muted);font-size:13px;margin-top:4px}
.balanceBig{font-weight:1000;font-size:28px;margin-top:10px;letter-spacing:.2px}
.kpiGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-top:12px;
}
.kpiPill{
  border-radius:18px;
  padding:10px;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.72);
}
.kpiPill .k{font-size:12px;color:var(--muted);font-weight:700}
.kpiPill .v{font-size:16px;font-weight:950;margin-top:2px}
.pillPos{border-color: rgba(34,197,94,.25)}
.pillPos .v{color:#0f6b2f}
.pillNeutral{border-color: rgba(91,93,247,.25)}
.pillNeutral .v{color:#2f36d6}

/* Entry layout */
.split{display:grid;grid-template-columns:1fr;gap:12px}
.incomeGrid3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
.fieldCompact label{margin-top:0}
.fieldCompact .input{padding:11px 10px}

/* List */
.list{display:grid;gap:10px;margin-top:10px}
.item{
  border-radius:18px;
  background: rgba(255,255,255,.72);
  border:1px solid rgba(0,0,0,.06);
  padding:12px;
  display:flex;justify-content:space-between;gap:10px;
}
.item .left{min-width:0}
.item .title{font-weight:950}
.item .sub{color:var(--muted);font-size:13px;margin-top:2px}
.item .amt{font-weight:1000;font-size:16px;text-align:right;white-space:nowrap}
.pill{
  font-size:12px;padding:4px 10px;border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.75);
  color: var(--muted);
  display:inline-flex;gap:6px;align-items:center;
  margin-top:6px;
}
.pill.income{border-color:rgba(91,93,247,.25); color:rgba(91,93,247,.95);}
.pill.expense{border-color:rgba(255,59,48,.25); color:rgba(255,59,48,.95);}

/* NEW Bottom Nav (Mobile) */
.bottomNav{
  position:fixed;left:0;right:0;bottom:0;
  padding:14px 14px 18px;
  z-index:30;
}
.dock{
  background: rgba(255,255,255,.78);
  border:1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 55px rgba(0,0,0,.18);
  border-radius: 26px;
  padding:10px;
  display:flex;
  gap:8px;
  justify-content:space-between;
  backdrop-filter: blur(18px);
}
.tabBtn{
  flex:1;
  border-radius: 20px;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
  color: var(--muted);
  padding:10px 8px;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:.18s;
  user-select:none;
}
.tabBtn svg{width:20px;height:20px;stroke-width:2}
.tabBtn span{font-size:12px;margin-top:4px;font-weight:800}

.tabBtn.active{
  color: var(--accent);
  border:none;
  background: transparent;
  box-shadow: none;
  transform: translateY(-2px);
}

/* Modal */
.modalWrap{
  position:fixed;inset:0;
  background: rgba(0,0,0,.38);
  display:none;
  align-items:center;justify-content:center;
  z-index:50;
  padding:16px;
}
.modal{
  width:min(520px, 100%);
  background: rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.10);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding:16px;
  backdrop-filter: blur(14px);
}
.modal h3{margin:0 0 8px}
.modal .actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px}

.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:120px;
  background: rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.10);
  border-radius: 999px;
  padding:10px 14px;
  box-shadow: var(--shadow);
  display:none;
  gap:10px;
  align-items:center;
  z-index:60;
  max-width: calc(100% - 20px);
  color: var(--text);
}
.tick{
  width:22px;height:22px;border-radius:999px;
  background: rgba(34,197,94,.16);
  border:1px solid rgba(34,197,94,.40);
  display:grid;place-items:center;
  animation: pop .25s ease-out;
  color: rgba(20,110,55,1);
  font-weight:900;
}
@keyframes pop{from{transform:scale(.8);opacity:.5}to{transform:scale(1);opacity:1}}

/* Login */
.loginWrap{min-height:100vh;display:grid;place-items:center;padding:16px}
.loginCard{
  width:min(420px, 100%);
  border-radius: 28px;
  box-shadow: var(--shadow);
  border:1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.88);
  padding:18px;
  backdrop-filter: blur(16px);
}
.loginCard h1{margin:0 0 6px;font-size:20px}
.loginCard p{margin:0 0 10px;color:var(--muted)}
.hint{
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
  border:1px dashed rgba(0,0,0,.14);
  border-radius:18px;
  padding:10px 12px;
  background: rgba(255,255,255,.55);
}

/* Responsive */
@media (min-width: 980px){
  .sidebar{display:block}
  .main{padding:16px 14px 20px}
  .bottomNav{display:none}
  .split{grid-template-columns: 1.15fr .85fr}

  /* Desktop: header hide (Logout in sidebar) */
  .header{display:none;}
  .main{padding-top:16px;}
}


/* রিপোর্ট সারাংশ KPI গ্রিড */
.reportKpiGrid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:12px;
  @media (max-width: 979px){
  #reportKpis .kpiPill{ min-height: 110px !important; }
  #reportKpis .kpiPill .v{ font-size: 24px !important; }
}

}
@media (min-width: 980px){
  .reportKpiGrid{
    grid-template-columns: repeat(4, 1fr);
  }
}
