
:root{
  --primary:#0f4c81;
  --primary2:#1d6fb8;
  --soft:#eef6ff;
  --dark:#172033;
  --muted:#6b7280;
  --success:#138a5b;
}
body{background:#f5f7fb;color:var(--dark);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
.navbar-brand{font-weight:800;letter-spacing:.3px}
.sidebar{min-height:calc(100vh - 56px);background:#0f2740}
.sidebar a{display:block;color:#dcecff;text-decoration:none;padding:12px 16px;border-radius:8px;margin:5px 8px}
.sidebar a:hover,.sidebar a.active{background:#1d6fb8;color:#fff}
.card{border:0;border-radius:16px;box-shadow:0 7px 24px rgba(31,41,55,.07)}
.stat-card{position:relative;overflow:hidden}
.stat-card:after{content:"";position:absolute;width:90px;height:90px;border-radius:50%;background:rgba(15,76,129,.08);right:-20px;top:-20px}
.btn-primary{background:var(--primary2);border-color:var(--primary2)}
.table thead th{background:#eef3f8;color:#334155}
.badge-soft{background:#eaf4ff;color:#0f4c81}
.login-wrap{min-height:100vh;background:linear-gradient(135deg,#0f2740,#1d6fb8 60%,#5ca7e4);display:flex;align-items:center}
.login-card{max-width:450px;margin:auto}
.brand-badge{width:54px;height:54px;border-radius:14px;background:#e9f4ff;display:grid;place-items:center;font-size:26px}
.small-muted{color:var(--muted);font-size:.9rem}

main{min-height:calc(100vh - 56px)}
.form-control,.form-select{border-radius:10px;border-color:#d7dee8}
.table{margin-bottom:0}
.table td,.table th{vertical-align:middle}
h3.fw-bold{letter-spacing:-.3px}
.sidebar{overflow-y:auto;max-height:calc(100vh - 56px);position:sticky;top:56px}
@media(max-width:767px){.sidebar{min-height:auto;position:static;max-height:none}.sidebar a{display:inline-block}}

.module-title{font-weight:800;letter-spacing:-.4px}
.kpi{font-size:1.55rem;font-weight:800}
.page-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.sticky-tools{position:sticky;top:70px}
.badge-warning-soft{background:#fff7db;color:#7a5b00}
.badge-danger-soft{background:#ffe8e8;color:#a31919}
.print-card{background:#fff;border-radius:16px}
.search-lg{height:48px}

.erp-body{background:#eef3f8}.erp-sidebar{background:linear-gradient(180deg,#102b47,#113557);min-height:calc(100vh - 56px);position:relative;overflow:visible!important}.erp-logo{color:#fff;font-weight:800;border-bottom:1px solid rgba(255,255,255,.1)}.erp-menu{padding:8px 0}.erp-main{width:100%;border:0;background:transparent;color:#e9f4ff;display:flex;align-items:center;gap:11px;padding:12px 18px;text-decoration:none;text-align:left;font-size:.93rem}.erp-main span{width:20px;text-align:center}.erp-main i{margin-left:auto;font-style:normal;font-size:18px}.erp-main:hover,.erp-main.active,.erp-group.open>.erp-main{background:#17466f;color:white}.erp-group{position:relative}.erp-flyout{display:none;position:absolute;left:100%;top:0;min-width:280px;background:#fff;border:1px solid #cfd9e4;box-shadow:0 14px 34px rgba(15,35,55,.2);z-index:9999}.erp-group.open>.erp-flyout{display:block}.fly-row{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;color:#243447;text-decoration:none;border-bottom:1px solid #edf1f4;background:#fff}.fly-row:hover{background:#f2f7fc;color:#0b5a9d}.has-sub{position:relative;cursor:pointer}.erp-subfly{display:none;position:absolute;left:100%;top:-1px;min-width:270px;background:#fff;border:1px solid #cfd9e4;box-shadow:0 12px 28px rgba(15,35,55,.18)}.has-sub:hover>.erp-subfly{display:block}.erp-subfly a{display:block;padding:11px 16px;text-decoration:none;color:#243447;border-bottom:1px solid #edf1f4}.erp-subfly a:hover{background:#f2f7fc;color:#0b5a9d}.erp-sidebar-footer{position:absolute;left:0;bottom:16px;width:100%;text-align:center;color:#dcecff;font-size:.78rem;padding:0 10px}.erp-sidebar-footer #erpClock{font-size:1.05rem;font-weight:700}.erp-content{background:#f4f7fb;min-height:calc(100vh - 56px)}.erp-search-wrap{min-width:380px;max-width:560px;flex:1}.erp-kpi{background:#fff;border-radius:10px;padding:14px 16px;border-bottom:3px solid #2f86c8;box-shadow:0 5px 16px rgba(31,41,55,.06)}.erp-kpi small{display:block;color:#6d7680;margin-bottom:8px}.erp-kpi div{font-size:1.35rem;font-weight:800}.erp-section-title{font-weight:800;color:#34495e;font-size:.84rem;letter-spacing:.4px}.erp-quick{display:flex;align-items:center;gap:12px;background:#1976bd;color:#fff;text-decoration:none;padding:13px 14px;border-radius:4px;font-weight:700}.erp-quick:hover{background:#0f5e99;color:#fff}.vital-box{border-left:4px solid #f2a238;background:#f8fafc;padding:12px}.vital-box small{display:block;color:#6b7280;margin-bottom:4px}.vital-box b{font-size:1.12rem}@media(max-width:767px){.erp-sidebar{min-height:auto}.erp-flyout,.erp-subfly{position:static!important;min-width:0!important;box-shadow:none!important;border:0!important}.erp-sidebar-footer{display:none}.erp-search-wrap{min-width:100%}}


/* =========================================================
   V4.3 FULL UI CONSISTENCY PATCH
   ========================================================= */
body.erp-body{overflow-x:hidden}
.navbar{position:sticky;top:0;z-index:1050}
.container-fluid>.row{position:relative}
.erp-sidebar{
  flex:0 0 220px;
  width:220px;
  max-width:220px;
  min-width:220px;
  z-index:1040;
}
.erp-content{
  flex:1 1 auto;
  width:calc(100% - 220px);
  max-width:calc(100% - 220px);
}
.erp-menu .erp-main{
  border-radius:0;
  margin:0;
}
.erp-flyout,.erp-subfly{
  border-radius:4px;
  overflow:visible;
}
.erp-flyout a,.erp-subfly a{
  white-space:nowrap;
}
@media(min-width:768px){
  .erp-sidebar{
    position:sticky;
    top:56px;
    height:calc(100vh - 56px);
    min-height:calc(100vh - 56px);
  }
  .erp-menu{
    max-height:calc(100vh - 145px);
    overflow-y:auto;
    overflow-x:visible;
  }
  .erp-group{
    position:relative;
  }
}
@media(max-width:767px){
  .erp-sidebar,.erp-content{
    width:100%;
    max-width:100%;
    min-width:0;
    flex:0 0 100%;
  }
  .erp-menu{
    max-height:none;
    overflow:visible;
  }
}


/* =========================================================
   V4.3.1 CASCADING MENU FIX
   Fixes clipped second/third level menus on shared hosting.
   ========================================================= */
@media(min-width:768px){
  .erp-sidebar{
    overflow:visible!important;
  }
  .erp-menu{
    overflow:visible!important;
    max-height:none!important;
  }
  .erp-group{
    position:relative;
    overflow:visible!important;
  }
  .erp-flyout{
    position:absolute!important;
    left:100%!important;
    top:0!important;
    display:none;
    overflow:visible!important;
    z-index:99999!important;
  }
  .erp-group.open > .erp-flyout{
    display:block!important;
  }
  .has-sub{
    position:relative!important;
    overflow:visible!important;
  }
  .erp-subfly{
    position:absolute!important;
    left:100%!important;
    top:-1px!important;
    display:none;
    z-index:100000!important;
  }
  .has-sub:hover > .erp-subfly,
  .has-sub.sub-open > .erp-subfly{
    display:block!important;
  }
}
@media(max-width:767px){
  .erp-group.open > .erp-flyout{
    display:block!important;
  }
  .has-sub.sub-open > .erp-subfly{
    display:block!important;
  }
}


/* ===== V4.3.9 COMPACT DESKTOP OVERRIDE ===== */
@media (min-width: 992px){
  body.erp-body{font-size:13px;overflow:hidden}
  .navbar{min-height:46px!important;padding:.25rem .65rem!important}
  .erp-sidebar{min-height:calc(100vh - 46px)!important;height:calc(100vh - 46px);overflow-y:auto!important}
  .erp-logo{padding:10px 12px!important}
  .erp-menu{padding:3px 0!important}
  .erp-main{padding:7px 12px!important;font-size:.79rem!important;gap:8px!important}
  .erp-main span{width:17px!important}
  .erp-sidebar-footer{position:relative!important;bottom:auto!important;padding:10px 5px!important;font-size:.68rem!important}
  .erp-sidebar-footer #erpClock{font-size:.88rem!important}
  .erp-content{height:calc(100vh - 46px);overflow-y:auto;padding:12px 14px!important}
  .erp-content h3{font-size:1.35rem!important}
  .erp-search-wrap{min-width:300px!important;max-width:420px!important}
  .erp-search-wrap .form-control{height:36px!important;font-size:12px!important}
  .erp-kpi{padding:9px 11px!important;border-radius:9px!important}
  .erp-kpi small{font-size:10px!important;margin-bottom:4px!important}
  .erp-kpi div{font-size:1.12rem!important}
  .card{border-radius:11px!important}
  .card.p-3{padding:10px!important}
  .erp-section-title{font-size:.72rem!important;margin-bottom:7px!important}
  .erp-quick{padding:8px 10px!important;font-size:.76rem!important;gap:8px!important}
  .vital-box{padding:7px 8px!important}
  .vital-box small{font-size:10px!important;margin-bottom:2px!important}
  .vital-box b{font-size:.9rem!important}
  .row.g-3{--bs-gutter-x:.7rem;--bs-gutter-y:.7rem}
  .mb-3{margin-bottom:.7rem!important}
  canvas#donut,canvas#trend{max-height:190px!important}
  .table td,.table th{padding:.35rem .45rem!important;font-size:11px!important}
  .erp-flyout{min-width:245px!important}
  .fly-row,.erp-subfly a{padding:8px 12px!important;font-size:12px!important}
}
@media (min-width: 1200px){
  .erp-content{padding-left:16px!important;padding-right:16px!important}
}


/* ===== V4.3.10 TRUE FIT-SCREEN DESKTOP ===== */
@media (min-width: 992px){
  html,body{height:100%;margin:0}
  body.erp-body{overflow:hidden!important;font-size:12px!important}

  .navbar{
    height:42px!important;
    min-height:42px!important;
    padding:2px 8px!important;
  }

  .erp-sidebar{
    height:calc(100vh - 42px)!important;
    min-height:calc(100vh - 42px)!important;
    overflow-y:auto!important;
  }
  .erp-logo{padding:7px 10px!important;font-size:12px!important}
  .erp-menu{padding:1px 0!important}
  .erp-main{
    min-height:30px!important;
    padding:5px 10px!important;
    font-size:11px!important;
    gap:6px!important;
  }
  .erp-sidebar-footer{
    position:relative!important;
    bottom:auto!important;
    padding:5px!important;
    font-size:9px!important;
  }
  .erp-sidebar-footer #erpClock{font-size:11px!important;margin:0!important}

  .erp-content{
    height:calc(100vh - 42px)!important;
    overflow:hidden!important;
    padding:7px 10px!important;
  }

  .erp-content > .d-flex.mb-3{
    margin-bottom:5px!important;
    min-height:36px!important;
  }
  .erp-content h3{
    font-size:20px!important;
    line-height:1.05!important;
    margin:0!important;
  }
  .erp-content h3 + small{font-size:9px!important}
  .erp-search-wrap{max-width:420px!important}
  .erp-search-wrap .form-control{
    height:30px!important;
    padding:4px 9px!important;
    font-size:10px!important;
  }

  .erp-content .row.g-3{
    --bs-gutter-x:8px!important;
    --bs-gutter-y:8px!important;
  }
  .erp-content .mb-3{margin-bottom:7px!important}

  .erp-kpi{
    height:58px!important;
    padding:7px 10px!important;
    border-radius:9px!important;
  }
  .erp-kpi small{font-size:9px!important;margin-bottom:2px!important}
  .erp-kpi div{font-size:16px!important;line-height:1.1!important}

  .card{
    border-radius:10px!important;
  }
  .card.p-3{
    padding:8px 10px!important;
  }
  .erp-section-title{
    font-size:10px!important;
    margin:0 0 5px!important;
  }

  /* Quick action / vital row */
  .erp-quick{
    height:32px!important;
    padding:5px 8px!important;
    font-size:10px!important;
    gap:5px!important;
  }
  .vital-box{
    min-height:48px!important;
    padding:5px 7px!important;
  }
  .vital-box small{font-size:9px!important;margin:0!important}
  .vital-box b{font-size:12px!important;line-height:1.1!important}

  /* Charts are the main previous overflow cause */
  .chart-fit{
    position:relative!important;
    width:100%!important;
    height:155px!important;
    max-height:155px!important;
    overflow:hidden!important;
  }
  .chart-fit canvas{
    width:100%!important;
    height:100%!important;
    max-height:155px!important;
  }

  /* Recent activity compact */
  .erp-content > .card:last-of-type{
    max-height:115px!important;
    overflow:auto!important;
  }
  .table td,.table th{
    padding:3px 5px!important;
    font-size:9px!important;
    line-height:1.15!important;
  }

  .erp-flyout{min-width:220px!important}
  .fly-row,.erp-subfly a{padding:7px 10px!important;font-size:10px!important}
}

/* 1366x768 and similar laptop screens */
@media (min-width:992px) and (max-height:800px){
  .chart-fit{height:140px!important;max-height:140px!important}
  .chart-fit canvas{max-height:140px!important}
  .erp-quick{height:29px!important}
  .vital-box{min-height:44px!important}
  .erp-content > .card:last-of-type{max-height:95px!important}
}


/* ===== V4.3.11 NO HORIZONTAL SCROLL / FIXED ERP WIDTH ===== */
html,body{
  width:100%;
  max-width:100%;
  overflow-x:hidden!important;
}

.container-fluid{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  padding-left:0!important;
  padding-right:0!important;
}

.container-fluid > .row{
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  flex-wrap:nowrap!important;
}

@media (min-width:768px){
  .erp-sidebar{
    flex:0 0 185px!important;
    width:185px!important;
    max-width:185px!important;
    min-width:185px!important;
    overflow:visible!important;
    position:sticky!important;
    top:42px!important;
  }

  /* Critical: neutralize Bootstrap col-md-10 width */
  main.erp-content,
  .erp-content.col-md-10{
    flex:1 1 0!important;
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }

  .erp-menu{
    overflow:visible!important;
  }

  .erp-group{
    position:relative!important;
    overflow:visible!important;
  }

  .erp-flyout{
    position:absolute!important;
    left:100%!important;
    top:0!important;
    min-width:235px!important;
    max-width:260px!important;
    z-index:20000!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }

  .erp-subfly{
    position:absolute!important;
    left:100%!important;
    top:-1px!important;
    min-width:245px!important;
    max-width:270px!important;
    z-index:20001!important;
    box-sizing:border-box!important;
  }

  .fly-row,
  .erp-subfly a{
    white-space:normal!important;
    word-break:normal!important;
  }
}

@media (max-width:767px){
  .container-fluid > .row{flex-wrap:wrap!important}
  .erp-sidebar,
  main.erp-content{
    flex:0 0 100%!important;
    width:100%!important;
    max-width:100%!important;
  }
}


/* ===== V4.3.12 SIDEBAR SCROLLBAR + FIXED FLYOUT FINAL FIX ===== */
html,body{
  overflow-x:hidden!important;
}

@media (min-width:768px){
  .erp-sidebar{
    overflow-x:hidden!important;
    overflow-y:auto!important;
    scrollbar-gutter:auto!important;
  }

  .erp-menu{
    overflow:visible!important;
  }

  .erp-group{
    overflow:visible!important;
  }

  /* Menus are positioned by JS against the viewport.
     They no longer increase sidebar scrollWidth. */
  .erp-flyout{
    position:fixed!important;
    left:auto;
    top:auto;
    display:none;
    width:235px!important;
    min-width:235px!important;
    max-width:235px!important;
    max-height:calc(100vh - 50px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    z-index:999990!important;
    margin:0!important;
  }

  .erp-group.open > .erp-flyout{
    display:block!important;
  }

  .erp-subfly{
    position:fixed!important;
    left:auto;
    top:auto;
    display:none!important;
    width:250px!important;
    min-width:250px!important;
    max-width:250px!important;
    max-height:calc(100vh - 50px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    z-index:999999!important;
    margin:0!important;
  }

  /* Disable old hover positioning; click JS controls the submenu. */
  .has-sub:hover > .erp-subfly{
    display:none!important;
  }

  .has-sub.sub-open > .erp-subfly{
    display:block!important;
  }

  .fly-row,
  .erp-subfly a{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
}

@media(max-width:767px){
  .erp-sidebar{
    overflow-x:hidden!important;
  }
  .erp-flyout,.erp-subfly{
    position:static!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    max-height:none!important;
  }
  .erp-group.open > .erp-flyout,
  .has-sub.sub-open > .erp-subfly{
    display:block!important;
  }
}


/* ===== V4.3.13 RELIABLE CLICK MENU FINAL OVERRIDE ===== */
@media(min-width:768px){
  .erp-sidebar{
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  .erp-flyout{
    display:none!important;
    position:fixed!important;
    margin:0!important;
    min-width:235px!important;
    max-width:235px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    max-height:calc(100vh - 50px)!important;
  }

  /* JS writes inline display:block; allow inline style to win */
  .erp-group.open > .erp-flyout[style*="display: block"],
  .erp-group.open > .erp-flyout[style*="display:block"]{
    display:block!important;
  }

  .erp-subfly{
    display:none!important;
    position:fixed!important;
    margin:0!important;
    min-width:250px!important;
    max-width:250px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    max-height:calc(100vh - 50px)!important;
  }

  .has-sub.sub-open > .erp-subfly[style*="display: block"],
  .has-sub.sub-open > .erp-subfly[style*="display:block"]{
    display:block!important;
  }

  .has-sub:hover > .erp-subfly{
    display:none!important;
  }

  .has-sub.sub-open:hover > .erp-subfly[style*="display: block"],
  .has-sub.sub-open:hover > .erp-subfly[style*="display:block"]{
    display:block!important;
  }
}


/* ===== V4.3.14 BODY PORTAL MENU - DASHBOARD SAFE ===== */
.erp-portal-menu{
  position:fixed!important;
  display:block!important;
  margin:0!important;
  background:#fff!important;
  border:1px solid #cfd9e4!important;
  box-shadow:0 14px 34px rgba(15,35,55,.25)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  max-height:calc(100vh - 50px)!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}

body > .erp-flyout.erp-portal-menu{
  width:235px!important;
  min-width:235px!important;
  max-width:235px!important;
}

body > .erp-subfly.erp-portal-menu{
  width:250px!important;
  min-width:250px!important;
  max-width:250px!important;
}

body > .erp-flyout.erp-portal-menu .fly-row,
body > .erp-subfly.erp-portal-menu a{
  display:flex!important;
  padding:8px 12px!important;
  color:#243447!important;
  background:#fff!important;
  text-decoration:none!important;
  border-bottom:1px solid #edf1f4!important;
  font-size:11px!important;
  white-space:normal!important;
}

body > .erp-flyout.erp-portal-menu .fly-row:hover,
body > .erp-subfly.erp-portal-menu a:hover{
  background:#f2f7fc!important;
  color:#0b5a9d!important;
}

/* Sidebar itself never gets a horizontal scrollbar */
.erp-sidebar{
  overflow-x:hidden!important;
}

/* Old flyouts stay hidden while inside the sidebar */
.erp-sidebar .erp-flyout,
.erp-sidebar .erp-subfly{
  display:none!important;
}


/* =========================================================
   V4.3.15 STABLE ACCORDION + NORMAL PAGE SCROLL
   This overrides all previous experimental flyout/fixed-height rules.
   ========================================================= */
html,body{
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:100%!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}

body.erp-body{
  overflow-x:hidden!important;
  overflow-y:auto!important;
}

.container-fluid{
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}

.container-fluid > .row{
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
}

.erp-sidebar{
  flex:0 0 185px!important;
  width:185px!important;
  min-width:185px!important;
  max-width:185px!important;
  min-height:calc(100vh - 42px)!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  position:relative!important;
  top:auto!important;
  background:#123a5d!important;
}

main.erp-content,
.erp-content.col-md-10{
  flex:1 1 0!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  min-height:calc(100vh - 42px)!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  padding:10px 12px!important;
}

.stable-menu{padding:2px 0}
.stable-main{
  width:100%;
  border:0;
  background:transparent;
  color:#eef7ff;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 11px;
  text-decoration:none;
  text-align:left;
  font-size:11px;
  min-height:33px;
}
.stable-main span{width:17px;text-align:center}
.stable-main i{margin-left:auto;font-style:normal;font-size:10px}
.stable-main:hover,.stable-main.active,.stable-group.open>.stable-main{
  background:#1a5787;
  color:#fff;
}

.stable-panel{
  display:none;
  background:#0d2f4d;
  border-top:1px solid rgba(255,255,255,.05);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.stable-group.open>.stable-panel{display:block}

.stable-panel>a,
.stable-sub-toggle{
  width:100%;
  border:0;
  display:block;
  text-align:left;
  padding:7px 10px 7px 31px;
  color:#dceeff;
  background:transparent;
  text-decoration:none;
  font-size:10px;
}
.stable-panel>a:hover,.stable-sub-toggle:hover{
  background:#17496f;
  color:#fff;
}

.stable-sub-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.stable-subpanel{
  display:none;
  background:#09283f;
}
.stable-panel.sub-open>.stable-subpanel{display:block}
.stable-subpanel a{
  display:block;
  padding:7px 8px 7px 43px;
  color:#cfe8fb;
  text-decoration:none;
  font-size:10px;
}
.stable-subpanel a:hover{background:#17496f;color:#fff}

.stable-footer{
  color:#dceeff;
  text-align:center;
  font-size:9px;
  padding:12px 5px 14px;
}
.stable-footer #erpClock{font-size:11px;font-weight:700}

.erp-logo{
  padding:10px 11px!important;
  font-size:12px!important;
}

/* Disable all old flyout menu boxes completely */
.erp-flyout,
.erp-subfly,
.erp-portal-menu{
  display:none!important;
}

/* General page scrolling: no internal page/card scrollbars forced by old fixes */
main.erp-content .card,
main.erp-content .print-card{
  max-height:none!important;
  overflow:visible!important;
}

/* Invoice / forms should use normal browser vertical scrolling */
main.erp-content form,
main.erp-content .table-responsive{
  max-height:none!important;
}

/* Dashboard remains compact, but does not lock the viewport */
main.erp-content .dash-chart-box{
  height:135px!important;
  max-height:135px!important;
  overflow:hidden!important;
}
main.erp-content .dash-chart-box canvas{
  height:100%!important;
  max-height:135px!important;
}

/* Remove prior last-card forced internal scrolling */
main.erp-content > .card:last-of-type{
  max-height:none!important;
  overflow:visible!important;
}

@media(max-width:767px){
  .container-fluid>.row{flex-wrap:wrap!important}
  .erp-sidebar,
  main.erp-content{
    flex:0 0 100%!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
}
