/*
 * ERP Rasel — final compact design-system layer.
 * Loaded after every page-specific stylesheet so all modules share the same
 * shell, buttons, cards, forms and dark-mode behaviour.
 */
:root{
  --erp-shell-header:42px;
  --erp-shell-sidebar:220px;
  --erp-shell-sidebar-mini:54px;
  --erp-ui-primary:#0fa79d;
  --erp-ui-primary-2:#55b8d4;
  --erp-ui-secondary:#314c78;
  --erp-ui-secondary-2:#554f91;
  --erp-ui-danger:#b20a75;
  --erp-ui-danger-2:#79005b;
  --erp-ui-accent:#8fd24f;
  --erp-ui-page:#f2f6fb;
  --erp-ui-card:#ffffff;
  --erp-ui-card-soft:#f8fbfd;
  --erp-ui-text:#142238;
  --erp-ui-muted:#68788e;
  --erp-ui-line:#dfe7f0;
  --erp-ui-shadow:0 10px 28px rgba(15,23,42,.08);
  --erp-ui-shadow-hover:0 16px 34px rgba(15,23,42,.13);
  --erp-ui-radius:14px;
  --erp-ui-radius-sm:10px;
  --erp-ui-main-gradient:linear-gradient(135deg,#15996f 0%,#54b8d5 100%);
  --erp-ui-secondary-gradient:linear-gradient(135deg,#2e5572 0%,#554f91 100%);
  --erp-ui-danger-gradient:linear-gradient(135deg,#bd087c 0%,#79005b 100%);
  --erp-ui-header-gradient:linear-gradient(100deg,#0c1b35 0%,#173d67 55%,#0c8f8a 100%);
  --erp-ui-topline:linear-gradient(90deg,#0fa79d,#55b8d4,#7868dd);
}

html[data-erp-theme="dark"]{
  color-scheme:dark;
  --erp-ui-page:#09111e;
  --erp-ui-card:#111a2b;
  --erp-ui-card-soft:#0d1626;
  --erp-ui-text:#e6edf7;
  --erp-ui-muted:#9cadc1;
  --erp-ui-line:#26344a;
  --erp-ui-shadow:0 12px 30px rgba(0,0,0,.32);
  --erp-ui-shadow-hover:0 18px 38px rgba(0,0,0,.42);
  --erp-ui-header-gradient:linear-gradient(100deg,#081222 0%,#102845 55%,#096f6b 100%);

  --cl-ink:#e6edf7;--cpx-ink:#e6edf7;--crf-ink:#e6edf7;--crx-ink:#e6edf7;--db-ink:#e6edf7;--dbc-ink:#e6edf7;--dc-ink:#e6edf7;--erp-ink:#e6edf7;--pay-ink:#e6edf7;--ptf-ink:#e6edf7;--ptx-ink:#e6edf7;--rpt-ink:#e6edf7;--sm-ink:#e6edf7;--sp-ink:#e6edf7;--stk-ink:#e6edf7;--tx-ink:#e6edf7;--ulx-ink:#e6edf7;--unf-ink:#e6edf7;--wh-ink:#e6edf7;
  --sales-text:#e6edf7;--smtp-text:#e6edf7;
  --aa-muted:#9cadc1;--al-muted:#9cadc1;--br-muted:#9cadc1;--cc-muted:#9cadc1;--cl-muted:#9cadc1;--cpx-muted:#9cadc1;--crf-muted:#9cadc1;--crx-muted:#9cadc1;--ct-muted:#9cadc1;--db-muted:#9cadc1;--dbc-muted:#9cadc1;--dc-muted:#9cadc1;--erp-muted:#9cadc1;--ex-muted:#9cadc1;--ia-muted:#9cadc1;--ic-muted:#9cadc1;--il-muted:#9cadc1;--im-muted:#9cadc1;--lc-muted:#9cadc1;--md-muted:#9cadc1;--mda-muted:#9cadc1;--mt-muted:#9cadc1;--mta-muted:#9cadc1;--pay-muted:#9cadc1;--pi-muted:#9cadc1;--pr-muted:#9cadc1;--ptf-muted:#9cadc1;--ptx-muted:#9cadc1;--pur-muted:#9cadc1;--qt-muted:#9cadc1;--rpt-muted:#9cadc1;--sales-muted:#9cadc1;--sm-muted:#9cadc1;--smtp-muted:#9cadc1;--sp-muted:#9cadc1;--stk-muted:#9cadc1;--sv-muted:#9cadc1;--tx-muted:#9cadc1;--ulx-muted:#9cadc1;--unf-muted:#9cadc1;--vr-muted:#9cadc1;--wh-muted:#9cadc1;
  --aa-line:#26344a;--al-line:#26344a;--br-line:#26344a;--cc-line:#26344a;--cl-line:#26344a;--cpx-line:#26344a;--crf-line:#26344a;--crx-line:#26344a;--ct-line:#26344a;--db-line:#26344a;--dc-line:#26344a;--erp-line:#26344a;--ex-line:#26344a;--ia-line:#26344a;--ic-line:#26344a;--il-line:#26344a;--im-line:#26344a;--lc-line:#26344a;--md-line:#26344a;--mda-line:#26344a;--mt-line:#26344a;--mta-line:#26344a;--pay-line:#26344a;--pi-line:#26344a;--pr-line:#26344a;--ptf-line:#26344a;--ptx-line:#26344a;--pur-line:#26344a;--qt-line:#26344a;--rpt-line:#26344a;--sm-line:#26344a;--sp-line:#26344a;--stk-line:#26344a;--sv-line:#26344a;--tx-line:#26344a;--ulx-line:#26344a;--unf-line:#26344a;--vr-line:#26344a;--wh-line:#26344a;
  --dbc-border:#26344a;--erp-border:#26344a;--sales-border:#26344a;--smtp-border:#26344a;
  --aa-card:#111a2b;--al-card:#111a2b;--br-card:#111a2b;--cc-card:#111a2b;--ct-card:#111a2b;--ex-card:#111a2b;--ia-card:#111a2b;--ic-card:#111a2b;--im-card:#111a2b;--md-card:#111a2b;--mda-card:#111a2b;--mt-card:#111a2b;--mta-card:#111a2b;--pay-card:#111a2b;--pi-card:#111a2b;--pr-card:#111a2b;--ptx-card:#111a2b;--pur-card:#111a2b;--sales-card:#111a2b;--sv-card:#111a2b;--ulx-card:#111a2b;--vr-card:#111a2b;--dc-panel:#111a2b;--cl-surface:#111a2b;--erp-surface:#111a2b;
  --cl-soft:#0d1626;--cpx-soft:#0d1626;--crx-soft:#0d1626;--erp-soft:#0d1626;--erp-surface-soft:#0d1626;--ptx-soft:#0d1626;--rpt-soft:#0d1626;--sm-soft:#0d1626;--smtp-soft:#0d1626;--stk-soft:#0d1626;--ulx-soft:#0d1626;--wh-soft:#0d1626;--dc-bg:#09111e;--sales-bg:#09111e;--sales-soft-bg:#0d1626;--tx-bg:#09111e;
  --aa-shadow:0 12px 30px rgba(0,0,0,.32);--al-shadow:0 12px 30px rgba(0,0,0,.32);--br-shadow:0 12px 30px rgba(0,0,0,.32);--cc-shadow:0 12px 30px rgba(0,0,0,.32);--cl-shadow:0 12px 30px rgba(0,0,0,.32);--ct-shadow:0 12px 30px rgba(0,0,0,.32);--db-shadow:0 12px 30px rgba(0,0,0,.32);--dc-card-shadow:0 12px 30px rgba(0,0,0,.32);--dc-shadow:0 12px 30px rgba(0,0,0,.32);--erp-shadow:0 12px 30px rgba(0,0,0,.32);--ex-shadow:0 12px 30px rgba(0,0,0,.32);--ia-shadow:0 12px 30px rgba(0,0,0,.32);--ic-shadow:0 12px 30px rgba(0,0,0,.32);--il-shadow:0 12px 30px rgba(0,0,0,.32);--im-shadow:0 12px 30px rgba(0,0,0,.32);--md-shadow:0 12px 30px rgba(0,0,0,.32);--mda-shadow:0 12px 30px rgba(0,0,0,.32);--mt-shadow:0 12px 30px rgba(0,0,0,.32);--mta-shadow:0 12px 30px rgba(0,0,0,.32);--pay-shadow:0 12px 30px rgba(0,0,0,.32);--pi-shadow:0 12px 30px rgba(0,0,0,.32);--pr-shadow:0 12px 30px rgba(0,0,0,.32);--pur-shadow:0 12px 30px rgba(0,0,0,.32);--qt-shadow:0 12px 30px rgba(0,0,0,.32);--rpt-shadow:0 12px 30px rgba(0,0,0,.32);--sales-shadow:0 12px 30px rgba(0,0,0,.32);--sm-shadow:0 12px 30px rgba(0,0,0,.32);--stk-shadow:0 12px 30px rgba(0,0,0,.32);--sv-shadow:0 12px 30px rgba(0,0,0,.32);--vr-shadow:0 12px 30px rgba(0,0,0,.32);--wh-shadow:0 12px 30px rgba(0,0,0,.32);
}

/* Compact application shell */
body.hold-transition.sidebar-mini{font-size:13px;background:var(--erp-ui-page)!important;color:var(--erp-ui-text)!important;}
.main-header.erp-compact-header{height:var(--erp-shell-header)!important;max-height:var(--erp-shell-header)!important;}
.main-header.erp-compact-header .logo{width:var(--erp-shell-sidebar)!important;height:var(--erp-shell-header)!important;line-height:var(--erp-shell-header)!important;padding:0 12px!important;font-size:15px!important;background:linear-gradient(135deg,#071326,#211255)!important;}
.main-header.erp-compact-header .navbar{height:var(--erp-shell-header)!important;min-height:var(--erp-shell-header)!important;margin-left:var(--erp-shell-sidebar)!important;background:var(--erp-ui-header-gradient)!important;box-shadow:0 8px 22px rgba(7,17,38,.18)!important;}
.main-header.erp-compact-header .sidebar-toggle{width:42px!important;height:42px!important;}
.main-header.erp-compact-header .sidebar-toggle:before{width:28px!important;height:28px!important;border-radius:9px!important;font-size:12px!important;color:#dce8ff!important;background:rgba(255,255,255,.09)!important;border-color:rgba(255,255,255,.1)!important;}
.main-header.erp-compact-header .sidebar-toggle:hover:before{background:rgba(255,255,255,.18)!important;transform:translate(-50%,-50%) rotate(90deg)!important;box-shadow:none!important;}
.main-header.erp-compact-header .navbar-custom-menu{height:42px!important;float:right!important;margin-right:8px!important;}
.main-header.erp-compact-header .navbar-nav{margin:0!important;display:flex!important;align-items:center!important;height:42px!important;gap:6px!important;}
.main-header.erp-compact-header .navbar-nav>li>a.erp-header-chip,
.main-header.erp-compact-header .navbar-nav>li>a.erp-mode-toggle{display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;height:30px!important;min-height:30px!important;margin:6px 0!important;padding:0 10px!important;border:1px solid rgba(255,255,255,.15)!important;border-radius:10px!important;color:#fff!important;background:rgba(255,255,255,.09)!important;box-shadow:none!important;font-size:11px!important;font-weight:800!important;line-height:1!important;}
.main-header.erp-compact-header .navbar-nav>li>a.erp-header-chip:hover,
.main-header.erp-compact-header .navbar-nav>li>a.erp-mode-toggle:hover{background:rgba(255,255,255,.16)!important;transform:none!important;}
.erp-header-chip .erp-chip-arrow{font-size:9px!important;opacity:.72;}
.erp-mode-toggle .erp-mode-label{min-width:28px;text-align:left;}
.erp-language-menu{top:38px!important;right:0!important;width:224px!important;min-width:224px!important;max-height:430px!important;padding:6px!important;border:1px solid var(--erp-ui-line)!important;border-radius:12px!important;background:var(--erp-ui-card)!important;box-shadow:var(--erp-ui-shadow-hover)!important;}
.erp-language-menu .menu{max-height:390px!important;overflow:auto!important;}
.erp-language-menu .menu>li>a{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:38px!important;padding:7px 9px!important;border-radius:9px!important;color:var(--erp-ui-text)!important;}
.erp-language-menu .menu>li>a:hover,.erp-language-menu .erp-language-active{background:rgba(15,167,157,.1)!important;color:var(--erp-ui-primary)!important;}
.erp-language-menu .menu>li>a strong{display:block;font-size:11px!important;line-height:1.2;}
.erp-language-menu .erp-language-native{display:block;margin-top:2px;color:var(--erp-ui-muted)!important;font-size:9.5px!important;}

.main-sidebar.erp-modern-sidebar{top:var(--erp-shell-header)!important;width:var(--erp-shell-sidebar)!important;padding-top:0!important;}
.main-sidebar.erp-modern-sidebar>.sidebar{height:calc(100vh - var(--erp-shell-header))!important;padding:6px 7px 7px!important;overflow-x:hidden!important;overflow-y:auto!important;}
.erp-sidebar-profile{min-height:46px!important;margin:0 1px 5px!important;padding:6px 7px!important;border-radius:12px!important;gap:8px!important;}
.erp-sidebar-avatar{flex-basis:32px!important;width:32px!important;height:32px!important;border-radius:10px!important;}
.erp-sidebar-avatar img{border-radius:8px!important;border-width:1px!important;}
.erp-sidebar-avatar .erp-online-dot{width:9px!important;height:9px!important;}
.erp-sidebar-user span{display:none!important;}
.erp-sidebar-user strong{max-width:145px!important;font-size:11.5px!important;}
.erp-sidebar-user small{margin-top:3px!important;font-size:8.5px!important;}
.erp-sidebar-label{height:15px!important;margin:0 7px 3px!important;font-size:7.5px!important;letter-spacing:1.1px!important;}
.erp-modern-sidebar .sidebar-menu{padding:0 0 4px!important;}
.erp-modern-sidebar .sidebar-menu>li{margin:1px 0!important;}
.erp-modern-sidebar .sidebar-menu>li>a{min-height:34px!important;height:34px!important;padding:4px 7px!important;border-radius:10px!important;font-size:11.5px!important;font-weight:700!important;}
.erp-modern-sidebar .sidebar-menu>li>a>i:first-child{flex-basis:24px!important;width:24px!important;height:24px!important;margin-right:8px!important;border-radius:8px!important;font-size:11px!important;box-shadow:0 5px 11px rgba(79,70,229,.22)!important;}
.erp-modern-sidebar .pull-right-container{right:7px!important;}
.erp-modern-sidebar .sidebar-menu>li>.treeview-menu{margin:2px 1px 3px 12px!important;padding:2px 0 2px 10px!important;}
.erp-modern-sidebar .treeview-menu>li{margin:1px 0!important;}
.erp-modern-sidebar .treeview-menu>li>a{min-height:28px!important;height:28px!important;padding:3px 7px!important;border-radius:8px!important;font-size:10.5px!important;}
.erp-modern-sidebar .treeview-menu>li>a>i:first-child{flex-basis:17px!important;width:17px!important;height:17px!important;margin-right:5px!important;font-size:7px!important;}
.erp-sidebar-footer{min-height:32px!important;margin:4px 1px 0!important;padding:4px!important;border-radius:10px!important;gap:4px!important;}
.erp-sidebar-footer .erp-side-utility{width:27px!important;height:27px!important;padding:0!important;justify-content:center!important;border-radius:8px!important;}
.erp-sidebar-footer .erp-side-utility span,.erp-sidebar-footer .erp-system-status span:not(.erp-system-dot){display:none!important;}
.erp-sidebar-footer .erp-system-status{margin:auto!important;}

@media(min-width:768px){
  .main-header.erp-compact-header .logo,.main-sidebar.erp-modern-sidebar,.left-side{width:var(--erp-shell-sidebar)!important;}
  .main-header.erp-compact-header .navbar,.content-wrapper,.right-side,.main-footer{margin-left:var(--erp-shell-sidebar)!important;}
  .sidebar-mini.sidebar-collapse .main-header.erp-compact-header .logo,.sidebar-mini.sidebar-collapse .main-sidebar.erp-modern-sidebar,.sidebar-mini.sidebar-collapse .left-side{width:var(--erp-shell-sidebar-mini)!important;}
  .sidebar-mini.sidebar-collapse .main-header.erp-compact-header .navbar,.sidebar-mini.sidebar-collapse .content-wrapper,.sidebar-mini.sidebar-collapse .right-side,.sidebar-mini.sidebar-collapse .main-footer{margin-left:var(--erp-shell-sidebar-mini)!important;}
  .sidebar-mini.sidebar-collapse .erp-modern-sidebar>.sidebar{padding:4px!important;}
  .sidebar-mini.sidebar-collapse .erp-modern-sidebar .sidebar-menu>li>a{height:34px!important;min-height:34px!important;padding:5px 7px!important;}
  .sidebar-mini.sidebar-collapse .erp-modern-sidebar .sidebar-menu>li>a>i:first-child{width:24px!important;height:24px!important;}
}

/* Unified page geometry */
.content-wrapper,.right-side{min-height:calc(100vh - var(--erp-shell-header))!important;background:var(--erp-ui-page)!important;}
.content-header{margin:0!important;padding:12px 16px 7px!important;background:transparent!important;box-shadow:none!important;border:0!important;border-radius:0!important;}
.content-header>h1{margin:0!important;font-size:21px!important;font-weight:850!important;color:var(--erp-ui-text)!important;}
.content{padding:8px 14px 18px!important;}
.main-footer{min-height:40px!important;padding:11px 16px!important;border:0!important;background:var(--erp-ui-card)!important;color:var(--erp-ui-muted)!important;box-shadow:0 -5px 18px rgba(15,23,42,.05)!important;}

/* One card language for all modules */
body .content-wrapper .box,
body .content-wrapper .nav-tabs-custom,
body .content-wrapper .panel,
body .content-wrapper .well,
body .content-wrapper .modal-content,
body .content-wrapper .table-responsive,
body .content-wrapper [class$="-card"]:not(i):not(.btn):not(.label):not(.badge),
body .content-wrapper [class*="-card "]:not(i):not(.btn):not(.label):not(.badge),
body .content-wrapper [class$="-panel"]:not(i):not(.btn),
body .content-wrapper [class*="-panel "]:not(i):not(.btn),
body .content-wrapper [class$="-shell"]:not(i):not(.btn),
body .content-wrapper [class*="-shell "]:not(i):not(.btn){border-color:var(--erp-ui-line)!important;border-radius:var(--erp-ui-radius)!important;background-color:var(--erp-ui-card)!important;box-shadow:var(--erp-ui-shadow)!important;}
body .content-wrapper .box{border:1px solid var(--erp-ui-line)!important;border-top:0!important;overflow:hidden!important;}
body .content-wrapper .box:before,
body .content-wrapper [class$="-card"]:not(i):before,
body .content-wrapper [class*="-card "]:not(i):before{background:var(--erp-ui-topline)!important;background-size:100% 100%!important;animation:none!important;}
body .content-wrapper .box-header,
body .content-wrapper .box-footer,
body .content-wrapper .panel-heading,
body .content-wrapper .modal-header,
body .content-wrapper .modal-footer{border-color:var(--erp-ui-line)!important;background:var(--erp-ui-card)!important;}
body .content-wrapper .box-header{padding:10px 13px!important;}
body .content-wrapper .box-body{padding:12px 13px!important;background:var(--erp-ui-card)!important;color:var(--erp-ui-text)!important;}
body .content-wrapper .box-title,body .content-wrapper .modal-title,body .content-wrapper .panel-title{font-size:13px!important;font-weight:850!important;color:var(--erp-ui-text)!important;}

/* Dashboard compaction and theme correction */
body.dashboard-modern-page .content-header{margin:0!important;padding:12px 16px 7px!important;border:0!important;background:transparent!important;box-shadow:none!important;}
body.dashboard-modern-page .content-header h1{font-size:21px!important;color:var(--erp-ui-text)!important;}
body.dashboard-modern-page .content{padding:8px 14px 16px!important;}
.db-toolbar-card{min-height:62px!important;margin:0 0 9px!important;padding:10px 13px!important;border:1px solid var(--erp-ui-line)!important;border-radius:14px!important;background:var(--erp-ui-card)!important;box-shadow:var(--erp-ui-shadow)!important;}
.db-toolbar-card:before,.db-metric-card:before,.dashboard-modern-page .box:before{height:3px!important;background:var(--erp-ui-topline)!important;animation:none!important;}
.db-toolbar-left h3{margin:2px 0!important;font-size:15px!important;color:var(--erp-ui-text)!important;}
.db-toolbar-left p{font-size:10px!important;color:var(--erp-ui-muted)!important;}
.db-kicker{padding:3px 8px!important;font-size:8.5px!important;background:rgba(15,167,157,.1)!important;color:var(--erp-ui-primary)!important;}
.db-period-buttons{gap:5px!important;}
.db-period-buttons .btn{min-height:29px!important;height:29px!important;padding:5px 9px!important;border-radius:9px!important;font-size:9px!important;animation:none!important;background:var(--erp-ui-main-gradient)!important;}
.db-period-buttons .btn.active{background:var(--erp-ui-danger-gradient)!important;}
.db-metrics-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;margin-bottom:10px!important;}
.db-metric-card{min-height:72px!important;padding:10px 12px!important;border:1px solid var(--erp-ui-line)!important;border-radius:14px!important;background:var(--erp-ui-card)!important;box-shadow:var(--erp-ui-shadow)!important;gap:10px!important;}
.db-metric-card:hover{transform:translateY(-1px)!important;box-shadow:var(--erp-ui-shadow-hover)!important;}
.db-icon{flex-basis:42px!important;width:42px!important;height:42px!important;border-radius:13px!important;font-size:18px!important;animation:none!important;}
.db-metric-card small{margin-bottom:3px!important;font-size:8.5px!important;color:var(--erp-ui-muted)!important;}
.db-metric-card strong{font-size:19px!important;color:var(--erp-ui-text)!important;}
.dashboard-modern-page .box{border-radius:14px!important;background:var(--erp-ui-card)!important;box-shadow:var(--erp-ui-shadow)!important;}
.dashboard-modern-page .box-header{padding:9px 12px!important;background:var(--erp-ui-card)!important;border-color:var(--erp-ui-line)!important;}
.dashboard-modern-page .box-title{font-size:12px!important;color:var(--erp-ui-text)!important;}
.dashboard-modern-page .box-body{padding:10px 12px!important;background:var(--erp-ui-card)!important;}
.dashboard-modern-page .table-responsive{background:var(--erp-ui-card)!important;border-color:var(--erp-ui-line)!important;border-radius:10px!important;}
.dashboard-modern-page .chart{min-height:260px!important;height:260px!important;}
.dashboard-modern-page .chart canvas{max-height:260px!important;}

/* Global forms and tables */
body .content-wrapper .form-control,
body .content-wrapper .select2-container--default .select2-selection--single,
body .content-wrapper .select2-container--default .select2-selection--multiple,
body .content-wrapper textarea.form-control,
body .content-wrapper input[type="text"],
body .content-wrapper input[type="email"],
body .content-wrapper input[type="number"],
body .content-wrapper input[type="password"],
body .content-wrapper input[type="search"],
body .content-wrapper input[type="date"],
body .content-wrapper select{min-height:38px!important;height:auto;border:1px solid var(--erp-ui-line)!important;border-radius:10px!important;background:var(--erp-ui-card)!important;color:var(--erp-ui-text)!important;box-shadow:none!important;}
body .content-wrapper textarea.form-control{min-height:86px!important;}
body .content-wrapper .form-control:focus,
body .content-wrapper .select2-container--default.select2-container--focus .select2-selection--multiple,
body .content-wrapper .select2-container--default.select2-container--open .select2-selection--single{border-color:rgba(15,167,157,.72)!important;box-shadow:0 0 0 3px rgba(15,167,157,.11)!important;}
body .content-wrapper label,body .content-wrapper .control-label{color:var(--erp-ui-text)!important;font-size:11px!important;font-weight:750!important;}
body .content-wrapper .help-block,body .content-wrapper .text-muted{color:var(--erp-ui-muted)!important;}
body .content-wrapper .select2-container .select2-selection--single{height:38px!important;}
body .content-wrapper .select2-container .select2-selection--single .select2-selection__rendered{line-height:36px!important;color:var(--erp-ui-text)!important;}
body .content-wrapper .table{margin-bottom:0!important;background:transparent!important;color:var(--erp-ui-text)!important;}
body .content-wrapper .table>thead>tr>th{padding:9px 8px!important;border-color:var(--erp-ui-line)!important;background:rgba(15,167,157,.07)!important;color:var(--erp-ui-text)!important;font-size:9.5px!important;font-weight:850!important;}
body .content-wrapper .table>tbody>tr>td,body .content-wrapper .table>tfoot>tr>td{padding:8px!important;border-color:var(--erp-ui-line)!important;background:transparent!important;color:var(--erp-ui-text)!important;font-size:10.5px!important;}
body .content-wrapper .table-striped>tbody>tr:nth-of-type(odd),body .content-wrapper .table-hover>tbody>tr:hover{background:rgba(15,167,157,.045)!important;}

/* One button system across all pages */
body .btn,
body button.btn,
body a.btn,
body .dt-button,
body .dataTables_wrapper .dt-buttons .btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-height:36px!important;height:auto;padding:8px 14px!important;border:0!important;border-radius:10px!important;color:#fff!important;font-size:10.5px!important;font-weight:850!important;line-height:1.15!important;letter-spacing:.15px!important;box-shadow:0 8px 18px rgba(15,23,42,.13)!important;background:var(--erp-ui-secondary-gradient)!important;animation:none!important;transform:none;}
body .btn:hover,body .dt-button:hover{transform:translateY(-1px)!important;filter:saturate(1.05)!important;box-shadow:0 12px 24px rgba(15,23,42,.17)!important;}
body .btn:before,body .dt-button:before{display:none!important;}
body .btn-primary,body .btn-success,body .btn-info,body .bg-green,body .bg-teal,body .btn-modern-rgb,body .btn-modern-info,body .btn-grad-save,body .customer-save-btn,body .supplier-save-btn,body .erp-save-btn,body .dt-button{background:var(--erp-ui-main-gradient)!important;color:#fff!important;}
body .btn-default,body .btn-warning,body .bg-gray,body .btn-modern-soft,body .btn-grad-back,body .customer-back-btn,body .supplier-back-btn,body .erp-back-btn{background:var(--erp-ui-secondary-gradient)!important;color:#fff!important;}
body .btn-danger,body .bg-red,body .btn-grad-cancel,body .customer-cancel-btn,body .supplier-cancel-btn,body .erp-cancel-btn,body .delete_btn{background:var(--erp-ui-danger-gradient)!important;color:#fff!important;}
body .btn-xs,body .btn-group-xs>.btn{min-height:26px!important;padding:4px 8px!important;border-radius:8px!important;font-size:9px!important;}
body .btn-sm,body .btn-group-sm>.btn{min-height:30px!important;padding:6px 10px!important;border-radius:9px!important;font-size:9.5px!important;}
body .btn-lg,body .btn-group-lg>.btn{min-height:42px!important;padding:10px 17px!important;font-size:11.5px!important;}
body .btn-box-tool,body .input-group-btn>.btn,body .pagination>li>a,body .pagination>li>span{min-height:28px!important;padding:5px 9px!important;box-shadow:none!important;}
body .btn-box-tool{background:transparent!important;color:var(--erp-ui-muted)!important;}
body .btn-link{background:transparent!important;color:var(--erp-ui-primary)!important;box-shadow:none!important;}
.customer-form-actions,.supplier-form-actions,.erp-form-actions,.stock-footer-actions{display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;flex-wrap:wrap!important;}
.customer-form-actions .btn,.supplier-form-actions .btn,.erp-form-actions .btn,.stock-footer-actions .btn{min-width:126px!important;}

/* Dark mode: complete shell and page-specific override */
html[data-erp-theme="dark"] body,
html[data-erp-theme="dark"] body.hold-transition.sidebar-mini,
html[data-erp-theme="dark"] .content-wrapper,
html[data-erp-theme="dark"] .right-side{background:var(--erp-ui-page)!important;color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] .content-wrapper:before,
html[data-erp-theme="dark"] .content-wrapper:after{opacity:.25!important;}
html[data-erp-theme="dark"] body .content-wrapper .box,
html[data-erp-theme="dark"] body .content-wrapper .box-header,
html[data-erp-theme="dark"] body .content-wrapper .box-body,
html[data-erp-theme="dark"] body .content-wrapper .box-footer,
html[data-erp-theme="dark"] body .content-wrapper .nav-tabs-custom,
html[data-erp-theme="dark"] body .content-wrapper .panel,
html[data-erp-theme="dark"] body .content-wrapper .panel-heading,
html[data-erp-theme="dark"] body .content-wrapper .well,
html[data-erp-theme="dark"] body .content-wrapper .modal-content,
html[data-erp-theme="dark"] body .content-wrapper .modal-header,
html[data-erp-theme="dark"] body .content-wrapper .modal-body,
html[data-erp-theme="dark"] body .content-wrapper .modal-footer,
html[data-erp-theme="dark"] body .content-wrapper .table-responsive,
html[data-erp-theme="dark"] body .content-wrapper [class$="-card"]:not(i):not(.btn):not(.label):not(.badge),
html[data-erp-theme="dark"] body .content-wrapper [class*="-card "]:not(i):not(.btn):not(.label):not(.badge),
html[data-erp-theme="dark"] body .content-wrapper [class$="-panel"]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class*="-panel "]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class$="-shell"]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class*="-shell "]:not(i):not(.btn),
html[data-erp-theme="dark"] .db-toolbar-card,
html[data-erp-theme="dark"] .db-metric-card,
html[data-erp-theme="dark"] .dashboard-modern-page .box,
html[data-erp-theme="dark"] .dashboard-modern-page .box-header,
html[data-erp-theme="dark"] .dashboard-modern-page .box-body,
html[data-erp-theme="dark"] .dashboard-modern-page .table-responsive{background:var(--erp-ui-card)!important;background-color:var(--erp-ui-card)!important;border-color:var(--erp-ui-line)!important;color:var(--erp-ui-text)!important;box-shadow:var(--erp-ui-shadow)!important;}
html[data-erp-theme="dark"] body .content-wrapper h1,
html[data-erp-theme="dark"] body .content-wrapper h2,
html[data-erp-theme="dark"] body .content-wrapper h3,
html[data-erp-theme="dark"] body .content-wrapper h4,
html[data-erp-theme="dark"] body .content-wrapper h5,
html[data-erp-theme="dark"] body .content-wrapper h6,
html[data-erp-theme="dark"] body .content-wrapper p,
html[data-erp-theme="dark"] body .content-wrapper span:not(.label):not(.badge),
html[data-erp-theme="dark"] body .content-wrapper strong,
html[data-erp-theme="dark"] body .content-wrapper td,
html[data-erp-theme="dark"] body .content-wrapper th,
html[data-erp-theme="dark"] body .content-wrapper label,
html[data-erp-theme="dark"] body .content-wrapper .box-title,
html[data-erp-theme="dark"] body .content-wrapper .modal-title,
html[data-erp-theme="dark"] .db-toolbar-left h3,
html[data-erp-theme="dark"] .db-metric-card strong{color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] body .content-wrapper small,
html[data-erp-theme="dark"] body .content-wrapper .text-muted,
html[data-erp-theme="dark"] body .content-wrapper .help-block,
html[data-erp-theme="dark"] body .content-wrapper .breadcrumb,
html[data-erp-theme="dark"] .db-toolbar-left p,
html[data-erp-theme="dark"] .db-metric-card small{color:var(--erp-ui-muted)!important;}
html[data-erp-theme="dark"] body .content-wrapper .form-control,
html[data-erp-theme="dark"] body .content-wrapper input,
html[data-erp-theme="dark"] body .content-wrapper textarea,
html[data-erp-theme="dark"] body .content-wrapper select,
html[data-erp-theme="dark"] body .content-wrapper .select2-selection,
html[data-erp-theme="dark"] .select2-dropdown,
html[data-erp-theme="dark"] .dropdown-menu,
html[data-erp-theme="dark"] .datepicker,
html[data-erp-theme="dark"] .daterangepicker{background:var(--erp-ui-card)!important;background-color:var(--erp-ui-card)!important;border-color:var(--erp-ui-line)!important;color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] .select2-results__option,
html[data-erp-theme="dark"] .dropdown-menu>li>a,
html[data-erp-theme="dark"] .datepicker table tr td,
html[data-erp-theme="dark"] .datepicker table tr th,
html[data-erp-theme="dark"] .daterangepicker td,
html[data-erp-theme="dark"] .daterangepicker th{color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] .select2-results__option[aria-selected=true],
html[data-erp-theme="dark"] .select2-results__option--highlighted,
html[data-erp-theme="dark"] .dropdown-menu>li>a:hover{background:rgba(15,167,157,.13)!important;color:#fff!important;}
html[data-erp-theme="dark"] body .content-wrapper .table>thead>tr>th{background:rgba(53,209,194,.09)!important;color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] body .content-wrapper .table>tbody>tr>td,
html[data-erp-theme="dark"] body .content-wrapper .table>tfoot>tr>td{background:transparent!important;color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] body .content-wrapper .table-striped>tbody>tr:nth-of-type(odd),
html[data-erp-theme="dark"] body .content-wrapper .table-hover>tbody>tr:hover{background:rgba(53,209,194,.045)!important;}
html[data-erp-theme="dark"] .main-footer{background:var(--erp-ui-card)!important;color:var(--erp-ui-muted)!important;box-shadow:0 -5px 18px rgba(0,0,0,.2)!important;}
html[data-erp-theme="dark"] .pagination>li>a,
html[data-erp-theme="dark"] .pagination>li>span{background:var(--erp-ui-card)!important;border-color:var(--erp-ui-line)!important;color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] canvas{background:transparent!important;}

@media(max-width:1500px){.db-metrics-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;}}
@media(max-width:1180px){.db-metrics-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}}
@media(max-width:900px){.db-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:767px){
  :root{--erp-shell-header:42px;}
  .main-header.erp-compact-header .logo{width:100%!important;}
  .main-header.erp-compact-header .navbar{margin-left:0!important;}
  .main-header.erp-compact-header .navbar-custom-menu{position:absolute!important;right:4px!important;top:0!important;margin:0!important;}
  .main-header.erp-compact-header .navbar-nav>li>a.erp-header-chip,.main-header.erp-compact-header .navbar-nav>li>a.erp-mode-toggle{padding:0 8px!important;}
  .erp-header-chip .erp-chip-label,.erp-mode-toggle .erp-mode-label{display:none!important;}
  .content{padding:7px 9px 14px!important;}
  .content-header{padding:10px 10px 6px!important;}
  .db-toolbar-card{display:block!important;}
  .db-filter-actions{margin-top:8px!important;}
  .db-metrics-grid{grid-template-columns:1fr!important;}
}
@media(max-height:760px) and (min-width:768px){
  .erp-sidebar-profile{min-height:38px!important;padding:4px 6px!important;}
  .erp-sidebar-avatar{width:28px!important;height:28px!important;flex-basis:28px!important;}
  .erp-sidebar-label{display:none!important;}
  .erp-modern-sidebar .sidebar-menu>li>a{height:31px!important;min-height:31px!important;}
  .erp-modern-sidebar .sidebar-menu>li>a>i:first-child{width:22px!important;height:22px!important;flex-basis:22px!important;}
  .erp-sidebar-footer{display:none!important;}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important;}}

/* Dark-mode catch-up for legacy page-specific white surfaces. */
html[data-erp-theme="dark"] body .content-wrapper [class$="-field"]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class*="-field "]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class*="-filter-grid"]:not(i),
html[data-erp-theme="dark"] body .content-wrapper [class*="-filter-field"]:not(i),
html[data-erp-theme="dark"] body .content-wrapper [class*="-table-body"]:not(i),
html[data-erp-theme="dark"] body .content-wrapper [class*="-form-section"]:not(i),
html[data-erp-theme="dark"] body .content-wrapper [class*="-section-line"]:not(i),
html[data-erp-theme="dark"] body .content-wrapper [class*="-action-menu"]:not(i),
html[data-erp-theme="dark"] body .content-wrapper [class*="-filter-head"]:not(i),
html[data-erp-theme="dark"] body .content-wrapper [class*="-modal-body"]:not(i),
html[data-erp-theme="dark"] body .content-wrapper .invoice-col,
html[data-erp-theme="dark"] body .content-wrapper .input-group-addon,
html[data-erp-theme="dark"] body .content-wrapper .dataTables_wrapper input,
html[data-erp-theme="dark"] body .content-wrapper .dataTables_wrapper select{
  background:var(--erp-ui-card)!important;
  background-color:var(--erp-ui-card)!important;
  background-image:none!important;
  border-color:var(--erp-ui-line)!important;
  color:var(--erp-ui-text)!important;
  box-shadow:none!important;
}
html[data-erp-theme="dark"] body .content-wrapper a:not(.btn):not(.label):not(.badge){color:#8fd8ff!important;}
html[data-erp-theme="dark"] body .content-wrapper [class*="-action-link"],
html[data-erp-theme="dark"] body .content-wrapper [class*="-sheet-link"],
html[data-erp-theme="dark"] body .content-wrapper [class*="-chip"]:not(.label):not(.badge){background:var(--erp-ui-card-soft)!important;border-color:var(--erp-ui-line)!important;color:var(--erp-ui-text)!important;}

/* POS follows the same shell and controls without disturbing receipt printing. */
html[data-erp-theme="dark"] body.pos-page .box,
html[data-erp-theme="dark"] body.pos-page .item_box,
html[data-erp-theme="dark"] body.pos-page .modal-content,
html[data-erp-theme="dark"] body.pos-page .table-responsive,
html[data-erp-theme="dark"] body.pos-page .panel,
html[data-erp-theme="dark"] body.pos-page .input-group-addon{
  background:var(--erp-ui-card)!important;
  border-color:var(--erp-ui-line)!important;
  color:var(--erp-ui-text)!important;
}
html[data-erp-theme="dark"] body.pos-page .search_item,
html[data-erp-theme="dark"] body.pos-page .tot_qty,
html[data-erp-theme="dark"] body.pos-page .tot_amt,
html[data-erp-theme="dark"] body.pos-page .tot_disc,
html[data-erp-theme="dark"] body.pos-page .tot_grand{color:var(--erp-ui-text)!important;}

/* Authentication pages inherit the same palette when the saved mode is dark. */
html[data-erp-theme="dark"] body.login-page,
html[data-erp-theme="dark"] body.erp-modern-login,
html[data-erp-theme="dark"] body.change-pass-page{background:#09111e!important;color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] .erp-login-card,
html[data-erp-theme="dark"] .login-box-body,
html[data-erp-theme="dark"] .register-box-body,
html[data-erp-theme="dark"] .change-pass-card,
html[data-erp-theme="dark"] .erp-demo-box{background:var(--erp-ui-card)!important;border-color:var(--erp-ui-line)!important;color:var(--erp-ui-text)!important;box-shadow:var(--erp-ui-shadow-hover)!important;}
html[data-erp-theme="dark"] .erp-login-card h1,
html[data-erp-theme="dark"] .erp-login-card h2,
html[data-erp-theme="dark"] .erp-login-card h3,
html[data-erp-theme="dark"] .erp-login-card label,
html[data-erp-theme="dark"] .login-box-body,
html[data-erp-theme="dark"] .register-box-body{color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] .erp-login-card input,
html[data-erp-theme="dark"] .login-box-body input,
html[data-erp-theme="dark"] .register-box-body input{background:var(--erp-ui-card-soft)!important;border-color:var(--erp-ui-line)!important;color:var(--erp-ui-text)!important;}

html[data-erp-theme="dark"]{
  --aa-dark:#e6edf7;--al-dark:#e6edf7;--br-dark:#e6edf7;--cc-dark:#e6edf7;--ct-dark:#e6edf7;--erp-dark:#e6edf7;--ex-dark:#e6edf7;--ia-dark:#e6edf7;--ic-dark:#e6edf7;--il-dark:#e6edf7;--im-dark:#e6edf7;--lc-dark:#e6edf7;--md-dark:#e6edf7;--mda-dark:#e6edf7;--mt-dark:#e6edf7;--mta-dark:#e6edf7;--pi-dark:#e6edf7;--pr-dark:#e6edf7;--pur-dark:#e6edf7;--qt-dark:#e6edf7;--smtp-dark:#e6edf7;--sv-dark:#e6edf7;--tx-dark:#e6edf7;--vr-dark:#e6edf7;
}
html[data-erp-theme="dark"] body .content-wrapper [class$="-head"]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class*="-head "]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class$="-body"]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class*="-body "]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class$="-footer"]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class*="-footer "]:not(i):not(.btn),
html[data-erp-theme="dark"] body .content-wrapper [class*="-footer-in"]:not(i),
html[data-erp-theme="dark"] body .content-wrapper [class*="-form-actions"]:not(i),
html[data-erp-theme="dark"] body .content-wrapper [class*="profilebar"]:not(i){
  background:var(--erp-ui-card)!important;
  background-color:var(--erp-ui-card)!important;
  background-image:none!important;
  border-color:var(--erp-ui-line)!important;
  color:var(--erp-ui-text)!important;
}

/* Module hero areas keep their layout but use one shared brand gradient. */
body .content-wrapper [class$="-hero"]:not(i):not(.btn),
body .content-wrapper [class*="-hero "]:not(i):not(.btn){
  background:var(--erp-ui-header-gradient)!important;
  background-image:var(--erp-ui-header-gradient)!important;
  border-color:rgba(255,255,255,.10)!important;
  box-shadow:0 10px 26px rgba(7,17,38,.18)!important;
  animation:none!important;
}

/* RTL keeps the compact shell mirrored correctly after the final override. */
html[dir="rtl"] body{text-align:right;}
html[dir="rtl"] .main-header.erp-compact-header .logo{float:right!important;}
html[dir="rtl"] .main-header.erp-compact-header .navbar{margin-right:var(--erp-shell-sidebar)!important;margin-left:0!important;}
html[dir="rtl"] .main-header.erp-compact-header .sidebar-toggle{float:right!important;}
html[dir="rtl"] .main-header.erp-compact-header .navbar-custom-menu{float:left!important;margin-left:8px!important;margin-right:0!important;}
html[dir="rtl"] .main-sidebar.erp-modern-sidebar{right:0!important;left:auto!important;}
html[dir="rtl"] .content-wrapper,
html[dir="rtl"] .right-side,
html[dir="rtl"] .main-footer{margin-right:var(--erp-shell-sidebar)!important;margin-left:0!important;}
html[dir="rtl"] .erp-modern-sidebar .sidebar-menu>li>a>i:first-child{margin-left:8px!important;margin-right:0!important;}
html[dir="rtl"] .erp-modern-sidebar .pull-right-container{left:7px!important;right:auto!important;}
html[dir="rtl"] .erp-modern-sidebar .sidebar-menu>li>.treeview-menu{margin-right:12px!important;margin-left:1px!important;padding-right:10px!important;padding-left:0!important;border-right:1px dashed rgba(129,140,248,.32)!important;border-left:0!important;}
html[dir="rtl"] .erp-language-menu{left:0!important;right:auto!important;}
@media(min-width:768px){
  html[dir="rtl"] .sidebar-mini.sidebar-collapse .main-header.erp-compact-header .navbar,
  html[dir="rtl"] .sidebar-mini.sidebar-collapse .content-wrapper,
  html[dir="rtl"] .sidebar-mini.sidebar-collapse .right-side,
  html[dir="rtl"] .sidebar-mini.sidebar-collapse .main-footer{margin-right:var(--erp-shell-sidebar-mini)!important;margin-left:0!important;}
}
@media(max-width:767px){
  html[dir="rtl"] .main-header.erp-compact-header .navbar{margin:0!important;}
  html[dir="rtl"] .main-header.erp-compact-header .navbar-custom-menu{left:4px!important;right:auto!important;}
  html[dir="rtl"] .content-wrapper,html[dir="rtl"] .right-side,html[dir="rtl"] .main-footer{margin:0!important;}
}

/* Legacy custom action controls that were not using Bootstrap's .btn class. */
body button[class$="-btn"],body a[class$="-btn"],
body button[class*="-btn "],body a[class*="-btn "]{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
  min-height:36px!important;padding:8px 14px!important;border:0!important;border-radius:10px!important;
  background:var(--erp-ui-secondary-gradient)!important;color:#fff!important;font-size:10.5px!important;
  font-weight:850!important;line-height:1.15!important;box-shadow:0 8px 18px rgba(15,23,42,.13)!important;
  animation:none!important;text-decoration:none!important;
}
body button[class*="save"],body a[class*="save"],body button[class*="submit"],body a[class*="submit"],body button[class*="update"],body a[class*="update"]{background:var(--erp-ui-main-gradient)!important;color:#fff!important;}
body button[class*="cancel"],body a[class*="cancel"],body button[class*="delete"],body a[class*="delete"],body button[class*="btn-close"],body a[class*="btn-close"]{background:var(--erp-ui-danger-gradient)!important;color:#fff!important;}
body button[class*="back"],body a[class*="back"]{background:var(--erp-ui-secondary-gradient)!important;color:#fff!important;}
body .content-wrapper [class*="-footer"] .btn,
body .content-wrapper [class*="-footer"] button[class*="-btn"],
body .content-wrapper [class*="-form-actions"] .btn,
body .content-wrapper [class*="-form-actions"] button[class*="-btn"]{min-width:126px!important;}
body .modal-footer .btn,body .modal-footer button[class*="-btn"]{min-width:92px!important;}
.main-header.erp-compact-header .logo .logo-lg{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:13px!important;}

/* Pages that intentionally use a viewport-height editor now use the compact header height. */
@media(min-width:1200px) and (min-height:700px){
  body.customer-entry-page .content-wrapper,
  body.supplier-entry-page .content-wrapper,
  body.import-entry-page .content-wrapper,
  .site-settings-modern.content-wrapper,
  .smtp-modern.content-wrapper,
  .modern-profile-wrapper.content-wrapper{height:calc(100vh - var(--erp-shell-header))!important;min-height:calc(100vh - var(--erp-shell-header))!important;}
}
@media(max-width:767px){
  html[dir="rtl"] .main-sidebar.erp-modern-sidebar{transform:translate(110%,0)!important;}
  html[dir="rtl"] .sidebar-open .main-sidebar.erp-modern-sidebar{transform:translate(0,0)!important;}
}

/* ========================================================================
   V3 PRODUCTION POLISH — final visual consistency, density and accessibility
   ======================================================================== */
:root{
  --erp-shell-header:40px;
  --erp-shell-sidebar:212px;
  --erp-shell-sidebar-mini:52px;
  --erp-ui-radius:12px;
  --erp-ui-radius-sm:9px;
  --erp-control-height:36px;
  --erp-control-height-sm:30px;
  --erp-control-height-lg:40px;
  --erp-page-gutter:12px;
  --erp-ui-main-gradient:linear-gradient(135deg,#15966e 0%,#4eb4d1 100%);
  --erp-ui-secondary-gradient:linear-gradient(135deg,#2c526f 0%,#514b8d 100%);
  --erp-ui-danger-gradient:linear-gradient(135deg,#b90b78 0%,#760058 100%);
  --erp-ui-utility-gradient:linear-gradient(135deg,#28718b 0%,#4f69a4 100%);
  --erp-ui-warning-gradient:linear-gradient(135deg,#db8a20 0%,#c45835 100%);
  --erp-ui-topline:linear-gradient(90deg,#0fa79d,#55b8d4,#7868dd);
}

/* Base typography and predictable sizing */
html{font-size:13px;background:var(--erp-ui-page);}
*,*:before,*:after{box-sizing:border-box;}
body.hold-transition.sidebar-mini{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif!important;
  font-size:12.5px!important;
  line-height:1.45!important;
  overflow-x:hidden!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body.erp-final-ready .wrapper{min-height:100vh!important;background:var(--erp-ui-page)!important;}
::selection{background:rgba(15,167,157,.24);color:inherit;}

/* Header: exactly one compact utility strip */
.main-header.erp-compact-header,
.main-header.erp-compact-header .navbar,
.main-header.erp-compact-header .logo{height:var(--erp-shell-header)!important;min-height:var(--erp-shell-header)!important;max-height:var(--erp-shell-header)!important;}
.main-header.erp-compact-header .logo{
  width:var(--erp-shell-sidebar)!important;
  line-height:var(--erp-shell-header)!important;
  padding:0 11px!important;
  font-size:14px!important;
  letter-spacing:.1px!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}
.main-header.erp-compact-header .navbar{
  margin-left:var(--erp-shell-sidebar)!important;
  border:0!important;
  box-shadow:0 5px 16px rgba(7,17,38,.17)!important;
}
.main-header.erp-compact-header .sidebar-toggle{width:40px!important;height:40px!important;padding:0!important;}
.main-header.erp-compact-header .sidebar-toggle:before{width:26px!important;height:26px!important;border-radius:8px!important;}
.main-header.erp-compact-header .navbar-custom-menu,
.main-header.erp-compact-header .navbar-nav{height:40px!important;min-height:40px!important;}
.main-header.erp-compact-header .navbar-custom-menu{margin-right:7px!important;}
.main-header.erp-compact-header .navbar-nav{gap:5px!important;}
.main-header.erp-compact-header .navbar-nav>li>a.erp-header-chip,
.main-header.erp-compact-header .navbar-nav>li>a.erp-mode-toggle{
  height:28px!important;
  min-height:28px!important;
  margin:6px 0!important;
  padding:0 9px!important;
  border-radius:9px!important;
  font-size:10.5px!important;
  letter-spacing:.1px!important;
}
.main-header.erp-compact-header .navbar-nav>li>a.erp-header-chip i,
.main-header.erp-compact-header .navbar-nav>li>a.erp-mode-toggle i{font-size:11px!important;}
.erp-language-menu{top:35px!important;width:216px!important;min-width:216px!important;padding:5px!important;border-radius:11px!important;}
.erp-language-menu .menu{max-height:min(390px,calc(100vh - 58px))!important;}
.erp-language-menu .menu>li>a{min-height:35px!important;padding:6px 8px!important;border-radius:8px!important;}
.erp-language-menu .menu>li>a strong{font-size:10.5px!important;}
.erp-language-menu .erp-language-native{font-size:9px!important;}

/* Sidebar: compact enough for ordinary laptop screens without page scrolling */
.main-sidebar.erp-modern-sidebar{
  top:var(--erp-shell-header)!important;
  width:var(--erp-shell-sidebar)!important;
  min-height:calc(100vh - var(--erp-shell-header))!important;
}
.main-sidebar.erp-modern-sidebar>.sidebar{
  height:calc(100vh - var(--erp-shell-header))!important;
  padding:5px 6px 6px!important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
.erp-sidebar-profile{min-height:42px!important;margin:0 1px 4px!important;padding:5px 6px!important;border-radius:10px!important;gap:7px!important;}
.erp-sidebar-avatar{flex-basis:29px!important;width:29px!important;height:29px!important;border-radius:9px!important;}
.erp-sidebar-avatar img{border-radius:7px!important;}
.erp-sidebar-user span{margin-bottom:1px!important;font-size:7.5px!important;letter-spacing:.55px!important;}
.erp-sidebar-user strong{max-width:145px!important;font-size:10.5px!important;}
.erp-sidebar-user small{margin-top:2px!important;font-size:8px!important;}
.erp-sidebar-label{height:17px!important;margin:0 5px 2px!important;font-size:7.5px!important;letter-spacing:1px!important;}
.erp-modern-sidebar .sidebar-menu>li{margin:0!important;}
.erp-modern-sidebar .sidebar-menu>li>a{
  height:31px!important;
  min-height:31px!important;
  padding:3px 6px!important;
  border-radius:8px!important;
  font-size:10.5px!important;
  font-weight:700!important;
}
.erp-modern-sidebar .sidebar-menu>li>a>i:first-child{
  flex-basis:22px!important;
  width:22px!important;
  height:22px!important;
  margin-right:7px!important;
  border-radius:7px!important;
  font-size:10px!important;
  box-shadow:0 4px 9px rgba(79,70,229,.19)!important;
}
.erp-modern-sidebar .sidebar-menu>li>a .pull-right-container{right:6px!important;top:50%!important;transform:translateY(-50%)!important;}
.erp-modern-sidebar .sidebar-menu>li>.treeview-menu{margin:1px 1px 2px 11px!important;padding:1px 0 1px 8px!important;}
.erp-modern-sidebar .treeview-menu>li>a{
  height:25px!important;
  min-height:25px!important;
  padding:2px 6px!important;
  border-radius:7px!important;
  font-size:9.5px!important;
}
.erp-modern-sidebar .treeview-menu>li>a>i:first-child{flex-basis:15px!important;width:15px!important;height:15px!important;margin-right:4px!important;}
.erp-sidebar-footer{min-height:29px!important;margin:3px 1px 0!important;padding:3px!important;border-radius:9px!important;}
.erp-sidebar-footer .erp-side-utility{width:24px!important;height:24px!important;border-radius:7px!important;font-size:10px!important;}
.erp-sidebar-footer .erp-system-dot{width:8px!important;height:8px!important;}

@media(min-width:768px){
  .main-header.erp-compact-header .logo,.main-sidebar.erp-modern-sidebar,.left-side{width:var(--erp-shell-sidebar)!important;}
  .main-header.erp-compact-header .navbar,.content-wrapper,.right-side,.main-footer{margin-left:var(--erp-shell-sidebar)!important;}
  .sidebar-mini.sidebar-collapse .main-header.erp-compact-header .logo,.sidebar-mini.sidebar-collapse .main-sidebar.erp-modern-sidebar,.sidebar-mini.sidebar-collapse .left-side{width:var(--erp-shell-sidebar-mini)!important;}
  .sidebar-mini.sidebar-collapse .main-header.erp-compact-header .navbar,.sidebar-mini.sidebar-collapse .content-wrapper,.sidebar-mini.sidebar-collapse .right-side,.sidebar-mini.sidebar-collapse .main-footer{margin-left:var(--erp-shell-sidebar-mini)!important;}
  .sidebar-mini.sidebar-collapse .erp-modern-sidebar .sidebar-menu>li>a{height:31px!important;min-height:31px!important;}
}

/* Adaptive density prevents sidebar overflow on shorter screens */
@media(max-height:840px) and (min-width:768px){
  .erp-sidebar-profile{min-height:36px!important;padding:4px 5px!important;}
  .erp-sidebar-avatar{flex-basis:25px!important;width:25px!important;height:25px!important;}
  .erp-sidebar-user span,.erp-sidebar-user small{display:none!important;}
  .erp-sidebar-user strong{font-size:9.5px!important;}
  .erp-sidebar-label{display:none!important;}
  .erp-modern-sidebar .sidebar-menu>li>a{height:29px!important;min-height:29px!important;}
  .erp-modern-sidebar .sidebar-menu>li>a>i:first-child{width:21px!important;height:21px!important;flex-basis:21px!important;}
  .erp-sidebar-footer{display:none!important;}
}
@media(max-height:690px) and (min-width:768px){
  .erp-sidebar-profile{display:none!important;}
  .erp-modern-sidebar .sidebar-menu>li>a{height:27px!important;min-height:27px!important;font-size:9.7px!important;}
  .erp-modern-sidebar .sidebar-menu>li>a>i:first-child{width:20px!important;height:20px!important;flex-basis:20px!important;font-size:9px!important;}
}

/* Page geometry and compact title rows */
.content-wrapper,.right-side{min-height:calc(100vh - var(--erp-shell-header))!important;}
.content-header{min-height:43px!important;padding:9px var(--erp-page-gutter) 5px!important;}
.content-header>h1{font-size:19px!important;line-height:1.25!important;}
.content-header>.breadcrumb{top:10px!important;right:13px!important;font-size:10px!important;}
.content{padding:6px var(--erp-page-gutter) 14px!important;}
.main-footer{min-height:34px!important;padding:8px 13px!important;font-size:10.5px!important;}
.main-footer .pull-right{font-size:10px!important;}

/* Compact page-specific hero blocks into one visual language */
body .content-wrapper [class$="-hero"]:not(.customer-orb):not(.payment-hero-bg),
body .content-wrapper [class*="-hero "]:not(.customer-orb):not(.payment-hero-bg){
  min-height:88px!important;
  padding:15px 17px!important;
  border-radius:var(--erp-ui-radius)!important;
  background:var(--erp-ui-header-gradient)!important;
  box-shadow:var(--erp-ui-shadow)!important;
}
body .content-wrapper [class$="-hero"] h1,
body .content-wrapper [class$="-hero"] h2,
body .content-wrapper [class$="-hero"] h3,
body .content-wrapper [class*="-hero "] h1,
body .content-wrapper [class*="-hero "] h2,
body .content-wrapper [class*="-hero "] h3{margin:0 0 4px!important;font-size:18px!important;line-height:1.25!important;color:#fff!important;}
body .content-wrapper [class$="-hero"] p,
body .content-wrapper [class*="-hero "] p{margin:0!important;font-size:10.5px!important;color:rgba(255,255,255,.8)!important;}
body .content-wrapper [class*="-hero-icon"]{width:42px!important;height:42px!important;border-radius:12px!important;font-size:17px!important;}

/* Cards, panels, tabs and modal finishing */
body .content-wrapper .box,
body .content-wrapper .panel,
body .content-wrapper .nav-tabs-custom,
body .content-wrapper .well,
body .content-wrapper .modal-content,
body .content-wrapper [class$="-card"]:not(i):not(.btn):not(.label):not(.badge),
body .content-wrapper [class*="-card "]:not(i):not(.btn):not(.label):not(.badge){
  border:1px solid var(--erp-ui-line)!important;
  border-radius:var(--erp-ui-radius)!important;
  box-shadow:0 7px 20px rgba(15,23,42,.065)!important;
}
body .content-wrapper .box:hover,
body .content-wrapper [class$="-card"]:not(i):not(.btn):not(.label):not(.badge):hover,
body .content-wrapper [class*="-card "]:not(i):not(.btn):not(.label):not(.badge):hover{box-shadow:0 10px 26px rgba(15,23,42,.09)!important;}
body .content-wrapper .box-header{min-height:37px!important;padding:8px 11px!important;}
body .content-wrapper .box-body{padding:10px 11px!important;}
body .content-wrapper .box-footer{padding:8px 11px!important;}
body .content-wrapper .box-title,
body .content-wrapper .panel-title,
body .content-wrapper .modal-title{font-size:12px!important;line-height:1.3!important;}
.modal-dialog{margin-top:5vh!important;}
.modal-content{overflow:hidden!important;border:0!important;box-shadow:0 25px 70px rgba(5,12,24,.25)!important;}
.modal-header{min-height:45px!important;padding:11px 14px!important;}
.modal-body{padding:13px 14px!important;}
.modal-footer{padding:9px 14px!important;}
.modal-header .close{margin-top:0!important;opacity:.72!important;}
.nav-tabs-custom>.nav-tabs{padding:4px 5px 0!important;}
.nav-tabs-custom>.nav-tabs>li>a{padding:8px 11px!important;border-radius:8px 8px 0 0!important;font-size:10.5px!important;}

/* Form controls: identical dimensions and states everywhere */
body .content-wrapper .form-group{margin-bottom:10px!important;}
body .content-wrapper label,
body .content-wrapper .control-label{display:inline-block;margin-bottom:4px!important;font-size:10.5px!important;line-height:1.3!important;}
body .content-wrapper .form-control,
body .content-wrapper input[type="text"],
body .content-wrapper input[type="email"],
body .content-wrapper input[type="number"],
body .content-wrapper input[type="password"],
body .content-wrapper input[type="search"],
body .content-wrapper input[type="date"],
body .content-wrapper input[type="time"],
body .content-wrapper select,
body .content-wrapper .select2-container--default .select2-selection--single,
body .content-wrapper .select2-container--default .select2-selection--multiple{
  min-height:var(--erp-control-height)!important;
  border-radius:var(--erp-ui-radius-sm)!important;
  padding-top:7px!important;
  padding-bottom:7px!important;
  font-size:11px!important;
}
body .content-wrapper textarea.form-control{min-height:78px!important;resize:vertical!important;}
body .content-wrapper .input-group-addon{min-width:36px!important;padding:7px 9px!important;border-color:var(--erp-ui-line)!important;border-radius:var(--erp-ui-radius-sm)!important;background:var(--erp-ui-card-soft)!important;color:var(--erp-ui-muted)!important;}
body .content-wrapper .select2-container .select2-selection--single{height:var(--erp-control-height)!important;padding:0!important;}
body .content-wrapper .select2-container .select2-selection--single .select2-selection__rendered{line-height:34px!important;padding-left:10px!important;padding-right:24px!important;font-size:11px!important;}
body .content-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow{height:34px!important;}
body .content-wrapper .form-control::placeholder{color:var(--erp-ui-muted)!important;opacity:.72!important;}
body .content-wrapper .form-control[disabled],
body .content-wrapper .form-control[readonly],
body .content-wrapper fieldset[disabled] .form-control{background:var(--erp-ui-card-soft)!important;opacity:.72!important;cursor:not-allowed!important;}
body .content-wrapper .has-error .form-control{border-color:#d84b68!important;box-shadow:0 0 0 3px rgba(216,75,104,.09)!important;}
body .content-wrapper .has-success .form-control{border-color:#31aa78!important;box-shadow:0 0 0 3px rgba(49,170,120,.08)!important;}

/* Semantic button system: JS adds erp-action-* based on purpose */
body .btn,
body button.btn,
body a.btn,
body .dt-button,
body [class$="-btn"]:not(.input-group-btn):not(.navbar-btn):not(.close),
body [class*="-btn "]:not(.input-group-btn):not(.navbar-btn):not(.close){
  min-height:var(--erp-control-height)!important;
  padding:7px 13px!important;
  border-radius:var(--erp-ui-radius-sm)!important;
  font-size:10.5px!important;
  font-weight:800!important;
  line-height:1.1!important;
  gap:6px!important;
  white-space:nowrap!important;
}
body .btn i,body .dt-button i,body [class*="erp-action-"] i{font-size:11px!important;line-height:1!important;}
body .erp-action-primary,
body .erp-action-save,
body .erp-action-add,
body .erp-action-submit,
body .erp-action-pay,
body .btn-primary,
body .btn-success,
body .btn-info{background:var(--erp-ui-main-gradient)!important;color:#fff!important;}
body .erp-action-back,
body .erp-action-neutral,
body .btn-default{background:var(--erp-ui-secondary-gradient)!important;color:#fff!important;}
body .erp-action-danger,
body .erp-action-cancel,
body .erp-action-delete,
body .btn-danger{background:var(--erp-ui-danger-gradient)!important;color:#fff!important;}
body .erp-action-utility,
body .erp-action-print,
body .erp-action-export,
body .erp-action-filter{background:var(--erp-ui-utility-gradient)!important;color:#fff!important;}
body .erp-action-warning,
body .btn-warning{background:var(--erp-ui-warning-gradient)!important;color:#fff!important;}
body .btn:hover,body .dt-button:hover,body [class*="erp-action-"]:hover{transform:translateY(-1px)!important;filter:brightness(1.035) saturate(1.04)!important;}
body .btn:active,body .dt-button:active,body [class*="erp-action-"]:active{transform:translateY(0)!important;filter:brightness(.97)!important;}
body .btn[disabled],body .btn.disabled,body .dt-button.disabled{opacity:.55!important;filter:grayscale(.15)!important;cursor:not-allowed!important;transform:none!important;box-shadow:none!important;}
body .btn-xs,body .btn-group-xs>.btn{min-height:25px!important;padding:4px 7px!important;font-size:8.8px!important;}
body .btn-sm,body .btn-group-sm>.btn{min-height:29px!important;padding:5px 9px!important;font-size:9.5px!important;}
body .btn-lg,body .btn-group-lg>.btn{min-height:var(--erp-control-height-lg)!important;padding:9px 15px!important;font-size:11px!important;}
body .btn-box-tool{min-width:27px!important;min-height:27px!important;padding:4px!important;background:transparent!important;box-shadow:none!important;color:var(--erp-ui-muted)!important;}
body .input-group-btn>.btn{min-height:var(--erp-control-height)!important;border-radius:var(--erp-ui-radius-sm)!important;}
.customer-form-actions,.supplier-form-actions,.erp-form-actions,.stock-footer-actions,
[class$="-form-actions"],[class*="-form-actions "]{gap:8px!important;padding-top:10px!important;}
.customer-form-actions .btn,.supplier-form-actions .btn,.erp-form-actions .btn,.stock-footer-actions .btn{min-width:112px!important;}

/* Tables and DataTables */
body .content-wrapper .table-responsive{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
body .content-wrapper .table>thead>tr>th{padding:7px 7px!important;font-size:9px!important;line-height:1.3!important;white-space:nowrap!important;}
body .content-wrapper .table>tbody>tr>td,
body .content-wrapper .table>tfoot>tr>td{padding:7px!important;font-size:10px!important;line-height:1.35!important;vertical-align:middle!important;}
.dataTables_wrapper .row{margin-left:-5px!important;margin-right:-5px!important;}
.dataTables_wrapper .row>[class*="col-"]{padding-left:5px!important;padding-right:5px!important;}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter{margin-bottom:7px!important;font-size:10px!important;color:var(--erp-ui-muted)!important;}
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select{height:30px!important;min-height:30px!important;padding:4px 8px!important;border:1px solid var(--erp-ui-line)!important;border-radius:8px!important;background:var(--erp-ui-card)!important;color:var(--erp-ui-text)!important;}
.dataTables_wrapper .dataTables_info{padding-top:8px!important;font-size:9.5px!important;color:var(--erp-ui-muted)!important;}
.dataTables_wrapper .dataTables_paginate{padding-top:5px!important;}
.pagination{margin:5px 0!important;}
.pagination>li>a,.pagination>li>span{min-width:28px!important;min-height:28px!important;padding:5px 8px!important;border-color:var(--erp-ui-line)!important;background:var(--erp-ui-card)!important;color:var(--erp-ui-text)!important;font-size:9.5px!important;box-shadow:none!important;}
.pagination>.active>a,.pagination>.active>span{border-color:transparent!important;background:var(--erp-ui-main-gradient)!important;color:#fff!important;}

/* Dashboard final alignment */
.db-toolbar-card{padding:11px 12px!important;border-radius:12px!important;}
.db-toolbar-left h3{font-size:15px!important;}
.db-toolbar-left p{font-size:9.5px!important;}
.db-toolbar-actions{gap:5px!important;}
.db-period-btn{min-height:28px!important;padding:5px 9px!important;border-radius:8px!important;font-size:8.8px!important;box-shadow:none!important;}
.db-metrics-grid{gap:8px!important;margin-bottom:8px!important;}
.db-metric-card{min-height:66px!important;padding:8px 10px!important;border-radius:12px!important;}
.db-icon{width:38px!important;height:38px!important;flex-basis:38px!important;border-radius:11px!important;font-size:16px!important;}
.db-metric-card small{font-size:8px!important;}
.db-metric-card strong{font-size:17px!important;line-height:1.15!important;}
.dashboard-modern-page .chart{min-height:240px!important;height:240px!important;}
.dashboard-modern-page .chart canvas{max-height:240px!important;}

/* Plugin finishing */
.dropdown-menu,.select2-dropdown,.datepicker-dropdown,.daterangepicker,.popover{
  border:1px solid var(--erp-ui-line)!important;
  border-radius:11px!important;
  background:var(--erp-ui-card)!important;
  color:var(--erp-ui-text)!important;
  box-shadow:0 18px 45px rgba(5,12,24,.17)!important;
}
.dropdown-menu>li>a{padding:7px 10px!important;font-size:10.5px!important;color:var(--erp-ui-text)!important;}
.dropdown-menu>li>a:hover{background:rgba(15,167,157,.09)!important;color:var(--erp-ui-primary)!important;}
.select2-container--default .select2-results__option{padding:7px 9px!important;font-size:10.5px!important;}
.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--erp-ui-primary)!important;color:#fff!important;}
.select2-search--dropdown .select2-search__field{height:32px!important;border:1px solid var(--erp-ui-line)!important;border-radius:8px!important;background:var(--erp-ui-card-soft)!important;color:var(--erp-ui-text)!important;}
.tooltip-inner{padding:6px 8px!important;border-radius:7px!important;background:#071326!important;font-size:9.5px!important;}
.popover-title{padding:8px 10px!important;border-color:var(--erp-ui-line)!important;background:var(--erp-ui-card-soft)!important;color:var(--erp-ui-text)!important;font-size:10.5px!important;}
.popover-content{padding:9px 10px!important;font-size:10.5px!important;}
.alert{padding:9px 11px!important;border-radius:10px!important;font-size:10.5px!important;box-shadow:none!important;}
#toast-container>div{width:310px!important;padding:11px 13px 11px 44px!important;border-radius:10px!important;box-shadow:0 16px 35px rgba(5,12,24,.22)!important;font-size:10.5px!important;}
.sweet-alert,.swal-modal{border-radius:14px!important;background:var(--erp-ui-card)!important;color:var(--erp-ui-text)!important;box-shadow:0 25px 70px rgba(5,12,24,.28)!important;}
.sweet-alert h2,.swal-title{color:var(--erp-ui-text)!important;font-size:20px!important;}
.sweet-alert p,.swal-text{color:var(--erp-ui-muted)!important;font-size:11px!important;}

/* Strong keyboard focus without ugly persistent outlines */
a:focus,button:focus,input:focus,select:focus,textarea:focus{outline:none!important;}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,
.btn:focus-visible,.form-control:focus-visible{outline:2px solid rgba(15,167,157,.78)!important;outline-offset:2px!important;}

/* Complete dark mode, including inline legacy whites and plugins */
html[data-erp-theme="dark"] body,
html[data-erp-theme="dark"] .wrapper,
html[data-erp-theme="dark"] .content-wrapper,
html[data-erp-theme="dark"] .right-side{background:var(--erp-ui-page)!important;color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] body .content-wrapper [style*="background:#fff"],
html[data-erp-theme="dark"] body .content-wrapper [style*="background: #fff"],
html[data-erp-theme="dark"] body .content-wrapper [style*="background-color:#fff"],
html[data-erp-theme="dark"] body .content-wrapper [style*="background-color: #fff"],
html[data-erp-theme="dark"] body .content-wrapper [style*="background:white"],
html[data-erp-theme="dark"] body .content-wrapper [style*="background: white"]{background:var(--erp-ui-card)!important;background-color:var(--erp-ui-card)!important;}
html[data-erp-theme="dark"] body .content-wrapper [style*="color:#000"],
html[data-erp-theme="dark"] body .content-wrapper [style*="color: #000"],
html[data-erp-theme="dark"] body .content-wrapper [style*="color:black"],
html[data-erp-theme="dark"] body .content-wrapper [style*="color: black"]{color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] .modal-content,
html[data-erp-theme="dark"] .modal-header,
html[data-erp-theme="dark"] .modal-body,
html[data-erp-theme="dark"] .modal-footer,
html[data-erp-theme="dark"] .dropdown-menu,
html[data-erp-theme="dark"] .select2-dropdown,
html[data-erp-theme="dark"] .datepicker,
html[data-erp-theme="dark"] .daterangepicker,
html[data-erp-theme="dark"] .popover,
html[data-erp-theme="dark"] .sweet-alert,
html[data-erp-theme="dark"] .swal-modal{background:var(--erp-ui-card)!important;color:var(--erp-ui-text)!important;border-color:var(--erp-ui-line)!important;}
html[data-erp-theme="dark"] .modal-backdrop.in{opacity:.72!important;}
html[data-erp-theme="dark"] input:-webkit-autofill,
html[data-erp-theme="dark"] input:-webkit-autofill:hover,
html[data-erp-theme="dark"] input:-webkit-autofill:focus{-webkit-text-fill-color:var(--erp-ui-text)!important;-webkit-box-shadow:0 0 0 1000px var(--erp-ui-card-soft) inset!important;transition:background-color 9999s ease-in-out 0s;}
html[data-erp-theme="dark"] .select2-search--dropdown .select2-search__field,
html[data-erp-theme="dark"] .dataTables_wrapper .dataTables_filter input,
html[data-erp-theme="dark"] .dataTables_wrapper .dataTables_length select{background:var(--erp-ui-card-soft)!important;color:var(--erp-ui-text)!important;border-color:var(--erp-ui-line)!important;}
html[data-erp-theme="dark"] .fc-unthemed td,
html[data-erp-theme="dark"] .fc-unthemed th,
html[data-erp-theme="dark"] .fc-unthemed .fc-divider,
html[data-erp-theme="dark"] .fc-unthemed .fc-row,
html[data-erp-theme="dark"] .fc-unthemed .fc-content,
html[data-erp-theme="dark"] .fc-unthemed .fc-popover,
html[data-erp-theme="dark"] .fc-unthemed .fc-list-view,
html[data-erp-theme="dark"] .fc-unthemed .fc-list-heading td{border-color:var(--erp-ui-line)!important;background:var(--erp-ui-card)!important;color:var(--erp-ui-text)!important;}
html[data-erp-theme="dark"] .btn *,
html[data-erp-theme="dark"] .dt-button *,
html[data-erp-theme="dark"] [class*="erp-action-"] *{color:#fff!important;}
html[data-erp-theme="dark"] .btn-box-tool *{color:var(--erp-ui-muted)!important;}
html[data-erp-theme="dark"] hr{border-color:var(--erp-ui-line)!important;}

/* Mobile and tablet finishing */
@media(max-width:991px){
  .content-header>.breadcrumb{position:static!important;float:none!important;margin-top:4px!important;padding:0!important;}
  .db-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:767px){
  :root{--erp-page-gutter:9px;}
  .main-header.erp-compact-header .logo{width:100%!important;height:40px!important;line-height:40px!important;}
  .main-header.erp-compact-header .navbar{margin-left:0!important;}
  .main-header.erp-compact-header .navbar-custom-menu{margin-right:4px!important;}
  .main-header.erp-compact-header .erp-chip-label,.main-header.erp-compact-header .erp-mode-label{display:none!important;}
  .main-header.erp-compact-header .navbar-nav>li>a.erp-header-chip,
  .main-header.erp-compact-header .navbar-nav>li>a.erp-mode-toggle{width:29px!important;padding:0!important;}
  .main-sidebar.erp-modern-sidebar{top:80px!important;}
  .content-header{min-height:auto!important;padding-top:8px!important;}
  .content-header>h1{font-size:17px!important;}
  body .content-wrapper [class$="-hero"]:not(.customer-orb),
  body .content-wrapper [class*="-hero "]:not(.customer-orb){min-height:76px!important;padding:12px!important;}
  body .content-wrapper [class$="-hero"] h1,
  body .content-wrapper [class$="-hero"] h2,
  body .content-wrapper [class$="-hero"] h3{font-size:16px!important;}
  .db-toolbar-card{align-items:flex-start!important;flex-direction:column!important;}
  .db-toolbar-actions{width:100%!important;overflow-x:auto!important;padding-bottom:2px!important;}
  .db-period-btn{flex:0 0 auto!important;}
  .db-metrics-grid{grid-template-columns:1fr!important;gap:7px!important;}
  .db-metric-card{min-height:60px!important;}
  .modal-dialog{margin:10px!important;}
  .customer-form-actions .btn,.supplier-form-actions .btn,.erp-form-actions .btn,.stock-footer-actions .btn{min-width:0!important;flex:1 1 calc(50% - 8px)!important;}
  .dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{text-align:left!important;}
}

/* Print must remain clean regardless of saved theme */
@media print{
  html,body,.wrapper,.content-wrapper,.right-side{background:#fff!important;color:#000!important;}
  .main-header,.main-sidebar,.main-footer,.control-sidebar,.control-sidebar-bg,.no-print,.btn,.dt-buttons,.dataTables_filter,.dataTables_length,.dataTables_paginate{display:none!important;}
  .content-wrapper,.right-side{margin:0!important;min-height:0!important;}
  .content{padding:0!important;}
  .box,.panel,.invoice,.table-responsive,[class$="-card"],[class*="-card "]{border:0!important;box-shadow:none!important;background:#fff!important;color:#000!important;}
  .table>thead>tr>th,.table>tbody>tr>td,.table>tfoot>tr>td{color:#000!important;border-color:#bbb!important;background:#fff!important;}
}

/* Empty, loading and state finishing */
.erp-empty-state-row td{
  position:relative!important;
  height:108px!important;
  padding:45px 16px 15px!important;
  text-align:center!important;
  color:var(--erp-ui-muted)!important;
  font-size:10.5px!important;
  border:0!important;
}
.erp-empty-state-row td:before{
  content:"\f1c0";
  position:absolute;
  top:18px;
  left:50%;
  transform:translateX(-50%);
  font-family:FontAwesome;
  font-size:21px;
  color:var(--erp-ui-primary);
  opacity:.72;
}
.erp-final-ready .pace .pace-progress{height:2px!important;background:var(--erp-ui-primary)!important;}
.erp-final-ready .overlay>.fa,.erp-final-ready .loading-img{color:var(--erp-ui-primary)!important;}
.erp-short-viewport .content-header{padding-top:7px!important;padding-bottom:4px!important;}
.erp-short-viewport .content{padding-top:4px!important;}
