/* Light mode: Tabulator left borders */
.tabulator-row .tabulator-cell:first-child {
  border-left: 10px solid #4da6ff !important;
}
.tabulator-row:nth-child(2n) .tabulator-cell:first-child {
  border-left: 10px solid #80c1ff !important;
}

/* Colocando o padding para a primeira coluna do cabeçalho */
body.dark-mode .tabulator .tabulator-header .tabulator-col:first-child
 {
    padding-left: 15px;
}

/* Dark mode: match modern theme font/size/spacing */
body.dark-mode .tabulator,
html.dark-mode .tabulator {
  font-size: 16px !important;
}
body.dark-mode .tabulator .tabulator-header,
html.dark-mode .tabulator .tabulator-header {
  font-size: 1.1em !important;
  background-color: #33333300 !important;
    border-bottom: 3px solid #999 !important;
}
body.dark-mode .tabulator-row,
html.dark-mode .tabulator-row {
  min-height: 24px !important;
  margin-bottom: 2px !important;
}
body.dark-mode .tabulator-row .tabulator-cell,
html.dark-mode .tabulator-row .tabulator-cell {
  padding: 6px 4px !important;
}
body.dark-mode .tabulator-popup-container,
html.dark-mode .tabulator-popup-container {
  font-size: 16px !important;
}

/* Light mode: sidebar background */
body:not(.dark-mode) .main-sidebar,
body:not(.dark-mode) .main-sidebar.sidebar-dark-primary,
body:not(.dark-mode).layout-navbar-fixed .wrapper .sidebar-dark-primary .brand-link:not([class*=navbar]) {
  background-color: #1e3a5f !important;
}

/* Dark mode: Tabulator header column styling */
body.dark-mode .tabulator .tabulator-header .tabulator-col,
html.dark-mode .tabulator .tabulator-header .tabulator-col {
  background-color: #343a40 !important;
  border-right: none !important;
}

/* Dark mode: Tabulator container */
body.dark-mode .tabulator,
html.dark-mode .tabulator {
  background-color: #22222200 !important;
  border: none !important;
}

/* Dark mode: Tabulator left borders (inverted from row bg) */
body.dark-mode .tabulator-row .tabulator-cell:first-child,
html.dark-mode .tabulator-row .tabulator-cell:first-child {
  border-left: 10px solid #444 !important;
}
body.dark-mode .tabulator-row:nth-child(2n) .tabulator-cell:first-child,
html.dark-mode .tabulator-row:nth-child(2n) .tabulator-cell:first-child {
  border-left: 10px solid #666 !important;
}

/* Tab nav header (used in Equipamentos modal) */
.tab-nav-header {
  padding: 0.5rem 0.5rem 0 0.5rem;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
}
.tab-nav-header .nav-tabs {
  border-bottom: none;
}
body.dark-mode .tab-nav-header,
html.dark-mode .tab-nav-header {
  background: #343a40 !important;
  border-bottom-color: #454d55 !important;
}

/* Dark mode: nav-tabs link color */
body.dark-mode .nav-tabs .nav-link:not(.active),
html.dark-mode .nav-tabs .nav-link:not(.active) {
  color: rgba(255,255,255,.75) !important;
}
body.dark-mode .nav-tabs .nav-link.active,
html.dark-mode .nav-tabs .nav-link.active {
  background-color: #3f6791 !important;
  color: #ffffff !important;
}

/* Light mode: sidebar search input */
body:not(.dark-mode) .sidebar .input-group .form-control-sidebar,
body:not(.dark-mode) .sidebar .input-group .btn-sidebar {
  background-color: #40689d !important;
  border: 1px solid #2d4b6b !important;
  color: #fff !important;
}
body:not(.dark-mode) .sidebar .input-group .form-control-sidebar::placeholder {
  color: #fff !important;
  opacity: 1 !important;
}
body:not(.dark-mode) .sidebar .input-group .btn-sidebar i {
  color: #fff !important;
}

/* Table with max-height + scroll for inline tables inside modals */
.table-scrollable {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
}
.table-scrollable > .table {
  margin-bottom: 0;
  border: none;
}
.table-scrollable > .table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8f9fa;
}
body.dark-mode .table-scrollable,
html.dark-mode .table-scrollable {
  border-color: #454d55;
}
body.dark-mode .table-scrollable > .table thead th,
html.dark-mode .table-scrollable > .table thead th {
  background: #343a40;
  border-color: #454d55;
}

/* SweetAlert override to appear above sub-modals */
.swal-override-zindex {
  z-index: 100000 !important;
}
