/* Estilos Gerais */
body {
    margin-top: 20px;
margin-right: 15px;
margin-bottom: 0px;
margin-left: 15px;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    color: #333;
}

.dashboard {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 5px;
    gap: 5px;
}

/* Seção de Detalhes e Gráficos */
.details-charts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.details {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: space-between;
    flex: 2;
    overflow: auto;
    background: white;
    padding: 5px;
    border-radius: 4px;
    margin-top: -15px;
}

.table-container {
    flex: 1;
    max-width: 100%;
    overflow: auto;
    background: white;
    border-radius: 4px;

}

/* Tabela maior */
.biggertable {
    flex: 2;
    max-width: 65%;
    min-width: 500px;
}

.table-container h2 {
    font-size: 0.8em;
    margin: 5px;
    text-align: center;
    color: #444;
}

/* Estilo das Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75em;
}

table th,
table td {
    border: 1px solid #ddd;
    padding: 3px;
    text-align: center;
}

table th {
    background-color: #ffffff;
    font-weight: 600;
}

table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Gráficos */
.charts-section {
    display: flex;
    flex-direction: column;
    align-items: center; /* Alinha os gráficos ao centro */
    gap: 5px;
    overflow: hidden;
}

.chart-container {
    padding: 5px;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
}

.chart-container canvas {
    flex: 3;
}

.chart-container .chart-legend {
    flex: 1;
    text-align: left;
    font-size: 0.75em;
    padding-left: 10px;
    color: #333;
}

.titlesmall {
    margin-top: 20px;
    font-size: 10px;
    margin-right: 5px;
    color: #666;
    font-weight: bold;
    text-align: center;
}

canvas {
    display: block;
    margin: 0 auto;
    max-height: 100px; /* Limita a altura máxima */
    width: auto; /* Ajusta a largura proporcional */
    height: 100%; /* Garante que o canvas ocupe a altura definida */
}

/* Seção de Produção */
.production-section {
    padding: 8px;
    background: white;
    border-radius: 4px;
}

.production-section h2 {
    margin-bottom: 5px;
    font-size: 0.8em;
    color: #333;
}

.categories {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    gap: 15px;
    position: relative;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.category {
    flex: 0 0 250px;
    max-width: 250px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Alinha todo o conteúdo ao fundo */
    gap: 10px; /* Espaço entre elementos internos */
}

.category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category li {
    font-size: 0.8em;
    color: #555;
    margin-bottom: 10px;
}

.category li small {
    display: block;
    font-size: 0.7em;
    color: #777;
    margin-top: 5px;
}

.category img {
    max-width: 50%;
    max-height: 100px;
    height: auto;
    margin-bottom: auto; /* Mantém as imagens no topo */
    object-fit: cover;
    border-radius: 4px;
    align-self: center; /* Centraliza horizontalmente */
}

.category h3 {
    font-size: 0.9em;
    color: #000000;
    margin-bottom: 0px; /* Reduza o espaçamento inferior */
}

.category p {
    font-size: 0.8em;
    color: #000000;
    margin: 0;
}

.progress-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    height: 20px;
}

.progress-bar {
    height: 100%;
    background-color: #292929;
    width: 0%;
    transition: width 0.3s ease;
    text-align: center;
    line-height: 20px;
    color: white;
    font-weight: bold;
    font-size: 12px;
    overflow: hidden;
}

.overdue-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 0.8em;
    overflow-y: hidden;
}

.overdue-list li {
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

.overdue-list li:last-child {
    border-bottom: none;
}

#overdue-build-orders {
    position: relative;
    overflow: hidden; /* Esconde o conteúdo que ultrapassa a área */    
    max-height: 436px; /* Altura máxima visível */
    border-bottom: 1px solid #ddd;
}

#overdue-build-orders > table {
    max-width:99.9%;
    border-bottom: 1px solid #ddd;
}

#overdue-build-orders table {
    border-collapse: collapse; /* Evita espaçamento entre as bordas */
    width: 100%;
}

#overdue-build-orders thead {
    position: sticky;
    top: 0; /* Mantém o cabeçalho fixo */
    background-color: #ffffff;
    z-index: 2;
}

#overdue-build-orders th,
#overdue-build-orders td {
    height: 0px; /* Define a altura */
    padding: 0; /* Remove padding */
    line-height: 5px; /* Alinha o texto dentro da altura */
    border: none; /* Remove bordas (se não for necessário) */
    overflow: hidden; /* Esconde conteúdo que ultrapassar a altura */
    font-size: 12px;
    font-weight: 600;
}

#overdue-build-orders tbody {
    display: block;
    animation: scroll-up 500s linear infinite;
}

#overdue-build-orders tr {
    display: table; /* Retorna o comportamento original da tabela */
    width: 100%;
    table-layout: fixed; /* Garante alinhamento fixo das colunas */
}

/* Linha para alinhar elementos */
.table-row {
    display: flex;
    justify-content: space-between; /* Espaço uniforme entre os elementos */
    align-items: center; /* Alinha verticalmente os itens ao centro */
    gap: 10px; /* Espaço entre os elementos */
}

/* Cada elemento ocupa 50% */
.table-container.halfhalf {
    flex: 1; /* Ocupa espaço igual para ambos */
    max-width: 50%; /* Limita a largura a 50% */
    background: white;
    border-radius: 4px;
    text-align: center;
}


/* Imagem no rodapé */
.footer-image {
    position:absolute;
    left:0;
    right:0;
    margin-left:auto;
    margin-right:auto;
    bottom: 15px;
    height: 30px; /* Ajuste o tamanho conforme necessário */
    width: auto;
}

@keyframes scroll-up {
    0% {
        transform: translateY(0); /* Início */
    }
    100% {
        transform: translateY(-100%); /* Rola para cima */
    }
}

