/* ==========================================================================
   SysAdv Global M3 Theme — CSS-only AdminLTE/Bootstrap overrides
   Scope: all authenticated pages except POS, HRM, Auth
   ========================================================================== */

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme {
  font-family: var(--md-font-family);
  color: var(--md-sys-color-on-surface);
}

/* --------------------------------------------------------------------------
   Page header (AdminLTE content-header)
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .content-header {
  padding: 16px 20px 8px;
  background: transparent;
  border: none;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .content-header > h1,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .content-header > h1 small {
  font-size: var(--md-font-title-large);
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .content-header > h1 small {
  font-size: var(--md-font-body-medium);
  color: var(--md-sys-color-on-surface-variant);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 8px;
  font-size: var(--md-font-body-medium);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .breadcrumb > li + li:before {
  color: var(--md-sys-color-on-surface-variant);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .breadcrumb > .active {
  color: var(--md-sys-color-on-surface-variant);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .content {
  padding: 12px 20px 24px;
}

/* --------------------------------------------------------------------------
   Cards — .box / .box-solid
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box.box-solid {
  background: var(--md-sys-color-surface-container) !important;
  border: 1px solid var(--md-sys-color-outline-variant) !important;
  border-radius: var(--md-shape-large) !important;
  box-shadow: var(--md-elevation-1) !important;
  margin-bottom: 16px;
  overflow: hidden;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box .box-header,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box.box-solid .box-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(201, 162, 39, 0.06) 100%) !important;
  border-bottom: 1px solid rgba(201, 162, 39, 0.14) !important;
  border-radius: var(--md-shape-large) var(--md-shape-large) 0 0;
  padding: 14px 16px;
  color: var(--md-sys-color-on-surface);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box .box-title,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box.box-solid .box-title {
  font-size: var(--md-font-title-medium);
  font-weight: 500;
  color: var(--md-sys-color-on-surface) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box .box-header i,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box .box-header .fa,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box .box-header .fas {
  color: var(--md-sys-color-secondary) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box .box-body {
  padding: 16px;
  color: var(--md-sys-color-on-surface);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box .box-footer {
  background: var(--md-sys-color-surface-container-high);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 0 0 var(--md-shape-large) var(--md-shape-large);
  padding: 12px 16px;
}

/* Widget cards — glass + M3 shape */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .app-widget-card.m3-card {
  padding: 0;
  margin-bottom: 16px;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .app-widget-card {
  background: var(--md-glass-surface) !important;
  backdrop-filter: blur(var(--md-glass-blur));
  -webkit-backdrop-filter: blur(var(--md-glass-blur));
  border: 1px solid var(--md-glass-border) !important;
  border-radius: var(--md-shape-large) !important;
  box-shadow: var(--md-elevation-1) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .app-widget-card:hover {
  border-color: rgba(201, 162, 39, 0.32) !important;
  box-shadow: 0 12px 32px rgba(180, 130, 20, 0.10) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .app-widget-card .box-header .box-title {
  color: var(--md-sys-color-on-surface) !important;
  font-weight: 500;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .app-widget-card .box-header i,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .app-widget-card .box-header .fa,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .app-widget-card .box-header .fas {
  color: var(--md-sys-color-secondary) !important;
}

/* Memos & document glass pages */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme.memos-page .box.box-solid,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme.document-page .box.box-solid,
body:not(.lockscreen):not(.hrm-premium-theme) .memos-page #scrollable-container.sysadv-m3-theme .box.box-solid,
body:not(.lockscreen):not(.hrm-premium-theme) .document-page #scrollable-container.sysadv-m3-theme .box.box-solid {
  background: var(--md-glass-surface) !important;
  backdrop-filter: blur(var(--md-glass-blur));
  -webkit-backdrop-filter: blur(var(--md-glass-blur));
  border-radius: var(--md-shape-large) !important;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn {
  min-height: 36px;
  border-radius: 999px;
  font-size: var(--md-font-body-medium);
  font-weight: 500;
  padding: 8px 20px;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border-width: 1px;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-xs {
  min-height: 28px;
  padding: 4px 12px;
  font-size: var(--md-font-label-medium);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-sm {
  min-height: 32px;
  padding: 6px 16px;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-lg,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-big {
  min-height: 44px;
  padding: 10px 28px;
  font-size: var(--md-font-body-large);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-primary {
  background: var(--md-sys-color-primary) !important;
  border-color: var(--md-sys-color-primary) !important;
  color: var(--md-sys-color-on-primary) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-primary:hover,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-primary:focus {
  background: #4b5563 !important;
  border-color: #4b5563 !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-success {
  background: var(--md-sys-color-success) !important;
  border-color: var(--md-sys-color-success) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-danger {
  background: var(--md-sys-color-error) !important;
  border-color: var(--md-sys-color-error) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-warning {
  background: var(--md-sys-color-secondary) !important;
  border-color: var(--md-sys-color-secondary) !important;
  color: var(--md-sys-color-on-secondary) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-default,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-secondary {
  background: var(--md-sys-color-surface-container-high) !important;
  border-color: var(--md-sys-color-outline) !important;
  color: var(--md-sys-color-on-surface) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-default:hover,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-secondary:hover {
  background: var(--md-state-hover) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .btn-info {
  background: #0ea5e9 !important;
  border-color: #0ea5e9 !important;
}

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .form-control,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme select,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme textarea.form-control {
  min-height: 44px;
  border-radius: var(--md-shape-medium);
  border: 1px solid var(--md-sys-color-outline);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-size: var(--md-font-body-medium);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .form-control:focus,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme select:focus,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme textarea.form-control:focus {
  border-color: var(--md-sys-color-secondary);
  box-shadow: 0 0 0 3px rgba(243, 189, 13, 0.2);
  outline: none;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .control-label,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme label {
  font-size: var(--md-font-label-medium);
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .input-group-addon {
  background: var(--md-sys-color-surface-container-high);
  border-color: var(--md-sys-color-outline);
  border-radius: var(--md-shape-medium);
  color: var(--md-sys-color-on-surface-variant);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .input-group .form-control:first-child {
  border-radius: var(--md-shape-medium) 0 0 var(--md-shape-medium);
}

html[dir="rtl"] body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .input-group .form-control:first-child {
  border-radius: 0 var(--md-shape-medium) var(--md-shape-medium) 0;
}

/* --------------------------------------------------------------------------
   Tables & DataTables
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .table {
  color: var(--md-sys-color-on-surface);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .table > thead > tr > th,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .table > thead > tr > td,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme table.dataTable thead th {
  background: var(--md-sys-color-surface-container-high) !important;
  color: var(--md-sys-color-on-surface-variant) !important;
  font-weight: 500;
  border-bottom: 1px solid var(--md-sys-color-outline) !important;
  padding: 12px 10px;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .table > tbody > tr > td,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme table.dataTable tbody td {
  border-top: none;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  padding: 12px 10px;
  vertical-align: middle;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .table-striped > tbody > tr:nth-of-type(odd),
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme table.dataTable.stripe tbody tr.odd {
  background: rgba(55, 65, 81, 0.02);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .table-hover > tbody > tr:hover,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme table.dataTable.hover tbody tr:hover {
  background: var(--md-state-hover) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .table-bordered {
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-medium);
  overflow: hidden;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 999px !important;
  margin: 0 2px;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--md-sys-color-primary-container) !important;
  border-color: rgba(243, 189, 13, 0.3) !important;
  color: var(--md-sys-color-on-primary-container) !important;
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
.modal,
.modal.in {
  z-index: 10100 !important;
}

.modal-backdrop,
.modal-backdrop.in {
  z-index: 10095 !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) .modal-content {
  background: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-extra-large);
  box-shadow: var(--md-elevation-3);
  overflow: hidden;
}

body:not(.lockscreen):not(.hrm-premium-theme) .modal-header {
  background: linear-gradient(135deg, rgba(55, 65, 81, 0.06) 0%, rgba(243, 189, 13, 0.05) 100%);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  padding: 16px 20px;
  border-radius: var(--md-shape-extra-large) var(--md-shape-extra-large) 0 0;
}

body:not(.lockscreen):not(.hrm-premium-theme) .modal-title {
  font-size: var(--md-font-title-medium);
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

body:not(.lockscreen):not(.hrm-premium-theme) .modal-body {
  padding: 20px;
  color: var(--md-sys-color-on-surface);
}

body:not(.lockscreen):not(.hrm-premium-theme) .modal-footer {
  background: var(--md-sys-color-surface-container-high);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: 12px 20px;
  border-radius: 0 0 var(--md-shape-extra-large) var(--md-shape-extra-large);
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .alert {
  border-radius: var(--md-shape-medium);
  border: none;
  font-size: var(--md-font-body-medium);
  padding: 12px 16px;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .alert-success {
  background: var(--md-sys-color-success-container);
  color: var(--md-sys-color-success);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .alert-danger {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .alert-warning {
  background: var(--md-sys-color-warning-container);
  color: var(--md-sys-color-warning);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .alert-info {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

/* --------------------------------------------------------------------------
   Nav tabs
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .nav-tabs {
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .nav-tabs > li > a {
  border-radius: var(--md-shape-medium) var(--md-shape-medium) 0 0;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
  transition: background 0.2s ease;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .nav-tabs > li > a:hover {
  background: var(--md-state-hover);
  border-color: transparent;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .nav-tabs > li.active > a,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .nav-tabs > li.active > a:focus,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .nav-tabs > li.active > a:hover {
  background: var(--md-sys-color-surface-container);
  border-color: var(--md-sys-color-outline-variant);
  border-bottom-color: transparent;
  color: var(--md-sys-color-on-surface);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .pagination > li > a,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .pagination > li > span {
  border-radius: 999px;
  margin: 0 3px;
  border-color: var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .pagination > .active > a,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .pagination > .active > span {
  background: var(--md-sys-color-primary-container);
  border-color: rgba(243, 189, 13, 0.3);
  color: var(--md-sys-color-on-primary-container);
}

/* --------------------------------------------------------------------------
   Dropdown menus (content area)
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .dropdown-menu {
  background: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-medium);
  box-shadow: var(--md-elevation-2);
  padding: 6px 0;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .dropdown-menu > li > a {
  padding: 8px 16px;
  color: var(--md-sys-color-on-surface);
  transition: background 0.15s ease;
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .dropdown-menu > li > a:hover {
  background: var(--md-state-hover);
  color: var(--md-sys-color-on-surface);
}

/* --------------------------------------------------------------------------
   Labels & badges
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .label,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .badge {
  border-radius: 999px;
  font-weight: 500;
  padding: 4px 10px;
}

/* --------------------------------------------------------------------------
   Horizontal nav — M3 state layers (preserve mega-menu glass)
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav {
  background: var(--md-glass-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--md-sys-color-outline-variant) !important;
}

body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .sidebar-menu > li > a {
  border-radius: var(--md-shape-medium);
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
  font-size: var(--md-font-body-medium);
  transition: background 0.2s ease, color 0.2s ease;
  margin: 2px 4px;
}

body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .sidebar-menu > li > a:hover {
  background: var(--md-state-hover);
  color: var(--md-sys-color-on-surface);
}

body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .sidebar-menu > li.active > a,
body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .sidebar-menu > li.open > a {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .sidebar-menu > li > a > .fa,
body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .sidebar-menu > li > a > .fas,
body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .sidebar-menu > li > a > .glyphicon {
  color: var(--md-sys-color-secondary);
}

/* Standard dropdown menus in nav (not mega-menu) */
body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .sidebar-menu > li:not(.reports-mega-menu) .treeview-menu {
  background: var(--md-sys-color-surface-container) !important;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-medium);
  box-shadow: var(--md-elevation-2);
  padding: 6px 0;
}

body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .sidebar-menu > li:not(.reports-mega-menu) .treeview-menu > li > a {
  border-radius: var(--md-shape-small);
  margin: 2px 6px;
  padding: 8px 12px;
  transition: background 0.15s ease;
}

body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .sidebar-menu > li:not(.reports-mega-menu) .treeview-menu > li > a:hover {
  background: var(--md-state-hover);
}

/* Mega-menu — shape only, preserve existing glass blur from extracss */
body:not(.lockscreen):not(.hrm-premium-theme) .horizontal-nav .reports-mega-menu .treeview-menu.mega-menu-active {
  border-radius: var(--md-shape-large) !important;
}

/* --------------------------------------------------------------------------
   Header — M3 dropdown polish
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) .tw-dw-dropdown .tw-dw-dropdown-content,
body:not(.lockscreen):not(.hrm-premium-theme) .tw-dw-menu {
  background: var(--md-sys-color-surface-container) !important;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-medium);
  box-shadow: var(--md-elevation-2);
}

body:not(.lockscreen):not(.hrm-premium-theme) .tw-dw-dropdown .tw-dw-dropdown-content li a:hover,
body:not(.lockscreen):not(.hrm-premium-theme) .tw-dw-menu li a:hover {
  background: var(--md-state-hover) !important;
}

/* --------------------------------------------------------------------------
   Select2 overrides (content area)
   -------------------------------------------------------------------------- */
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .select2-container--default .select2-selection--single,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .select2-container--default .select2-selection--multiple {
  min-height: 44px;
  border-radius: var(--md-shape-medium);
  border-color: var(--md-sys-color-outline);
  background: var(--md-sys-color-surface);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .select2-container--default.select2-container--focus .select2-selection--single,
body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: var(--md-sys-color-secondary);
  box-shadow: 0 0 0 3px rgba(243, 189, 13, 0.2);
}

body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .select2-dropdown {
  border-radius: var(--md-shape-medium);
  border-color: var(--md-sys-color-outline-variant);
  box-shadow: var(--md-elevation-2);
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .box,
  body:not(.lockscreen):not(.hrm-premium-theme) #scrollable-container.sysadv-m3-theme .app-widget-card {
    box-shadow: none !important;
    backdrop-filter: none !important;
    background: #fff !important;
  }
}
