.table-wrapper-birthday {
  display: table;
  margin: auto;
}

.sticky-header thead {
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.sticky-header th {
  padding: 10px;
}
.no-results {
    text-align: center;
    font-size: 16px;
    padding: 20px;
    color: #666;
    background: #f5f5f5;
}

/* =============================
   Tabelas - Estilo Geral
============================= */


table.display,
#stocksTable,
#refacturationeieTable,
#refacturationliTable,
#facturasTable,
#rcoTable,
#gtTable,
#csoTable,
#roTable,
#efTable,
#tostockTable,
#fromstockTable,
#fsesTable,
#outrosservicosTable,
#mdeliTable,
#mdeeieTable,
#mdelrTable,
#relatoriosTable,
#attendanceTable,
#duplicatetempTable,
#reserves_to_ticketTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border-radius: 8px;
  overflow: hidden;
}

td,
th {
  padding: 1px 4px;
  text-align: center;
}

thead {
  background-color: #f2f2f2;
  border-bottom: 2px solid #ddd;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

tbody tr:hover {
  background-color: #e0e0e0;
}

th,
td {
  border-bottom: 3px groove #fff;
  padding: 12px;
  text-align: left;
}

/* Cabeçalhos Especiais */
#birthdayTable {
  margin-top: 75px;
}

#birthdayTable th,
#birthdayTable td {
  font-size: 32px;
  padding: 30px 12px;
}

/* Alinhamentos e Utilidades */
.text-left,
.td-text-left {
  text-align: left;
}

.text-right,
.td-text-right {
  text-align: right;
}

.fsi,
.text-italic {
  font-style: italic;
}

.pt-20,
.dataTables_wrapper {
  padding-top: 20px;
}

.ml-10 {
  margin-left: 10px;
}

.ml-30 {
  margin-left: 30px;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-30 {
  margin-bottom: 30px;
}

/* Sortable Headers */
th.sortable {
  cursor: pointer;
  position: relative;
  padding-left: 20px;
}

.sort-indicator {
  position: absolute;
  left: 3px;
  top: 30%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #3b185d;
}

/* Estilos Visuais por Estado */
tr.danger td {
  background-color: #ff000080;
}


tr.waiting td {
  background-color: #ffdf334a;
}

tr.warning td {
  background-color: #ff79334a;
}



/* Destaques de estado */
tr.fechado {
    background-color: #e0e0e0;
}

tr.waiting30 {
background-color:#ffe10066 !important;
}
tr.waiting60 {
    background-color: #ff800066 !important;
}

tr.waiting90 {
	background-color:#f006 !important;
}

tr.existestock {
background-color:#ffe10066
}
tr.notice {
background-color:#ffe10066 !important;
}

tr.error {
background-color:#f6acff
} 
tr.reservado {
background-color:#f6acff
}
tr.ok {
background-color:#80e10066 !important;
}
tr.reservado {
background-color:#80e10066
}
tr.pendente {
background-color:#62aeff66 !important;
}
tr.duplicada {
background-color:#d97000 !important;
}
tr.vencida {
background-color:#e15664 !important;
}

.hidden-services,
.fancybox-button svg {
  display: none;
}

/* Tabelas Interativas */
#openprojects tr.header,
#openprojects tr:hover,
#projectsft tr.header,
#projectsft tr:hover,
#projectsfat2 tr.header,
#projectsfat2 tr:hover,
#projectscso tr.header,
#projectscso tr:hover,
#projectsexp tr.header,
#projectsexp tr:hover,
#projectsorders tr.header,
#projectsorders tr:hover,
#projectsorderswait tr.header,
#projectsorderswait tr:hover,
#projectsrel tr.header,
#projectsrel tr:hover,
#guias tr.header,
#guias tr:hover,
#orderswait tr.header,
#orderswait tr:hover,
#orders tr.header,
#orders tr:hover {
  background-color: #aaa;
}

/* =============================
   Project Info - Reserva Obras
============================= */
#roTable td:nth-child(9),
#roTable th:nth-child(9) {
    display: none;
}




/* =============================
   Recomendação Material
============================= */
#material-recomendadoTable {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

/* Cabeçalho moderno */
#material-recomendadoTable thead th {
    background: #008DD2;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #006fa5;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Linhas */
#material-recomendadoTable tbody tr {
    border-bottom: 1px solid #ddd;
}

#material-recomendadoTable tbody tr:nth-child(even) {
    background: #f7f7f7;
}

/* Células */
#material-recomendadoTable td {
    padding: 10px 12px;
    vertical-align: top;
}

/* Bloco de origem */
.origem-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.origem-group div {
    background: #eef8ff;
    padding: 6px 8px;
    border-left: 3px solid #008DD2;
    border-radius: 4px;
}

.origem-group .ref {
    color: #444;
    font-size: 12px;
    margin-left: 6px;
}


/* =============================
   TECNICOS TEMPORARIOS
============================= */
.tecnicotp-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.tecnicotp-table th,
.tecnicotp-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.tecnicotp-table th {
  background-color: #f0f0f0;
  color: #333;
  font-weight: bold;
}

.tecnicotp-table tr:last-child td {
  border-bottom: none;
}

.tecnicotp-table input,
.tecnicotp-table select {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
}




/* Tabela */
.tecnicotp-table-container h3 {
  margin-bottom: 1rem;
  text-align: center;
  color: #444;
}

#tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

#tabela th,
#tabela td {
  border: 1px solid #ddd;
  text-align: center;
  padding: 8px;
}

#tabela th {
  background-color: #f2f2f2;
  font-weight: bold;
}

input[type="number"] {
  width: 60px;
  padding: 4px;
}

input[type="text"] {
  width: 100px;
  padding: 4px;
}
#tecnicotp-tabela th, #tecnicotp-tabela td {
  border: 1px solid #ccc;
  text-align: center;
  padding: 4px;  /* menos espaçamento vertical e horizontal */
}


/* Fins de semana */
.fim-de-semana {
  background-color: #f0f8ff;
}

/* Botão salvar */
#tabela button {
  padding: 4px 10px;
  background-color: #28a745;
  border: none;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

#tabela button:hover {
  background-color: #218838;
}
/* =============================
   Errors Documents
============================= */
#docerrorsTable {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    min-width: 600px;
}

/* Cabeçalho Fixo */
#docerrorsTable thead th {
    position: sticky;
    top: 0;
    background-color: #008DD2;
    color: white;
    text-align: left;
    padding: 12px;
    z-index: 2;
    font-weight: 600;
    border-bottom: 2px solid #006ca5;
}

/* Linhas da Tabela */
#docerrorsTable tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
}

/* Zebra striping */
#docerrorsTable tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Hover */
#docerrorsTable tbody tr:hover {
    background-color: #eef6fb;
}
#docerrorsTable th,
#docerrorsTable td {
    border: 1px solid #ccc;
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    white-space: pre-wrap;     /* Permite quebra de linha e preserva \n */
    word-wrap: break-word;     /* Quebra palavras longas */
    line-height: 1.6;          /* Espaçamento entre linhas dentro da célula */
    font-size: 14px;
}
/* =============================
   Relatórios em Falta
============================= */
#attendanceTable {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    min-width: 600px;
}

/* Cabeçalho Fixo */
#attendanceTable thead th {
    position: sticky;
    top: 0;
    background-color: #008DD2;
    color: white;
    text-align: left;
    padding: 12px;
    z-index: 2;
    font-weight: 600;
    border-bottom: 2px solid #006ca5;
}

/* Linhas da Tabela */
#attendanceTable tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
}

/* Zebra striping */
#attendanceTable tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Hover */
#attendanceTable tbody tr:hover {
    background-color: #eef6fb;
}
#attendanceTable th,
#attendanceTable td {
    border: 1px solid #ccc;
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    white-space: pre-wrap;     /* Permite quebra de linha e preserva \n */
    word-wrap: break-word;     /* Quebra palavras longas */
    line-height: 1.6;          /* Espaçamento entre linhas dentro da célula */
    font-size: 14px;
}
/* =============================
  Intervenções Duplicadas Temporarios
============================= */
#duplicatetempTable {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    min-width: 600px;
}

/* Cabeçalho Fixo */
#duplicatetempTable thead th {
    position: sticky;
    top: 0;
    background-color: #008DD2;
    color: white;
    text-align: left;
    padding: 12px;
    z-index: 2;
    font-weight: 600;
    border-bottom: 2px solid #006ca5;
}

/* Linhas da Tabela */
#duplicatetempTable tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
}

/* Zebra striping */
#duplicatetempTable tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Hover */
#duplicatetempTable tbody tr:hover {
    background-color: #eef6fb;
}
#duplicatetempTable th,
#duplicatetempTable td {
    border: 1px solid #ccc;
    padding: 12px 14px;
    text-align: left;
    vertical-align: midlle;
    white-space: pre-wrap;     /* Permite quebra de linha e preserva \n */
    word-wrap: break-word;     /* Quebra palavras longas */
    line-height: 0.5;          /* Espaçamento entre linhas dentro da célula */
    font-size: 14px;
}


#duplicatetempTable td:nth-child(1),
#duplicatetempTable th:nth-child(1),
#duplicatetempTable td:nth-child(2),
#duplicatetempTable th:nth-child(2) {
    display: none;
}

#duplicatetempTable .btn-delete {
  padding: 2px 6px;
  font-size: 14px;
  border: none;
  background: none;
  cursor: pointer;
  vertical-align: middle;
}
/* =============================
  Mapa Técnicos Temporarios
============================= */
#maptecnicotempTable {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    min-width: 600px;
}

/* Cabeçalho Fixo */
#maptecnicotempTable thead th {
    position: sticky;
    top: 0;
    background-color: #008DD2;
    color: white;
    text-align: left;
    padding: 12px;
    z-index: 2;
    font-weight: 600;
    border-bottom: 2px solid #006ca5;
}

/* Linhas da Tabela */
#maptecnicotempTable tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
}

/* Zebra striping */
#maptecnicotempTable tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Hover */
#maptecnicotempTable tbody tr:hover {
    background-color: #eef6fb;
}
#maptecnicotempTable th,
#maptecnicotempTable td {
    border: 1px solid #ccc;
    padding: 12px 14px;
    text-align: left;
    vertical-align: midlle;
    white-space: pre-wrap;     /* Permite quebra de linha e preserva \n */
    word-wrap: break-word;     /* Quebra palavras longas */
    line-height: 0.5;          /* Espaçamento entre linhas dentro da célula */
    font-size: 14px;
}


#maptecnicotempTable td:nth-child(11),
#maptecnicotempTable th:nth-child(11) {
    display: none;
}

#maptecnicotempTable .btn-delete {
  padding: 2px 6px;
  font-size: 14px;
  border: none;
  background: none;
  cursor: pointer;
  vertical-align: middle;
}
/* =============================
   Extra Hours
============================= */
#extrahoursTable {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    min-width: 600px;
}

/* Cabeçalho Fixo */
#extrahoursTable thead th {
    position: sticky;
    top: 0;
    background-color: #008DD2;
    color: white;
    text-align: left;
    padding: 12px;
    z-index: 2;
    font-weight: 600;
    border-bottom: 2px solid #006ca5;
}

/* Linhas da Tabela */
#extrahoursTable tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
}

/* Zebra striping */
#extrahoursTable tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Hover */
#extrahoursTable tbody tr:hover {
    background-color: #eef6fb;
}
#extrahoursTable th,
#extrahoursTable td {
    border: 1px solid #ccc;
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    white-space: pre-wrap;     /* Permite quebra de linha e preserva \n */
    word-wrap: break-word;     /* Quebra palavras longas */
    line-height: 1.6;          /* Espaçamento entre linhas dentro da célula */
    font-size: 14px;
}
/* =============================
   Events Log
============================= */
#eventslogTable {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    min-width: 600px;
}

/* Cabeçalho Fixo */
#eventslogTable thead th {
    position: sticky;
    top: 0;
    background-color: #008DD2;
    color: white;
    text-align: left;
    padding: 12px;
    z-index: 2;
    font-weight: 600;
    border-bottom: 2px solid #006ca5;
}

/* Linhas da Tabela */
#eventslogTable tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
}

/* Zebra striping */
#eventslogTable tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Hover */
#eventslogTable tbody tr:hover {
    background-color: #eef6fb;
}
#eventslogTable th,
#eventslogTable td {
    border: 1px solid #ccc;
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    white-space: pre-wrap;     /* Permite quebra de linha e preserva \n */
    word-wrap: break-word;     /* Quebra palavras longas */
    line-height: 1.6;          /* Espaçamento entre linhas dentro da célula */
    font-size: 14px;
}

/* =============================
   ESTILO GERAL (DESKTOP)
============================= */


/* Estilo para input de busca */
.search-container input[type="text"] {
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 250px;
    margin-top: 5px;
}

/* Mensagem de resultado */
#resultCount {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* =============================
   Tabela Ferramentas
============================= */

#ferramentasTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
}

#ferramentasTable thead {
    background-color: #008dd2; /* azul corporativo */
    color: white;
    position: sticky;
    top: 0;
    z-index: 2;
}

#ferramentasTable th,
#ferramentasTable td {
    padding: 10px 12px;
    border-bottom: 1px solid #ccc;
    line-height: 1.6;
    text-align: left;
    white-space: normal;
    vertical-align: middle;
}

#ferramentasTable tbody tr:hover {
    background-color: #f1f1f1;
}





/* =============================
   Reserves to Process
============================= */

/* Tabela base */
#reserves_to_ticketTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#reserves_to_ticketTable thead {
    position: sticky;
    top: 0;
    background-color: #008dd2 !important;
    z-index: 2;
}

#reserves_to_ticketTable thead tr {
    border-bottom: 2px solid #ccc;
}

#reserves_to_ticketTable th,
#reserves_to_ticketTable td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

/* Zebra striping */
#reserves_to_ticketTable tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* Hover */
#reserves_to_ticketTable tbody tr:hover {
    background-color: #f0f0f0;
}

/* Estilo de cabeçalhos clicáveis */
#reserves_to_ticketTable th.sortable {
    cursor: pointer;
    user-select: none;
    color: #333;
    font-weight: 600;
}

#reserves_to_ticketTable td:nth-child(1),
#reserves_to_ticketTable th:nth-child(1) {
    display: none;
}
/* =============================
   Compras
============================= */

#ordersTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#ordersTable thead {
    position: sticky;
    top: 0;
     background-color: #008dd2 !important;
    z-index: 10;
}

#ordersTable thead tr {
    border-bottom: 2px solid #ccc;
}

#ordersTable th,
#ordersTable td {
    padding: 0.75rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #eee;
}

#ordersTable th {
    color: #333;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 0;
	font-size: 12px;
	text-wrap: wrap;
}
#ordersTable tr {
	font-size: 11px;
}
#ordersTable tr:nth-child(even) {
    background-color: #fafafa;
}

#ordersTable tr:hover {
    background-color: #f1f1f1;
}


#ordersTable tr.ok td {
  background-color: #00ff334a;
}

#ordersTable td:nth-child(3),
#ordersTable th:nth-child(3),
#ordersTable td:nth-child(15),
#ordersTable th:nth-child(15),
#ordersTable td:nth-child(16),
#ordersTable th:nth-child(16),
#ordersTable td:nth-child(18),
#ordersTable th:nth-child(18) {
    display: none;
}
/* =============================
   ProbAdjudicacaoClientevendasTable
============================= */

#ProbAdjudicacaoClientevendasTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#ProbAdjudicacaoClientevendasTable thead {
    position: sticky;
    top: 0;
     background-color: #008dd2 !important;
    z-index: 10;
}

#ProbAdjudicacaoClientevendasTable thead tr {
    border-bottom: 2px solid #ccc;
}

#ProbAdjudicacaoClientevendasTable th,
#ProbAdjudicacaoClientevendasTable td {
    padding: 0.75rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #eee;
}

#ProbAdjudicacaoClientevendasTable th {
    color: #333;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 0;
	font-size: 12px;
	text-wrap: wrap;
}
#ProbAdjudicacaoClientevendasTable tr {
	font-size: 11px;
}
#ProbAdjudicacaoClientevendasTable tr:nth-child(even) {
    background-color: #fafafa;
}

#ProbAdjudicacaoClientevendasTable tr:hover {
    background-color: #f1f1f1;
}


#ProbAdjudicacaoClientevendasTable tr.ok td {
  background-color: #00ff334a;
}
/* =============================
   Lista Controlo Projectos
============================= */

#controlprojectTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#controlprojectTable thead {
    position: sticky;
    top: 0;
     background-color: #008dd2 !important;
    z-index: 10;
}

#controlprojectTable thead tr {
    border-bottom: 2px solid #ccc;
}

#controlprojectTable th,
#controlprojectTable td {
    padding: 0.75rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #eee;
}

#controlprojectTable th {
    color: #333;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 0;
	font-size: 12px;
	text-wrap: wrap;
}
#controlprojectTable tr {
	font-size: 11px;
}
#controlprojectTable tbody tr.alert {
background-color:#f006
}
#controlprojectTable tbody tr.warning {
background-color:#ff800066
}
#controlprojectTable tbody tr.notice {
background-color:#ffe10066
}
#controlprojectTable tbody tr.error {
background-color:#f6acff
} 
#controlprojectTable tbody tr.ok {
background-color:#80e10066
}

#controlprojectTable td:nth-child(16),
#controlprojectTable th:nth-child(16), 
#controlprojectTable td:nth-child(17),
#controlprojectTable th:nth-child(17), 
#controlprojectTable td:nth-child(18),
#controlprojectTable th:nth-child(18),
#controlprojectTable td:nth-child(19),
#controlprojectTable th:nth-child(19) {
    display: none;
}
/* =============================
   Projectos Pipeline
============================= */
/* --- SORT ICONS MODERNOS --- */
#projectpipelineTable th {
  position: relative;
  cursor: pointer;
  user-select: none;
  padding-right: 20px;
}

#projectpipelineTable th::after {
  content: "⇅";
  position: absolute;
  right: 5px;
  font-size: 0.8rem;
  color: #ccc;
  transition: 0.2s;
}

#projectpipelineTable th.sorted-asc::after {
  content: "▲";
  color: #008dd2;
}

#projectpipelineTable th.sorted-desc::after {
  content: "▼";
  color: #008dd2;
}

#projectpipelineTable th:hover::after {
  color: #666;
}

#projectpipelineTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px; /* 🔹 reduz fonte geral da tabela */
}

#projectpipelineTable thead {
    position: sticky;
    top: 0;
    background-color: #008dd2 !important;
    z-index: 10;
}

#projectpipelineTable thead tr {
    border-bottom: 2px solid #ccc;
}

#projectpipelineTable th,
#projectpipelineTable td {
    padding: 0.6rem; /* ligeiramente menor para combinar com a nova fonte */
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #eee;
}

#projectpipelineTable th {
    color: #333;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 0;
    font-size: 10px; /* 🔹 cabeçalho também em 10px */
    text-wrap: wrap;
}

#projectpipelineTable tr {
    font-size: 10px; /* 🔹 linhas em 10px */
}

/* Esconde primeira coluna */
#projectpipelineTable td:nth-child(1),
#projectpipelineTable th:nth-child(1) {
    display: none;
}

/* Inputs */
#projectpipelineTable input.table-input {
    width: 70px;
    height: 26px;
    padding: 2px 4px;
    font-size: 10px; /* 🔹 inputs em 10px */
    line-height: 1.2;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    text-align: right;
}

/* Selects */
#projectpipelineTable select.form-control {
    height: 26px;
    padding: 2px 4px;
    font-size: 10px; /* 🔹 selects em 10px */
    line-height: 1.2;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    width: 100%;
    box-sizing: border-box;
}

/* Alinhar valores numéricos à direita */
#projectpipelineTable td:nth-child(11),
#projectpipelineTable td:nth-child(12),
#projectpipelineTable td:nth-child(13),
#projectpipelineTable td:nth-child(14),
#projectpipelineTable td:nth-child(15) {
    text-align: right;
}

/* Números uniformes */
#projectpipelineTable td {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
}

/* Margem destacada */
#projectpipelineTable td:nth-child(15) {
    font-weight: 600;
    color: #008dd2;
}

/* Largura colunas específicas */
#projectpipelineTable td:nth-child(2),
#projectpipelineTable th:nth-child(2) {
    max-width: 450px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#projectpipelineTable td:nth-child(3),
#projectpipelineTable th:nth-child(3) {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#projectpipelineTable td:nth-child(15),
#projectpipelineTable th:nth-child(15) {
    max-width: 52px;
}

/* =============================
   Facturação
============================= */

#facturationTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#facturationTable thead {
    position: sticky;
    top: 0;
     background-color: #008dd2 !important;
    z-index: 10;
}

#facturationTable thead tr {
    border-bottom: 2px solid #ccc;
}

#facturationTable th,
#facturationTable td {
    padding: 0.75rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #eee;
}

#facturationTable th {
    color: #333;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 0;
	font-size: 12px;
	text-wrap: wrap;
}
#facturationTable tr {
	font-size: 11px;
}
#facturationTable tr:nth-child(even) {
    background-color: #fafafa;
}

#facturationTable tr:hover {
    background-color: #f1f1f1;
}
/* =============================
   Lista de Projectos
============================= */

#projectsTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#projectsTable thead {
    position: sticky;
    top: 0;
     background-color: #008dd2 !important;
    z-index: 10;
}

#projectsTable thead tr {
    border-bottom: 2px solid #ccc;
}

#projectsTable th,
#projectsTable td {
    padding: 0.75rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #eee;
}

#projectsTable th {
    color: #333;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 0;
	font-size: 12px;
	text-wrap: wrap;
}
#projectsTable tr {
	font-size: 11px;
}
#projectsTable tr:nth-child(even) {
    background-color: #fafafa;
}

#projectsTable tr:hover {
    background-color: #f1f1f1;
}

/* =============================
   Stocks Count
============================= */

#stockscountTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#stockscountTable thead {
    position: sticky;
    top: 0;
    background-color: #008dd2 !important;
    z-index: 10;
}

#stockscountTable thead tr {
    border-bottom: 2px solid #ccc;
}

#stockscountTable th,
#stockscountTable td {
    padding: 0.75rem;
    white-space: nowrap;
    border-bottom: 1px solid #eee;
}

#stockscountTable th {
    color: #333;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 0;
    font-size: 12px;
}

#stockscountTable tr {
    font-size: 11px;
}

#stockscountTable tr:nth-child(even) {
    background-color: #fafafa;
}

/* -----------------------------
   Alinhamento por coluna
------------------------------ */

/* Colunas 3 e 4 → centro */
#stockscountTable td:nth-child(3),
#stockscountTable th:nth-child(3),
#stockscountTable td:nth-child(4),
#stockscountTable th:nth-child(4) {
    text-align: center;
}

/* Colunas 5,6,7,8,9 → à direita */
#stockscountTable td:nth-child(5),
#stockscountTable th:nth-child(5),
#stockscountTable td:nth-child(6),
#stockscountTable th:nth-child(6),
#stockscountTable td:nth-child(7),
#stockscountTable th:nth-child(7),
#stockscountTable td:nth-child(8),
#stockscountTable th:nth-child(8),
#stockscountTable td:nth-child(9),
#stockscountTable th:nth-child(9) {
    text-align: right;
}


/* =============================
   Stocks
============================= */

#stocksTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#stocksTable thead {
    position: sticky;
    top: 0;
     background-color: #008dd2 !important;
    z-index: 10;
}

#stocksTable thead tr {
    border-bottom: 2px solid #ccc;
}

#stocksTable th,
#stocksTable td {
    padding: 0.75rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #eee;
}

#stocksTable th {
    color: #333;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 0;
	font-size: 12px;
}
#stocksTable tr {
	font-size: 11px;
}
#stocksTable tr:nth-child(even) {
    background-color: #fafafa;
}

#stocksTable tr:hover {
    background-color: #f1f1f1;
}


#stocksTable tr.ok td {
  background-color: #00ff334a;
}

#stocksTable tr.alert_st_min td {
  background-color: #8b008b4a;
}

#stocksTable tr.alert_mono td {
  background-color: #483d8b4a;
}

#stocksTable td:nth-child(8),
#stocksTable th:nth-child(8),
#stocksTable td:nth-child(9),
#stocksTable th:nth-child(9),
#stocksTable td:nth-child(13),
#stocksTable th:nth-child(13),
#stocksTable td:nth-child(14),
#stocksTable th:nth-child(14),
#stocksTable td:nth-child(15),
#stocksTable th:nth-child(15),
#stocksTable td:nth-child(16),
#stocksTable th:nth-child(16),
#stocksTable td:nth-child(19),
#stocksTable th:nth-child(19),
#stocksTable td:nth-child(21),
#stocksTable th:nth-child(21) {
    display: none;
}

#stocksTable .mono {
    background-color: #c46c70;
    font-weight: bold;
}

#stocksTable .stnegativo {
    background-color: #fb353e;
}

#stocksTable .stminalert {
    background-color: #fb8f35;
}
/* =============================
   Reservas de Obra - Estilo
============================= */


/* Tabela principal */
#reservationsTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
}

#reservationsTable thead {
    background-color: #008dd2;
    color: white;
    position: sticky;
    top: 0;
    z-index: 2;
}

#reservationsTable th,
#reservationsTable td {
    padding: 10px 12px;
    border-bottom: 1px solid #ccc;
    text-align: left;
    vertical-align: middle;
    white-space: normal;
}

#reservationsTable tbody tr:hover {
    background-color: #f1f1f1;
}

/* Oculta a 7ª e 8ª colunas (índices baseados em zero: td:nth-child(7), td:nth-child(8)) */
#reservationsTable td:nth-child(8),
#reservationsTable th:nth-child(8),
#reservationsTable td:nth-child(9),
#reservationsTable th:nth-child(9) {
    display: none;
}

/* =============================
   Tabela Receção Guias
============================= */

#receptionTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
}

#receptionTable thead {
    background-color: #008dd2;
    color: white;
    position: sticky;
    top: 0;
    z-index: 2;
}

#receptionTable th,
#receptionTable td {
    padding: 10px 12px;
    border-bottom: 1px solid #ccc;
    line-height: 1.6;
    text-align: left;
    white-space: normal;
    vertical-align: middle;
}

#receptionTable tbody tr:hover {
    background-color: #f1f1f1;
}
/* =============================
   Tabela Tickets
============================= */


#ticketTable,
.table-ticket {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto; 
   
}

#ticketTable thead,
.table-ticket thead {
    background-color: #008dd2 !important;
    position: sticky;
    top: 0;
    z-index: 2;
}

#ticketTable th,
.table-ticket th,
#ticketTable td,
.table-ticket td {
    padding: 10px 12px;
    border-bottom: 1px solid #ccc;
    line-height: 1.6;
    text-align: left;
    white-space: normal; /* Permite quebra de linha */
}

.table-ticket tbody tr.isoverdue {
  background-color: #ff000080;
}
.table-ticket tbody tr.delivered {
  background-color: #00d800;
}

.table-ticket tbody tr.collected {
  background-color: #ccf7cc;
}

.table-ticket tbody tr.transit {
  background-color: #75afdc;
}

.table-ticket th {
  background-color: #f2f2f2;
  font-size: 16px;
  padding: 10px;
}

.table-ticket td {
  font-size: 14px;
  padding: 2px 5px;
}

.table-ticket tbody tr:hover {
  background-color: #f1f1f1;
}

.table-ticket th:nth-child(9),
.table-ticket td:nth-child(9) {
  display: none;
}




.table-wrapper {
    overflow-y: auto;
    max-height: 75vh;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}




/* Container geral */
#controlo-mdo-interna-custo {
  padding: 20px;
  
  background-color: #f9f9f9;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  #max-width: 1000px;
  margin: 20px auto;
}



/* Títulos */
#controlo-mdo-interna-custo h3 {
  margin-bottom: 5px;
  color: #008DD2;
}

#controlo-mdo-interna-custo h4 {
  margin-top: 0;
  margin-bottom: 20px;
  font-weight: normal;
  color: #555;
}

/* Container da tabela */
.container-mdo-interna-custo {
  background-color: #fff;
  padding: 15px;
  border-radius: 6px;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.05);
}

/* Loading spinner container */
#loadingSpinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

/* Spinner SVG */
.loading .spinner {
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Table wrapper para overflow */
.table-wrapper {
  overflow-x: auto;
}

/* Tabela */
#mdo-interna-custoTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 600px;
}

/* Cabeçalho da tabela */
#mdo-interna-custoTable thead tr {
  background-color: #008DD2; !important
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Cabeçalhos fixos e clicáveis */
#mdo-interna-custoTable th {
  padding: 10px 15px;
  text-align: left;
  cursor: default;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* Linhas da tabela */
#mdo-interna-custoTable tbody tr:nth-child(even) {
  background-color: #f3f7fb;
}

#mdo-interna-custoTable tbody tr:hover {
  background-color: #dbe9f8;
}

/* Células da tabela */
#mdo-interna-custoTable td {
  padding: 10px 15px;
  border-bottom: 1px solid #e0e0e0;
  white-space: nowrap;
}

/* Status divergente */
td span[style*="color:red"] {
  color: #d93025;
  font-weight: 700;
}
/* Cabeçalho alinhado à esquerda */
#mdo-interna-custoTable thead th {
  text-align: center;
}

/* Células alinhadas à direita */
#mdo-interna-custoTable tbody td {
  text-align: right;
}






