/*
 * Safe light admin skin
 *
 * This layer is intentionally scoped to the existing .ui-modern admin shell.
 * It changes presentation only: no layout contract, Bootstrap behavior,
 * modal positioning, table markup, JavaScript hooks, or POS styles are changed.
 */

body.ui-modern {
  --safe-bg: #f4f7fb;
  --safe-surface: #ffffff;
  --safe-surface-muted: #f8fafc;
  --safe-border: #dbe4ef;
  --safe-border-strong: #c9d6e5;
  --safe-text: #172033;
  --safe-muted: #64748b;
  --safe-accent: #2563eb;
  --safe-accent-soft: #eaf2ff;
  --safe-success-soft: #eaf8f0;
  --safe-warning-soft: #fff8e6;
  --safe-danger-soft: #fff0f0;
  background: var(--safe-bg);
  color: var(--safe-text);
}

/* Keep the administration shell light; POS does not carry .ui-modern. */
body.ui-modern.ui-v2 .side-bar,
body.ui-modern.ui-v2 .admin-sidebar__shell,
body.ui-modern.ui-v2 .admin-sidebar-grouped {
  background: var(--safe-surface) !important;
  color: var(--safe-text);
  border-color: var(--safe-border) !important;
}

body.ui-modern.ui-v2 .side-bar {
  width: 15.5rem !important;
  min-width: 15.5rem !important;
  max-width: 15.5rem !important;
  border-inline-end: 1px solid var(--safe-border) !important;
  box-shadow: 4px 0 14px rgba(30, 64, 175, 0.035);
}

body.ui-modern.ui-v2 .admin-sidebar__brand {
  min-height: 64px !important;
  padding-inline: 0.875rem !important;
  border-bottom: 1px solid var(--safe-border);
  color: var(--safe-text);
}

body.ui-modern.ui-v2 .admin-sidebar__menu-wrap {
  padding: 0.4rem 0.5rem !important;
}

body.ui-modern.ui-v2 .admin-sidebar-grouped {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body.ui-modern.ui-v2 .admin-sidebar-grouped__section {
  margin: 0 0 0.55rem !important;
  padding: 0 !important;
}

body.ui-modern.ui-v2 .admin-sidebar-grouped__section + .admin-sidebar-grouped__section {
  margin-top: 0.7rem !important;
  padding-top: 0.65rem !important;
  border-top: 1px solid #e8eef6;
}

body.ui-modern.ui-v2 .admin-sidebar-grouped__section + .admin-sidebar-grouped__section::before {
  content: none !important;
}

body.ui-modern.ui-v2 .admin-sidebar-grouped__title {
  width: auto !important;
  max-width: 100% !important;
  margin: 0 0 0.3rem !important;
  padding: 0.15rem 0.55rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
}

body.ui-modern.ui-v2 .admin-sidebar-grouped__title::before {
  width: 2px !important;
  height: 0.65rem !important;
  border-radius: 2px !important;
  background: #2563eb !important;
}

body.ui-modern.ui-v2 .admin-sidebar-grouped__items {
  row-gap: 0.08rem !important;
  padding-inline: 0 !important;
}

body.ui-modern.ui-v2 .admin-sidebar__brand .tw-text-slate-900,
body.ui-modern.ui-v2 .admin-sidebar__brand .tw-text-blue-700 {
  color: var(--safe-text) !important;
}

body.ui-modern.ui-v2 .admin-sidebar__brand .tw-text-blue-700 {
  color: var(--safe-accent) !important;
}

body.ui-modern.ui-v2 .sidebar-link,
body.ui-modern.ui-v2 .sidebar-sublink {
  color: #334155 !important;
}

body.ui-modern.ui-v2 .sidebar-link {
  min-height: 2.35rem !important;
  margin-bottom: 0.08rem !important;
  padding: 0.25rem 0.6rem !important;
  gap: 0.55rem !important;
  border-radius: 8px !important;
  font-size: 0.8rem !important;
}

body.ui-modern.ui-v2 .sidebar-link:hover,
body.ui-modern.ui-v2 .sidebar-sublink:hover,
body.ui-modern.ui-v2 .sidebar-link:focus,
body.ui-modern.ui-v2 .sidebar-sublink:focus {
  background: #f3f7fd !important;
  color: #1d4ed8 !important;
  transform: none !important;
}

body.ui-modern.ui-v2 .sidebar-link.active,
body.ui-modern.ui-v2 .sidebar-sublink.active,
body.ui-modern.ui-v2 .sidebar-accordion[open] > summary .sidebar-link {
  background: var(--safe-accent-soft) !important;
  color: #1d4ed8 !important;
  box-shadow: none !important;
}

body.ui-modern.ui-v2 .sidebar-nav-icon {
  background: #f1f6ff !important;
  border: 1px solid #d7e5fb;
  color: #2563eb !important;
  box-shadow: none;
}

/* Keep Home's icon footprint equal to the regular CRM/module icons. */
body.ui-modern.ui-v2 .sidebar-nav-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  border-radius: 10px;
}

body.ui-modern.ui-v2 .sidebar-nav-icon svg,
body.ui-modern.ui-v2 .sidebar-nav-icon i {
  width: 16px !important;
  height: 16px !important;
  font-size: 16px !important;
}

body.ui-modern.ui-v2 .admin-sidebar__footer {
  padding: 0.55rem 0.75rem !important;
  border-top: 1px solid var(--safe-border);
}

@media (max-width: 1023px) {
  body.ui-modern.ui-v2 .side-bar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

/* Header controls and native details dropdowns. */
body.ui-modern .admin-topbar {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: var(--safe-border) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
}

body.ui-modern .admin-topbar-btn {
  border: 1px solid var(--safe-border-strong);
  background: var(--safe-surface);
  color: #334155;
}

body.ui-modern .admin-topbar-btn:hover,
body.ui-modern .admin-topbar-btn:focus {
  border-color: #9db8df;
  background: #f4f8ff;
  color: #1d4ed8;
}

body.ui-modern .tw-dw-dropdown > ul,
body.ui-modern .dropdown-menu {
  border: 1px solid var(--safe-border) !important;
  background: var(--safe-surface) !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12) !important;
}

body.ui-modern .topbar-quick-actions-section {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0.45rem 0.65rem 0.2rem;
}

body.ui-modern .topbar-quick-actions-toggle > i,
body.ui-modern .admin-topbar-lang > i,
body.ui-modern .admin-topbar-pos > i,
body.ui-modern .admin-topbar-service > i {
  width: 16px;
  text-align: center;
  font-size: 14px;
  line-height: 1;
}

body.ui-modern .topbar-quick-actions-toggle {
  background: #f8fafc;
}

body.ui-modern .admin-topbar-pos {
  border-color: #9bd9bf;
  background: #ecfdf5;
  color: #047857;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.13);
}

body.ui-modern .admin-topbar-pos:hover,
body.ui-modern .admin-topbar-pos:focus {
  border-color: #6fc8a2;
  background: #dff8eb;
  color: #065f46;
}

body.ui-modern .admin-topbar-service--repair {
  border-color: #bdd3f3;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.11);
}

body.ui-modern .admin-topbar-lang {
  min-width: 62px;
  color: #1d4ed8;
}

body.ui-modern .admin-topbar-lang > span:not(.admin-topbar-lang__code),
body.ui-modern .admin-topbar-lang-options a > span:not(.admin-topbar-lang-option__label) {
  display: none;
}

body.ui-modern .admin-topbar-lang__code {
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

body.ui-modern .admin-topbar-lang-options .fa-globe {
  width: 18px;
  color: #2563eb;
  text-align: center;
}

/* Shared Bootstrap/Gentelella-style surfaces. */
body.ui-modern .box,
body.ui-modern .panel,
body.ui-modern .card,
body.ui-modern .well,
body.ui-modern .info-box,
body.ui-modern .small-box,
body.ui-modern .dataTables_wrapper {
  border: 1px solid var(--safe-border);
  border-radius: 12px;
  background: var(--safe-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

body.ui-modern .box-header,
body.ui-modern .panel-heading,
body.ui-modern .card-header {
  border-bottom: 1px solid var(--safe-border);
  background: var(--safe-surface-muted);
  color: var(--safe-text);
}

body.ui-modern .box-footer,
body.ui-modern .panel-footer,
body.ui-modern .card-footer {
  border-top: 1px solid var(--safe-border);
  background: var(--safe-surface-muted);
}

/* Gentelella-style page framing, without changing the existing markup contract. */
body.ui-modern .content-wrapper {
  background: transparent !important;
}

body.ui-modern .content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  padding: 1rem 1.25rem 0.65rem;
  color: var(--safe-text);
}

body.ui-modern .content-header h1 {
  margin: 0;
  color: var(--safe-text);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

body.ui-modern .content-header .breadcrumb {
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--safe-border);
  border-radius: 7px;
  background: var(--safe-surface);
  color: var(--safe-muted);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

body.ui-modern .content {
  padding: 0.75rem 1.25rem 1.5rem;
}

body.ui-modern .box,
body.ui-modern .panel,
body.ui-modern .card,
body.ui-modern .x_panel {
  overflow: hidden;
}

body.ui-modern .box-title,
body.ui-modern .panel-title,
body.ui-modern .card-title,
body.ui-modern .x_title h2 {
  margin: 0;
  color: var(--safe-text);
  font-size: 1rem;
  font-weight: 800;
}

body.ui-modern .box-tools,
body.ui-modern .panel-heading .btn-group,
body.ui-modern .x_title .pull-right {
  color: var(--safe-muted);
}

/* Legacy Gentelella panels are still used by several modules. */
body.ui-modern .x_panel {
  position: relative;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--safe-border);
  border-radius: 12px;
  background: var(--safe-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

body.ui-modern .x_title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--safe-border);
}

body.ui-modern .x_content {
  padding: 0;
}

body.ui-modern .x_panel .separator,
body.ui-modern .x_panel hr {
  border-color: var(--safe-border);
}

body.ui-modern .tile-stats {
  position: relative;
  min-height: 110px;
  padding: 1rem;
  border: 1px solid var(--safe-border);
  border-radius: 12px;
  background: var(--safe-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

body.ui-modern .tile-stats .count,
body.ui-modern .tile-stats h3,
body.ui-modern .tile-stats h4 {
  color: var(--safe-text);
  font-weight: 800;
}

body.ui-modern .tile-stats .icon {
  color: #bfdbfe;
}

/* Tabs and toolbars keep Bootstrap's behavior while gaining the Gentelella finish. */
body.ui-modern .nav-tabs-custom,
body.ui-modern .nav-tabs {
  border-color: var(--safe-border);
}

body.ui-modern .nav-tabs-custom {
  border: 1px solid var(--safe-border);
  border-radius: 12px;
  background: var(--safe-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

body.ui-modern .nav-tabs-custom > .nav-tabs,
body.ui-modern .nav-tabs {
  padding: 0.45rem 0.65rem 0;
  background: var(--safe-surface-muted);
}

body.ui-modern .nav-tabs > li > a {
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--safe-muted);
  font-weight: 700;
}

body.ui-modern .nav-tabs > li > a:hover,
body.ui-modern .nav-tabs > li.active > a,
body.ui-modern .nav-tabs > li.active > a:focus,
body.ui-modern .nav-tabs > li.active > a:hover {
  border-color: transparent transparent var(--safe-accent);
  background: transparent;
  color: var(--safe-accent);
}

body.ui-modern .nav-tabs-custom > .tab-content,
body.ui-modern .tab-content {
  padding: 1rem;
  background: var(--safe-surface);
}

body.ui-modern .toolbar,
body.ui-modern .box-header .btn-group,
body.ui-modern .content-header .btn-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

body.ui-modern fieldset {
  border: 1px solid var(--safe-border);
  border-radius: 10px;
  background: var(--safe-surface-muted);
}

body.ui-modern legend {
  width: auto;
  margin-bottom: 0.65rem;
  padding: 0 0.5rem;
  color: var(--safe-text);
  font-size: 0.9rem;
  font-weight: 800;
}

body.ui-modern .help-block,
body.ui-modern .text-muted {
  color: var(--safe-muted) !important;
}

/* Tables: only visual rules; native/DataTables sorting and pagination remain intact. */
body.ui-modern .table {
  margin-bottom: 0;
  color: var(--safe-text);
  border-color: var(--safe-border);
  background: var(--safe-surface);
}

body.ui-modern .table > :not(caption) > * > * {
  padding: 0.68rem 0.75rem;
  vertical-align: middle;
  border-bottom-color: var(--safe-border);
}

body.ui-modern .table > thead > tr > th,
body.ui-modern .table thead th {
  background: #f3f7fc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

body.ui-modern .table > tbody > tr {
  transition: background-color 0.16s ease;
}

body.ui-modern .table > tbody > tr:hover {
  background: #f7faff;
}

body.ui-modern .table-responsive {
  border: 1px solid var(--safe-border);
  border-radius: 10px;
  background: var(--safe-surface);
  overflow-x: auto;
}

body.ui-modern .dataTables_wrapper {
  padding: 0.75rem;
}

body.ui-modern .dataTables_wrapper .dataTables_filter input,
body.ui-modern .dataTables_wrapper .dataTables_length select {
  min-height: 34px;
  border: 1px solid var(--safe-border-strong);
  border-radius: 7px;
  background: var(--safe-surface);
  color: var(--safe-text);
}

body.ui-modern .dataTables_wrapper .dataTables_paginate li.paginate_button {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.ui-modern .dataTables_wrapper .dataTables_paginate a.paginate_button,
body.ui-modern .dataTables_wrapper .dataTables_paginate li.paginate_button > a {
  border: 1px solid transparent;
  border-radius: 7px;
  color: #475569 !important;
}

body.ui-modern .dataTables_wrapper .dataTables_paginate a.paginate_button:hover,
body.ui-modern .dataTables_wrapper .dataTables_paginate a.paginate_button.current,
body.ui-modern .dataTables_wrapper .dataTables_paginate li.paginate_button:not(.disabled) > a:hover,
body.ui-modern .dataTables_wrapper .dataTables_paginate li.paginate_button.active > a {
  border-color: #bfd4f2;
  background: var(--safe-accent-soft) !important;
  color: #1d4ed8 !important;
}

/* Forms and Bootstrap controls. */
body.ui-modern .form-control,
body.ui-modern .form-select,
body.ui-modern select,
body.ui-modern input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
body.ui-modern textarea {
  border-color: var(--safe-border-strong);
  border-radius: 8px;
  background: var(--safe-surface);
  color: var(--safe-text);
  box-shadow: none;
}

body.ui-modern .form-control:focus,
body.ui-modern .form-select:focus,
body.ui-modern select:focus,
body.ui-modern input:not([type='checkbox']):not([type='radio']):not([type='hidden']):focus,
body.ui-modern textarea:focus {
  border-color: #7aa5e2;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: 0;
}

body.ui-modern .input-group-text {
  border-color: var(--safe-border-strong);
  background: var(--safe-surface-muted);
  color: var(--safe-muted);
}

body.ui-modern .btn {
  border-radius: 8px;
  font-weight: 600;
}

body.ui-modern .btn-default,
body.ui-modern .btn-secondary {
  border-color: var(--safe-border-strong);
  background: var(--safe-surface);
  color: #334155;
}

body.ui-modern .btn-default:hover,
body.ui-modern .btn-secondary:hover {
  background: #f4f8ff;
  border-color: #9db8df;
  color: #1d4ed8;
}

/* Select2 and datepicker retain their plugin behavior while matching the skin. */
body.ui-modern .select2-container--default .select2-selection--single,
body.ui-modern .select2-container--default .select2-selection--multiple {
  min-height: 36px;
  border: 1px solid var(--safe-border-strong);
  border-radius: 8px;
  background: var(--safe-surface);
}

body.ui-modern .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--safe-text);
  line-height: 34px;
}

body.ui-modern .select2-dropdown,
body.ui-modern .datepicker-dropdown {
  border: 1px solid var(--safe-border);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

/* Modals: visual polish only; Bootstrap display/position/z-index are untouched. */
body.ui-modern .modal-content {
  overflow: hidden;
  border: 1px solid var(--safe-border);
  border-radius: 14px;
  background: var(--safe-surface);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
}

body.ui-modern .modal-header {
  border-bottom: 1px solid var(--safe-border);
  background: var(--safe-surface-muted);
  color: var(--safe-text);
}

body.ui-modern .modal-footer {
  border-top: 1px solid var(--safe-border);
  background: var(--safe-surface-muted);
}

body.ui-modern .modal-header .close,
body.ui-modern .modal-header .btn-close {
  color: #475569;
  opacity: 0.8;
}

body.ui-modern .alert {
  border-radius: 9px;
  border-width: 1px;
}

body.ui-modern .label,
body.ui-modern .badge {
  font-weight: 700;
}

@media (max-width: 768px) {
  body.ui-modern .content-header {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 0.75rem;
  }

  body.ui-modern .content {
    padding-inline: 0.75rem;
  }

  body.ui-modern .dataTables_wrapper {
    padding: 0.5rem;
  }

  body.ui-modern .table > :not(caption) > * > * {
    padding: 0.55rem 0.6rem;
  }
}

/* Shared dashboard metrics used by CRM and other modules. */
body.ui-modern .app-static-card {
  position: relative;
  min-height: 132px;
}

body.ui-modern .app-static-card .dashboard-static-card__body {
  padding: 1rem 1.05rem !important;
}

body.ui-modern .app-static-card .dashboard-static-card__icon {
  border: 1px solid #cfe0f7 !important;
  background: #edf5ff !important;
  color: #2563eb !important;
}

body.ui-modern .app-static-card .dashboard-static-card__icon svg {
  color: inherit !important;
  fill: currentColor;
}

/* HRM: replace saturated KPI blocks with readable light semantic cards. */
body.ui-modern .hrm-dashboard-page .kpi-card {
  --hrm-accent: #2563eb;
  --hrm-soft: #edf5ff;
  min-height: 152px;
  border: 1px solid var(--safe-border) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--safe-text) !important;
  box-shadow: inset 0 3px 0 var(--hrm-accent), 0 8px 22px rgba(15, 23, 42, 0.05) !important;
}

body.ui-modern .hrm-dashboard-page .kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 3px 0 var(--hrm-accent), 0 12px 28px rgba(15, 23, 42, 0.09) !important;
}

body.ui-modern .hrm-dashboard-page .kpi-card .kpi-icon {
  border: 1px solid #cfe0f7 !important;
  background: var(--hrm-soft) !important;
  color: var(--hrm-accent) !important;
}

body.ui-modern .hrm-dashboard-page .kpi-card .kpi-value {
  color: #0f172a !important;
}

body.ui-modern .hrm-dashboard-page .kpi-card .kpi-label {
  color: #526174 !important;
  opacity: 1 !important;
}

body.ui-modern .hrm-dashboard-page .kpi-card .kpi-badge {
  inset-inline-end: 14px;
  right: auto;
  border: 1px solid #cfe0f7;
  background: var(--hrm-soft) !important;
  color: var(--hrm-accent) !important;
}

body.ui-modern .hrm-dashboard-page .kpi-card::after {
  background: var(--hrm-soft) !important;
  opacity: 0.75;
}

body.ui-modern .hrm-dashboard-page .kpi-employees { --hrm-accent: #2563eb; --hrm-soft: #edf5ff; }
body.ui-modern .hrm-dashboard-page .kpi-present { --hrm-accent: #059669; --hrm-soft: #ecfdf5; }
body.ui-modern .hrm-dashboard-page .kpi-absent { --hrm-accent: #dc2626; --hrm-soft: #fff1f2; }
body.ui-modern .hrm-dashboard-page .kpi-leave { --hrm-accent: #d97706; --hrm-soft: #fff8e6; }
body.ui-modern .hrm-dashboard-page .kpi-shifts { --hrm-accent: #7c3aed; --hrm-soft: #f5f3ff; }
body.ui-modern .hrm-dashboard-page .kpi-departments { --hrm-accent: #475569; --hrm-soft: #f1f5f9; }

/* Repair: keep status meaning without dark full-card backgrounds. */
body.ui-modern .repair-dashboard .repair-quick-actions,
body.ui-modern .repair-dashboard .repair-quick-actions__heading,
body.ui-modern .repair-dashboard .repair-quick-actions__grid a,
body.ui-modern .repair-dashboard .repair-status-card,
body.ui-modern .repair-dashboard .repair-alert-item,
body.ui-modern .repair-dashboard .repair-empty-state {
  border-radius: 12px !important;
}

body.ui-modern .repair-dashboard .repair-quick-actions__grid a:hover {
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

body.ui-modern .repair-dashboard .repair-kpi-card {
  --repair-accent: #2563eb;
  --repair-soft: #edf5ff;
  border: 1px solid var(--safe-border) !important;
  border-inline-start: 4px solid var(--repair-accent) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--safe-text) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05) !important;
}

body.ui-modern .repair-dashboard .repair-kpi-card span {
  color: #526174 !important;
  opacity: 1 !important;
}

body.ui-modern .repair-dashboard .repair-kpi-card strong {
  color: #0f172a !important;
}

body.ui-modern .repair-dashboard .repair-kpi-card > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid #cfe0f7;
  border-radius: 12px;
  background: var(--repair-soft);
  color: var(--repair-accent) !important;
  font-size: 20px !important;
  opacity: 1 !important;
}

body.ui-modern .repair-dashboard .repair-kpi-blue { --repair-accent: #2563eb; --repair-soft: #edf5ff; }
body.ui-modern .repair-dashboard .repair-kpi-teal { --repair-accent: #0f766e; --repair-soft: #ecfdf8; }
body.ui-modern .repair-dashboard .repair-kpi-green { --repair-accent: #15803d; --repair-soft: #effaf4; }
body.ui-modern .repair-dashboard .repair-kpi-red { --repair-accent: #b91c1c; --repair-soft: #fff1f2; }
body.ui-modern .repair-dashboard .repair-kpi-amber { --repair-accent: #b45309; --repair-soft: #fff8e6; }
body.ui-modern .repair-dashboard .repair-kpi-violet { --repair-accent: #7c3aed; --repair-soft: #f5f3ff; }
body.ui-modern .repair-dashboard .repair-kpi-slate { --repair-accent: #475569; --repair-soft: #f1f5f9; }
body.ui-modern .repair-dashboard .repair-kpi-indigo { --repair-accent: #4338ca; --repair-soft: #eef2ff; }
body.ui-modern .repair-dashboard .repair-kpi-cyan { --repair-accent: #0e7490; --repair-soft: #ecfeff; }
body.ui-modern .repair-dashboard .repair-kpi-gray { --repair-accent: #4b5563; --repair-soft: #f3f4f6; }

/* Accounting tree actions: presentation only; click hooks remain unchanged. */
body.ui-modern .coa-actions {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap;
  gap: 0.3rem !important;
  margin-inline-start: 0.5rem !important;
}

body.ui-modern .coa-tree-action {
  min-height: 28px !important;
  padding: 0.3rem 0.55rem !important;
  border: 1px solid #bfd4f2 !important;
  border-radius: 7px !important;
  background: #edf5ff !important;
  color: #1d4ed8 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  transition: background-color 0.18s ease, border-color 0.18s ease !important;
}

body.ui-modern .coa-tree-action--add {
  border-color: #a7dec0 !important;
  background: #effaf4 !important;
  color: #047857 !important;
}

body.ui-modern .coa-tree-action:hover,
body.ui-modern .coa-tree-action:focus {
  filter: brightness(0.97);
  text-decoration: none !important;
}

/* Keep header/grid buttons in document flow on both LTR and RTL pages. */
body.ui-modern .app-widget .box-header .box-tools,
body.ui-modern .box-header > .box-tools {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  float: none !important;
}

@media print {
  body.ui-modern .box,
  body.ui-modern .panel,
  body.ui-modern .card,
  body.ui-modern .gentelella-panel,
  body.ui-modern .dataTables_wrapper,
  body.ui-modern .repair-dashboard .repair-kpi-card,
  body.ui-modern .hrm-dashboard-page .kpi-card {
    box-shadow: none !important;
  }

  body.ui-modern .dt-buttons,
  body.ui-modern .box-tools,
  body.ui-modern .table-toolbar,
  body.ui-modern .grid-toolbar {
    display: none !important;
  }
}

/* DataTables may render empty page anchors while a grid has no rows. */
body.ui-modern .dataTables_wrapper .dataTables_paginate a.paginate_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 30px;
  padding: 0.35rem 0.55rem !important;
  margin-inline: 2px;
  border: 1px solid var(--safe-border) !important;
  border-radius: 7px !important;
  background: var(--safe-surface) !important;
  color: #475569 !important;
  line-height: 1.15;
}

body.ui-modern .dataTables_wrapper .dataTables_paginate a.paginate_button:empty {
  display: none !important;
}

@media print {
  body.ui-modern .box,
  body.ui-modern .panel,
  body.ui-modern .card,
  body.ui-modern .dataTables_wrapper {
    box-shadow: none;
  }
}

/* --------------------------------------------------------------------------
 * Legacy AdminLTE bridge
 * Loaded last on administration pages so old module markup receives the same
 * light Gentelella finish. POS, customer display and print layouts do not use
 * .ui-modern and are therefore intentionally unaffected.
 * -------------------------------------------------------------------------- */

body.ui-modern .content-wrapper,
body.ui-modern #scrollable-container {
  background: var(--safe-bg) !important;
}

/*
 * Bootstrap inserts modal backdrops under <body>, while most AJAX modal
 * placeholders are rendered inside #scrollable-container. The container
 * must not establish a lower stacking context or the backdrop captures every
 * click and makes editable fields appear read-only.
 */
body.ui-modern #scrollable-container {
  z-index: auto !important;
}

body.ui-modern .content-header > h1,
body.ui-modern .content-header > h1 > small {
  color: var(--safe-text) !important;
}

body.ui-modern .box,
body.ui-modern .box.box-primary,
body.ui-modern .box.box-info,
body.ui-modern .box.box-success,
body.ui-modern .box.box-warning,
body.ui-modern .box.box-danger,
body.ui-modern .box.box-default,
body.ui-modern .box.box-solid {
  position: relative;
  border: 1px solid var(--safe-border) !important;
  border-top-width: 1px !important;
  border-radius: 12px !important;
  background: var(--safe-surface) !important;
  color: var(--safe-text) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05) !important;
}

body.ui-modern .box.box-primary { box-shadow: inset 0 3px 0 #2563eb, 0 8px 22px rgba(15, 23, 42, 0.05) !important; }
body.ui-modern .box.box-info { box-shadow: inset 0 3px 0 #0284c7, 0 8px 22px rgba(15, 23, 42, 0.05) !important; }
body.ui-modern .box.box-success { box-shadow: inset 0 3px 0 #16a34a, 0 8px 22px rgba(15, 23, 42, 0.05) !important; }
body.ui-modern .box.box-warning { box-shadow: inset 0 3px 0 #d97706, 0 8px 22px rgba(15, 23, 42, 0.05) !important; }
body.ui-modern .box.box-danger { box-shadow: inset 0 3px 0 #dc2626, 0 8px 22px rgba(15, 23, 42, 0.05) !important; }

body.ui-modern .box > .box-header,
body.ui-modern .box.box-solid > .box-header,
body.ui-modern .box.box-solid.box-primary > .box-header,
body.ui-modern .box.box-solid.box-info > .box-header,
body.ui-modern .box.box-solid.box-success > .box-header,
body.ui-modern .box.box-solid.box-warning > .box-header,
body.ui-modern .box.box-solid.box-danger > .box-header {
  min-height: 48px;
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid var(--safe-border) !important;
  background: var(--safe-surface-muted) !important;
  color: var(--safe-text) !important;
}

body.ui-modern .box > .box-header .box-title,
body.ui-modern .box.box-solid > .box-header .box-title,
body.ui-modern .box > .box-header a:not(.btn) {
  color: var(--safe-text) !important;
}

body.ui-modern .box > .box-body {
  padding: 1rem !important;
  background: var(--safe-surface) !important;
  color: var(--safe-text);
}

body.ui-modern .box > .box-footer {
  padding: 0.8rem 1rem !important;
  border-top: 1px solid var(--safe-border) !important;
  background: var(--safe-surface-muted) !important;
}

body.ui-modern .gentelella-panel,
body.ui-modern .app-widget,
body.ui-modern .app-filters {
  border: 1px solid var(--safe-border) !important;
  border-radius: 12px !important;
  background: var(--safe-surface) !important;
  color: var(--safe-text) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden;
}

body.ui-modern .app-widget > .tw-p-2,
body.ui-modern .app-widget > .sm\:tw-p-3 {
  padding: 0 !important;
}

body.ui-modern .app-widget .box-header,
body.ui-modern .app-filters > .box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 50px;
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid var(--safe-border) !important;
  background: var(--safe-surface-muted) !important;
}

body.ui-modern .app-widget .box-header .box-title,
body.ui-modern .app-filters .box-header .box-title,
body.ui-modern .app-filters .box-header .box-title a {
  margin: 0;
  color: var(--safe-text) !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  text-decoration: none;
}

body.ui-modern .app-widget .tw-flow-root > div > div {
  padding: 1rem !important;
}

body.ui-modern .app-filters .panel-collapse > .box-body {
  padding: 1rem !important;
  background: #fbfdff;
}

body.ui-modern .app-filters .box-header .fa-filter {
  margin-inline-end: 0.35rem;
  color: var(--safe-accent);
}

body.ui-modern .box .box-tools .btn,
body.ui-modern .box .box-tools button {
  color: #475569;
}

body.ui-modern .box-tools {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-inline-start: auto;
}

body.ui-modern .box-tools .tw-dw-btn,
body.ui-modern .box-tools > a.btn,
body.ui-modern .box-tools > button.btn,
body.ui-modern .box-tools > .btn-group > .btn,
body.ui-modern .content-header > .btn,
body.ui-modern .content-header .btn,
body.ui-modern .content-header .tw-dw-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 34px !important;
  padding: 0.42rem 0.72rem !important;
  border: 1px solid #1d4ed8 !important;
  border-radius: 8px !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  box-shadow: 0 3px 9px rgba(37, 99, 235, 0.18) !important;
  text-decoration: none !important;
}

body.ui-modern .box-tools .tw-dw-btn:hover,
body.ui-modern .box-tools > a.btn:hover,
body.ui-modern .box-tools > button.btn:hover,
body.ui-modern .box-tools > .btn-group > .btn:hover,
body.ui-modern .content-header > .btn:hover,
body.ui-modern .content-header .btn:hover,
body.ui-modern .content-header .tw-dw-btn:hover {
  border-color: #1e40af !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

body.ui-modern .box-tools .tw-dw-btn svg,
body.ui-modern .box-tools .tw-dw-btn i,
body.ui-modern .content-header .tw-dw-btn svg,
body.ui-modern .content-header .tw-dw-btn i {
  width: 15px !important;
  height: 15px !important;
  font-size: 13px !important;
  flex: 0 0 auto;
}

body.ui-modern .content .tw-dw-btn.tw-bg-gradient-to-r {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 34px !important;
  padding: 0.42rem 0.72rem !important;
  border: 1px solid #1d4ed8 !important;
  border-radius: 8px !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  box-shadow: 0 3px 9px rgba(37, 99, 235, 0.18) !important;
  text-decoration: none !important;
}

body.ui-modern .content .tw-dw-btn.tw-bg-gradient-to-r:hover,
body.ui-modern .content .tw-dw-btn.tw-bg-gradient-to-r:focus {
  border-color: #1e40af !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

body.ui-modern .content .tw-dw-btn.tw-bg-gradient-to-r svg,
body.ui-modern .content .tw-dw-btn.tw-bg-gradient-to-r i {
  width: 15px !important;
  height: 15px !important;
  font-size: 13px !important;
}

body.ui-modern .panel,
body.ui-modern .panel.panel-default,
body.ui-modern .panel.panel-primary,
body.ui-modern .panel.panel-info,
body.ui-modern .panel.panel-success,
body.ui-modern .panel.panel-warning,
body.ui-modern .panel.panel-danger {
  border: 1px solid var(--safe-border) !important;
  border-radius: 12px !important;
  background: var(--safe-surface) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden;
}

body.ui-modern .panel > .panel-heading,
body.ui-modern .panel.panel-primary > .panel-heading,
body.ui-modern .panel.panel-info > .panel-heading,
body.ui-modern .panel.panel-success > .panel-heading,
body.ui-modern .panel.panel-warning > .panel-heading,
body.ui-modern .panel.panel-danger > .panel-heading {
  padding: 0.85rem 1rem !important;
  border-color: var(--safe-border) !important;
  background: var(--safe-surface-muted) !important;
  color: var(--safe-text) !important;
}

body.ui-modern .panel > .panel-body { padding: 1rem !important; }

/* Legacy dashboard statistics become light cards instead of saturated blocks. */
body.ui-modern .small-box,
body.ui-modern .info-box {
  min-height: 112px;
  border: 1px solid var(--safe-border) !important;
  border-radius: 12px !important;
  background: var(--safe-surface) !important;
  color: var(--safe-text) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden;
}

body.ui-modern .small-box .inner h3,
body.ui-modern .small-box .inner p,
body.ui-modern .info-box-number,
body.ui-modern .info-box-text {
  color: var(--safe-text) !important;
}

body.ui-modern .small-box > .icon {
  top: 10px;
  color: #dbeafe !important;
  opacity: 0.9;
}

body.ui-modern .small-box > .small-box-footer {
  border-top: 1px solid var(--safe-border);
  background: var(--safe-surface-muted) !important;
  color: #2563eb !important;
}

body.ui-modern .info-box-icon,
body.ui-modern .bg-aqua,
body.ui-modern .bg-blue,
body.ui-modern .bg-light-blue,
body.ui-modern .bg-green,
body.ui-modern .bg-yellow,
body.ui-modern .bg-red {
  background: var(--safe-accent-soft) !important;
  color: #2563eb !important;
}

/* Tabs and accordions used by Accounting, CRM, HRM and module settings. */
body.ui-modern .nav-tabs-custom {
  border-top: 0 !important;
}

body.ui-modern .nav-tabs-custom > .nav-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--safe-border) !important;
  background: var(--safe-surface-muted) !important;
}

body.ui-modern .nav-tabs-custom > .nav-tabs > li {
  margin: 0 !important;
  white-space: nowrap;
}

body.ui-modern .nav-tabs-custom > .nav-tabs > li > a {
  margin: 0 !important;
  padding: 0.75rem 0.9rem !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--safe-muted) !important;
}

body.ui-modern .nav-tabs-custom > .nav-tabs > li.active > a,
body.ui-modern .nav-tabs-custom > .nav-tabs > li > a:hover,
body.ui-modern .nav-tabs-custom > .nav-tabs > li > a:focus {
  border-bottom-color: var(--safe-accent) !important;
  color: var(--safe-accent) !important;
}

body.ui-modern .nav-tabs-custom > .tab-content {
  padding: 1rem !important;
  background: var(--safe-surface) !important;
}

body.ui-modern .panel-group .panel + .panel { margin-top: 0.65rem; }
body.ui-modern .panel-group .panel-heading a { color: var(--safe-text) !important; }

/* Tables and their surrounding grid controls. */
body.ui-modern table.table,
body.ui-modern table.dataTable,
body.ui-modern .table-bordered {
  width: 100% !important;
  border-color: var(--safe-border) !important;
  border-collapse: separate;
  border-spacing: 0;
}

body.ui-modern .table-bordered > thead > tr > th,
body.ui-modern .table-bordered > tbody > tr > td,
body.ui-modern .table-bordered > tfoot > tr > td,
body.ui-modern table.dataTable.no-footer {
  border-color: var(--safe-border) !important;
}

body.ui-modern table.dataTable thead th,
body.ui-modern table.dataTable thead td,
body.ui-modern .table > thead > tr > th {
  padding: 0.72rem 0.75rem !important;
  border-color: var(--safe-border) !important;
  background: #f3f7fc !important;
  color: #334155 !important;
  font-weight: 800 !important;
}

body.ui-modern table.dataTable tbody td,
body.ui-modern .table > tbody > tr > td {
  padding: 0.68rem 0.75rem !important;
  border-color: #e7edf5 !important;
  background: var(--safe-surface);
  color: var(--safe-text);
}

body.ui-modern table.dataTable.stripe tbody tr.odd,
body.ui-modern table.dataTable.display tbody tr.odd,
body.ui-modern .table-striped > tbody > tr:nth-of-type(odd) {
  background: #fbfdff !important;
}

body.ui-modern table.dataTable tbody tr:hover > td,
body.ui-modern .table-hover > tbody > tr:hover > td {
  background: #f4f8ff !important;
}

body.ui-modern .dataTables_wrapper {
  border: 0;
  box-shadow: none;
}

body.ui-modern .dataTables_wrapper .dataTables_length,
body.ui-modern .dataTables_wrapper .dataTables_filter,
body.ui-modern .dataTables_wrapper .dataTables_info,
body.ui-modern .dataTables_wrapper .dataTables_paginate {
  margin-block: 0.35rem;
  color: var(--safe-muted) !important;
  font-size: 0.78rem;
}

/* Buttons above grids: add/export/print/Excel/PDF/column visibility/filter. */
body.ui-modern .dataTables_wrapper .dt-buttons,
body.ui-modern .table-toolbar,
body.ui-modern .grid-toolbar,
body.ui-modern .box-header .btn-group,
body.ui-modern .content-header .btn-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.25rem 0 0.65rem;
}

body.ui-modern .dataTables_wrapper .dt-buttons .btn,
body.ui-modern .dataTables_wrapper button.dt-button,
body.ui-modern .dataTables_wrapper a.dt-button,
body.ui-modern .dataTables_wrapper input.dt-button,
body.ui-modern .table-toolbar .btn,
body.ui-modern .grid-toolbar .btn {
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0.42rem 0.72rem !important;
  border: 1px solid var(--safe-border-strong) !important;
  border-radius: 8px !important;
  background: var(--safe-surface) !important;
  color: #334155 !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}

body.ui-modern .dataTables_wrapper .dt-buttons .btn:hover,
body.ui-modern .dataTables_wrapper button.dt-button:hover,
body.ui-modern .dataTables_wrapper a.dt-button:hover,
body.ui-modern .table-toolbar .btn:hover,
body.ui-modern .grid-toolbar .btn:hover {
  border-color: #9db8df !important;
  background: var(--safe-accent-soft) !important;
  color: #1d4ed8 !important;
}

body.ui-modern .dataTables_wrapper .buttons-excel,
body.ui-modern .dataTables_wrapper .buttons-csv {
  border-color: #a7dec0 !important;
  background: #effaf4 !important;
  color: #047857 !important;
}

body.ui-modern .dataTables_wrapper .buttons-pdf,
body.ui-modern .dataTables_wrapper .buttons-print {
  border-color: #f2c7c7 !important;
  background: #fff5f5 !important;
  color: #b91c1c !important;
}

body.ui-modern .dataTables_wrapper .buttons-collection,
body.ui-modern .dataTables_wrapper .buttons-colvis {
  border-color: #c7d2fe !important;
  background: #f3f4ff !important;
  color: #4338ca !important;
}

body.ui-modern .dt-button-collection,
body.ui-modern div.dt-button-collection {
  padding: 0.45rem !important;
  border: 1px solid var(--safe-border) !important;
  border-radius: 10px !important;
  background: var(--safe-surface) !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14) !important;
}

body.ui-modern .dt-button-collection .dt-button {
  width: 100%;
  text-align: start;
}

/* Primary page actions, while retaining every existing JS hook and data attribute. */
body.ui-modern .btn-primary,
body.ui-modern .tw-dw-btn-primary {
  border-color: #1d4ed8 !important;
  background: #2563eb !important;
  color: #fff !important;
  box-shadow: 0 3px 9px rgba(37, 99, 235, 0.18);
}

body.ui-modern .btn-primary:hover,
body.ui-modern .btn-primary:focus,
body.ui-modern .tw-dw-btn-primary:hover,
body.ui-modern .tw-dw-btn-primary:focus {
  border-color: #1e40af !important;
  background: #1d4ed8 !important;
  color: #fff !important;
}

body.ui-modern .btn-success { border-color: #047857 !important; background: #059669 !important; color: #fff !important; }
body.ui-modern .btn-info { border-color: #0369a1 !important; background: #0284c7 !important; color: #fff !important; }
body.ui-modern .btn-warning { border-color: #b45309 !important; background: #d97706 !important; color: #fff !important; }
body.ui-modern .btn-danger { border-color: #b91c1c !important; background: #dc2626 !important; color: #fff !important; }

body.ui-modern .btn-xs,
body.ui-modern .btn-group-xs > .btn {
  min-height: 28px;
  padding: 0.3rem 0.52rem;
  border-radius: 7px;
}

body.ui-modern .dropdown-menu > li > a {
  padding: 0.55rem 0.75rem;
  color: #334155;
}

body.ui-modern .dropdown-menu > li > a:hover,
body.ui-modern .dropdown-menu > li > a:focus {
  background: var(--safe-accent-soft);
  color: #1d4ed8;
}

/* Filter rows and form grouping. */
body.ui-modern .form-group { margin-bottom: 1rem; }
body.ui-modern label { color: #334155; font-weight: 700; }
body.ui-modern .input-group-addon {
  border-color: var(--safe-border-strong) !important;
  background: var(--safe-surface-muted) !important;
  color: var(--safe-muted) !important;
}

body.ui-modern .callout,
body.ui-modern .alert,
body.ui-modern .well {
  border-radius: 10px !important;
  box-shadow: none !important;
}

body.ui-modern .pagination > li > a,
body.ui-modern .pagination > li > span {
  margin-inline: 2px;
  border: 1px solid var(--safe-border) !important;
  border-radius: 7px !important;
  background: var(--safe-surface) !important;
  color: #475569 !important;
}

body.ui-modern .pagination > .active > a,
body.ui-modern .pagination > .active > span,
body.ui-modern .pagination > li > a:hover {
  border-color: #bfd4f2 !important;
  background: var(--safe-accent-soft) !important;
  color: #1d4ed8 !important;
}

@media (max-width: 768px) {
  body.ui-modern .box > .box-header,
  body.ui-modern .box > .box-body,
  body.ui-modern .panel > .panel-heading,
  body.ui-modern .panel > .panel-body {
    padding-inline: 0.75rem !important;
  }

  body.ui-modern .dataTables_wrapper .dt-buttons,
  body.ui-modern .table-toolbar,
  body.ui-modern .grid-toolbar {
    display: flex;
    width: 100%;
  }

  body.ui-modern .dataTables_wrapper .dt-buttons .btn,
  body.ui-modern .dataTables_wrapper button.dt-button,
  body.ui-modern .dataTables_wrapper a.dt-button {
    flex: 1 1 auto;
  }
}

/* Direct sale: product entry belongs above the line-items grid. */
body.ui-modern .direct-sale-product-search {
  margin: 0 0 0.85rem !important;
  padding-block: 0.75rem;
  border: 1px solid var(--safe-border);
  border-radius: 10px;
  background: #f8fbff;
}

body.ui-modern .direct-sale-product-search .form-group {
  margin-bottom: 0;
}

body.ui-modern .direct-sale-product-search .input-group {
  width: 100%;
}

body.ui-modern .direct-sale-product-search .form-control,
body.ui-modern .direct-sale-product-search .btn {
  min-height: 38px;
}

body.ui-modern .direct-sale-lines {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  body.ui-modern .direct-sale-product-search {
    margin-inline: 0 !important;
    padding-inline: 0.25rem;
  }
}

/* Final print guard: keep the screen skin from affecting invoices/reports. */
@media print {
  body.ui-modern .box,
  body.ui-modern .panel,
  body.ui-modern .card,
  body.ui-modern .gentelella-panel,
  body.ui-modern .dataTables_wrapper,
  body.ui-modern .repair-dashboard .repair-kpi-card,
  body.ui-modern .hrm-dashboard-page .kpi-card {
    box-shadow: none !important;
  }

  body.ui-modern .dt-buttons,
  body.ui-modern .box-tools,
  body.ui-modern .table-toolbar,
  body.ui-modern .grid-toolbar {
    display: none !important;
  }
}
