
body:has(#ledgersTab.active) .top-company-bar{display:none!important}
body:has(#ledgersTab.active) .main-content{background:#f3f7fb!important}
#ledgersTab{font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif!important;background:#f3f7fb!important}

/* Modern module header */
#ledgersTab>.header-bar{
  min-height:68px!important;margin:0 0 14px!important;padding:4px 0!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
}
#ledgersTab>.header-bar .title{
  position:relative!important;margin:0!important;padding-left:55px!important;
  color:#111827!important;font-size:24px!important;line-height:1.08!important;font-weight:600!important;letter-spacing:-.3px!important;
}
#ledgersTab>.header-bar .title:before{
  content:'≡';position:absolute;left:0;top:-8px;width:42px;height:42px;display:grid;place-items:center;
  border-radius:10px;background:linear-gradient(145deg,#6d5dfc,#5a42f5);color:#fff;font-size:19px;
  box-shadow:0 6px 14px rgba(91,66,245,.18);
}
#ledgersTab>.header-bar .title:after{
  content:'Review party-wise debit, credit and running balances.';
  display:block;margin-top:5px;color:#64748b;font-size:11px;font-weight:400;line-height:1.3;letter-spacing:0;
}
#ledgersTab>.header-bar>div{display:flex!important;gap:8px!important}
#ledgersTab>.header-bar .btn{
  height:38px!important;padding:0 13px!important;border-radius:8px!important;font-size:10.5px!important;font-weight:600!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
}
#ledgersTab>.header-bar .btn-primary{background:#2563eb!important;color:#fff!important;border:1px solid #2563eb!important}
#ledgersTab>.header-bar .btn-outline{background:#fff!important;color:#334155!important;border:1px solid #d8e2ee!important}

/* Party selector becomes a proper toolbar */
#ledgersTab>.form-group{
  max-width:none!important;margin:0!important;padding:12px 14px!important;
  display:grid!important;grid-template-columns:160px minmax(240px,420px) 1fr!important;
  align-items:center!important;gap:10px!important;background:#fff!important;
  border:1px solid #dfe7f0!important;border-bottom:0!important;border-radius:12px 12px 0 0!important;
  box-shadow:0 3px 12px rgba(15,23,42,.035)!important;
}
#ledgersTab>.form-group label{margin:0!important;color:#334155!important;font-size:11px!important;font-weight:600!important}
#ledgersTab #ledgerClientSelect{
  height:36px!important;padding:0 10px!important;border:1px solid #d8e2ee!important;border-radius:7px!important;
  background:#fff!important;color:#1f2937!important;font-size:11px!important;
}
#ledgersTab #ledgerDirectionNote{
  min-height:36px!important;margin:0!important;padding:9px 14px!important;background:#f8fbff!important;
  border-left:1px solid #dfe7f0!important;border-right:1px solid #dfe7f0!important;
  color:#64748b!important;font-size:10.5px!important;line-height:1.45!important;
}

/* Ledger table */
#ledgersTab>.table-container{
  margin:0!important;background:#fff!important;border:1px solid #dfe7f0!important;border-radius:0 0 12px 12px!important;
  box-shadow:0 4px 14px rgba(15,23,42,.035)!important;overflow-x:auto!important;
}
#ledgersTab>.table-container table{font-size:10.5px!important;min-width:850px!important}
#ledgersTab>.table-container th{
  background:#dfe9f4!important;color:#172554!important;font-size:10px!important;font-weight:650!important;
  padding:9px 10px!important;border-bottom:1px solid #cbd8e6!important;white-space:nowrap!important;
}
#ledgersTab>.table-container td{
  padding:8px 10px!important;color:#334155!important;border-bottom:1px solid #edf2f7!important;white-space:nowrap!important;
}
#ledgersTab>.table-container tbody tr:hover{background:#f8fbff!important}
#ledgersTab>.table-container th:nth-last-child(-n+3),
#ledgersTab>.table-container td:nth-last-child(-n+3){text-align:right!important}
#ledgersTab>.table-container td:last-child{font-weight:650!important;color:#102344!important}

/* Existing role/balance notes, if rendered dynamically */
#ledgersTab .badge{padding:4px 8px!important;border-radius:999px!important;font-size:9.5px!important;font-weight:600!important}

@media(max-width:800px){
 #ledgersTab>.form-group{grid-template-columns:1fr!important}
 #ledgersTab>.header-bar{align-items:flex-start!important}
}
