
/* ============================================================
   RESET E ESTILOS BASE
   ============================================================ */
table.dataTable td:before {
    content: none !important;
}

select {
    text-align: left;
    text-align-last: left;
}

select option,
.select2-container .select2-selection--single,
.select2-container .select2-results__option {
    text-align: left;
}

/* ============================================================
   PAGINAÇÃO DO DATATABLE
   ============================================================ */
.dataTables_paginate {
    display: flex;
    align-items: center;
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin-top: 10px;
}

.dataTables_paginate a.paginate_button {
    padding: 6px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 0;
    text-decoration: none;
    color: #003366;
    background-color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.dataTables_paginate a.paginate_button:hover {
    background-color: #f0f0f0;
}

.dataTables_paginate a.paginate_button.current {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    font-weight: bold;
}

.dataTables_paginate a.paginate_button.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.dataTables_paginate a.paginate_button.previous {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.dataTables_paginate a.paginate_button.next {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.dataTables_paginate span {
    display: flex;
}

/* ============================================================
   COMPONENTES DO DATATABLE
   ============================================================ */

/* Info e botões */
.dt-info/*,
.dt-buttons */ {
   
    padding: 1rem 0;
}
/*
.dt-buttons {
    padding-inline: 0px !important;
}
*/

.dt-buttons.btn-group {
    flex-wrap: nowrap !important;
}

/* Barra de busca e seleção */
.dt-search,
.dt-length {
    display: inline-block !important;
    width: auto !important;
    vertical-align: middle;
}

.dt-search {
    padding-top: 0.5rem;
    min-width: 200px !important;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dt-search label {
    display: none;
}

.dt-length {
    padding-top: 0.5rem;
}

/* Estilização do input de busca */
.dt-search input[type="search"] {
    border: 1px solid #ccc;
    border-radius: 0;
    height: 36px;
    font-size: 14px;
    transition: all 0.3s ease;
}
.dt-column-title {
    font-size: 12px;
  
}

@media (max-width: 575.98px) {
 .dt-column-title {
    font-size: 10px;
  
  }
}

/* ============================================================
   TABELA
   ============================================================ */
#tableDiv td {
    font-size: 13px;
    padding: 10px 5px;
    text-align: left !important;
}

table.dataTable td {
    text-align: left !important;
}

table.dataTable thead th {
    position: relative;
    vertical-align: middle;
}

/* Ordenação com ícones */
table.dataTable thead > tr > th.dt-orderable span.dt-column-order {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

table.dataTable thead > tr > th.dt-orderable span.dt-column-order::before {
    content: "⇅" !important;
    font-size: 12px !important;
    color: #000 !important;
    margin-right: 5px !important;
}

table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order::before,
table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order::before {
    content: "↑" !important;
    font-size: 12px;
    color: #000;
    position: static !important;  /* <--- Remova o absolute */
    display: inline !important;
}

table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order::after,
table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order::after {
    content: "↓" !important;
    font-size: 12px;
    color: #000;
    position: static !important;  /* <--- Remova o absolute */
    display: inline !important;
}


table.dataTable th.dt-type-numeric, table.dataTable th.dt-type-date, table.dataTable td.dt-type-numeric, table.dataTable td.dt-type-date {
    text-align: left !important;
  
  }

/* Seleção de linha */
table.table.dataTable > tbody > tr.selected > * {
    box-shadow: inset 0 0 0 9999px var(--color-secondary) !important;
    color: var(--color-font-main) !important;
}

th.dt-select input.dt-select-checkbox {
    display: none !important;
}

table.dataTable thead>tr>th.dt-orderable-asc span.dt-column-order,
table.dataTable thead>tr>th.dt-orderable-desc span.dt-column-order,
table.dataTable thead>tr>th.dt-ordering-asc span.dt-column-order,
table.dataTable thead>tr>th.dt-ordering-desc span.dt-column-order {
    top: 3px !important;
    right: 6px !important;
}
/* ============================================================
   FILTROS E SELECTS
   ============================================================ */
#selRegiao,
#selGrTecnico {
    width: 200px !important;
}

#selAgrupar + .select2-container {
    width: 100% !important;
}

.filtro-item {
    display: none;
}

span.select-info {
    display: none;
}

/* Estilo base do SELECT2 (modo single) */
@media (min-width: 768px) {
    .select2-container--default .select2-selection--single,
    .input-custom-h {
        height: 32px !important;
        min-height: 32px !important;
    }
}

/* Modal filtros */
#modalFiltrosMobile {
    gap: 1rem !important;
}

@media (min-width: 768px) {
    #modalFiltrosMobile .modal-content {
        min-height: 50vh;
    }
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */
@media (max-width: 767.98px) {
    #modalFiltrosMobile .btn {
        border-radius: 6px !important;
    }

    .dt-buttons .dt-button {
        width: calc(33.33% - 1rem) !important;
    }

    .dt-buttons.btn-group {
        flex-wrap: wrap !important;
        gap: 1rem !important;
    }

    .dt-search {
        display: block !important;
    }

    .dt-search input[type="search"] {
        width: 22rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
        outline: none;
    }

    .dt-container .dt-buttons {
        display: none;
    }

    .dt-container td {
        font-size: 12px !important;
        padding: 2px !important;
    }

    .container-fluid {
        padding: 0 !important;
    }

    .dt-length {
        margin: auto !important;
        position: static !important;
        text-align: center !important;
        display: block !important;
    }

    .em-linha {
        margin-left: auto;
        margin-right: auto;
    }

    .filtro-item-mobile {
        display: none;
    }

    .filtro-predefinicao {
        width: 100%;
    }
}

@media (min-width: 1100px) {
    .dt-search input[type="search"] {
        width: 30rem !important;
    }
}

@media (max-width: 768px) {
    table.dataTable > tbody > tr > .dt-select {
        vertical-align: top !important;
    }
}

/* ============================================================
   ESTILOS AUXILIARES
   ============================================================ */
.badge {
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
}

tbody tr.linha-destacada td {
    background-color: #fff6db !important;
}

.tbl-font-cinza tbody td {
    color: #59595c !important;
}

.tbl-font-preto tbody td {
    color: black !important;
}

.tbl-font-vermelho tbody td {
    color: red !important;
}

#tableDiv table.tbl-font-12 td {
    font-size: 12px !important;
}
#tableDiv table.tbl-font-14 td {
    font-size: 14px !important;
}
#tableDiv table.tbl-font-16 td {
    font-size: 16px !important;
}
#tableDiv table.tbl-font-18 td {
    font-size: 18px !important;
}





.table {
    width: 100% !important;
    margin-bottom: 1rem !important;
    color: #59595c !important;
  }
  
  .table th,
  .table td {
    padding: 0.25rem !important;
    vertical-align: top !important;
    border-top: 1px solid #e3e6f0 !important;
    color: #59595c;
  
  }
  
  .table thead th {
    vertical-align: bottom !important;
    border-bottom: 2px solid #e3e6f0 !important;
  }
  
  .table tbody + tbody {
    border-top: 2px solid #e3e6f0 !important;
  }
  
  .table-sm th,
  .table-sm td {
    padding: 0.3rem !important;
  }
  
  .table-bordered {
    border: 1px solid #e3e6f0 !important;
  }
  
  .table-bordered th,
  .table-bordered td {
    border: 1px solid #e3e6f0;
  }
  
  .table-bordered thead th,
  .table-bordered thead td {
    border-bottom-width: 2px;
  }
  
  .table-borderless th,
  .table-borderless td,
  .table-borderless thead th,
  .table-borderless tbody + tbody {
    border: 0;
  }
  
  .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
  }
  
  .table-hover tbody tr:hover {
    color: #858796;
    background-color: rgba(0, 0, 0, 0.075);
  }
  
  .table-primary,
  .table-primary > th,
  .table-primary > td {
    background-color: #cdd8f6;
  }
  
  .table-primary th,
  .table-primary td,
  .table-primary thead th,
  .table-primary tbody + tbody {
    border-color: #a3b6ee;
  }
  
  .table-hover .table-primary:hover {
    background-color: #b7c7f2;
  }
  
  .table-hover .table-primary:hover > td,
  .table-hover .table-primary:hover > th {
    background-color: #b7c7f2;
  }
  
  .table-secondary,
  .table-secondary > th,
  .table-secondary > td {
    background-color: #dddde2;
  }
  
  .table-secondary th,
  .table-secondary td,
  .table-secondary thead th,
  .table-secondary tbody + tbody {
    border-color: #c0c1c8;
  }
  
  .table-hover .table-secondary:hover {
    background-color: #cfcfd6;
  }
  
  .table-hover .table-secondary:hover > td,
  .table-hover .table-secondary:hover > th {
    background-color: #cfcfd6;
  }
  
  .table-success,
  .table-success > th,
  .table-success > td {
    background-color: #bff0de;
  }
  
  .table-success th,
  .table-success td,
  .table-success thead th,
  .table-success tbody + tbody {
    border-color: #89e2c2;
  }
  
  .table-hover .table-success:hover {
    background-color: #aaebd3;
  }
  
  .table-hover .table-success:hover > td,
  .table-hover .table-success:hover > th {
    background-color: #aaebd3;
  }
  
  .table-info,
  .table-info > th,
  .table-info > td {
    background-color: #c7ebf1;
  }
  
  .table-info th,
  .table-info td,
  .table-info thead th,
  .table-info tbody + tbody {
    border-color: #96dbe4;
  }
  
  .table-hover .table-info:hover {
    background-color: #b3e4ec;
  }
  
  .table-hover .table-info:hover > td,
  .table-hover .table-info:hover > th {
    background-color: #b3e4ec;
  }
  
  .table-warning,
  .table-warning > th,
  .table-warning > td {
    background-color: #fceec9;
  }
  
  .table-warning th,
  .table-warning td,
  .table-warning thead th,
  .table-warning tbody + tbody {
    border-color: #fadf9b;
  }
  
  .table-hover .table-warning:hover {
    background-color: #fbe6b1;
  }
  
  .table-hover .table-warning:hover > td,
  .table-hover .table-warning:hover > th {
    background-color: #fbe6b1;
  }
  
  .table-danger,
  .table-danger > th,
  .table-danger > td {
    background-color: #f8ccc8;
  }
  
  .table-danger th,
  .table-danger td,
  .table-danger thead th,
  .table-danger tbody + tbody {
    border-color: #f3a199;
  }
  
  .table-hover .table-danger:hover {
    background-color: #f5b7b1;
  }
  
  .table-hover .table-danger:hover > td,
  .table-hover .table-danger:hover > th {
    background-color: #f5b7b1;
  }
  
  .table-light,
  .table-light > th,
  .table-light > td {
    background-color: #fdfdfe;
  }
  
  .table-light th,
  .table-light td,
  .table-light thead th,
  .table-light tbody + tbody {
    border-color: #fbfcfd;
  }
  
  .table-hover .table-light:hover {
    background-color: #ececf6;
  }
  
  .table-hover .table-light:hover > td,
  .table-hover .table-light:hover > th {
    background-color: #ececf6;
  }
  
  .table-dark,
  .table-dark > th,
  .table-dark > td {
    background-color: #d1d1d5;
  }
  
  .table-dark th,
  .table-dark td,
  .table-dark thead th,
  .table-dark tbody + tbody {
    border-color: #a9aab1;
  }
  
  .table-hover .table-dark:hover {
    background-color: #c4c4c9;
  }
  
  .table-hover .table-dark:hover > td,
  .table-hover .table-dark:hover > th {
    background-color: #c4c4c9;
  }
  
  .table-active,
  .table-active > th,
  .table-active > td {
    background-color: rgba(0, 0, 0, 0.075);
  }
  
  .table-hover .table-active:hover {
    background-color: rgba(0, 0, 0, 0.075);
  }
  
  .table-hover .table-active:hover > td,
  .table-hover .table-active:hover > th {
    background-color: rgba(0, 0, 0, 0.075);
  }
  
  .table .thead-dark th {
    color: #fff;
    background-color: #5a5c69;
    border-color: #6c6e7e;
  }
  
  .table .thead-light th {
    color: #6e707e;
    background-color: #eaecf4;
    border-color: #e3e6f0;
  }
  
  .table-dark {
    color: #fff;
    background-color: #5a5c69;
  }
  
  .table-dark th,
  .table-dark td,
  .table-dark thead th {
    border-color: #6c6e7e;
  }
  
  .table-dark.table-bordered {
    border: 0;
  }
  
  .table-dark.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .table-dark.table-hover tbody tr:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.075);
  }
  
  @media (max-width: 575.98px) {
    .table-responsive-sm {
      display: block;
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      font-size: 9px;
    }
    .table-responsive-sm > .table-bordered {
      border: 0;
    }
  }
  
  @media (max-width: 767.98px) {
    .table-responsive-md {
      display: block;
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .table-responsive-md > .table-bordered {
      border: 0;
    }
  }
  
  @media (max-width: 991.98px) {
    .table-responsive-lg {
      display: block;
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .table-responsive-lg > .table-bordered {
      border: 0;
    }
  }
  
  @media (max-width: 1199.98px) {
    .table-responsive-xl {
      display: block;
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .table-responsive-xl > .table-bordered {
      border: 0;
    }
  }
  
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-responsive > .table-bordered {
    border: 0;
  }

  .borda-esquerda-primary {
    border-left: 4px solid var(--color-tertiary);
  }
  
/* Estilo da tabela */
#tableDiv td {
    font-size: 12px !important;
    padding: 0.25rem !important;
}

@media (max-width: 575.98px) {
  #tableDiv td {
      font-size: 9px !important;
      padding: 0.25rem !important;
  }
}

.dtrg-level-0 th {
    font-size: 14px !important;
}

.dtrg-level-1 th {
    font-size: 13px !important;
}

.dtrg-level-2 th {
    font-size: 12px !important;
}

.dtrg-level-3 th {
    font-size: 11px !important; 
}

/* Expanded details */
:root {
  --dt-expanded-border-y-width: 3px;
  --dt-expanded-border-x-width: 3px;
  --border-style: solid;
  --border-color: #c4c4c4;
}

tr.dt-hasChild.row-expanded {
  border-left: var(--dt-expanded-border-x-width) var(--border-style);
  border-top: var(--dt-expanded-border-y-width) var(--border-style);
  border-right: var(--dt-expanded-border-x-width) var(--border-style);
  border-color: var(--border-color);
}

tr.row-expanded-child {
  border-left: var(--dt-expanded-border-x-width) var(--border-style);
  border-bottom: var(--dt-expanded-border-y-width) var(--border-style);
  border-right: var(--dt-expanded-border-x-width)  var(--border-style);
  border-color: var(--border-color);
}

