/* Estilos para a página de logs */

/* Como o navbar não é mais fixo, não precisamos de padding-top no body */
body {
    padding-top: 0;
}

.container.mt-5.pt-5 {
    margin-top: 1.5rem !important;
    padding-top: 1.5rem !important;
}

/* Ajuste adicional para a tabela */
.card.mb-4.mt-4 {
    margin-top: 1.5rem !important;
}

/* Badges para tipos de operação com cores vibrantes */
.badge {
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    display: inline-block;
    color: white;
    text-align: center;
}

.badge-primary {
    background-color: #0d6efd;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.badge-success {
    background-color: #198754;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #000;
}

.badge-info {
    background-color: #0dcaf0;
    color: #000;
}

/* Estilos específicos para operações */
.badge-lavadora, 
[class*="liberacao_lavadora"] {
    background-color: #0d6efd;
    color: white;
}

.badge-secadora, 
[class*="liberacao_secadora"] {
    background-color: #ffc107;
    color: #000;
}

.badge-dosadora, 
[class*="acionamento_dosadora"] {
    background-color: #0dcaf0;
    color: #000;
}

.badge-reset {
    background-color: #dc3545;
    color: white;
}

/* Estilos para os cards */
.card-filtros {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-filtros .card-header {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Estilos para os inputs de data */
.date-input-group {
    position: relative;
}

.date-input-group .clear-date {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    z-index: 10;
}

.date-input-group .clear-date:hover {
    color: #343a40;
}

/* Tabela de registros */
.table-registros th {
    font-weight: 600;
    white-space: nowrap;
}

.table-registros td {
    vertical-align: middle;
}

/* Modal de detalhes */
.detalhes-header {
    background-color: #f8f9fa;
    padding: 1rem;
    margin: -1rem -1rem 1rem -1rem;
    border-radius: 0.3rem 0.3rem 0 0;
}

.detalhes-item {
    margin-bottom: 0.5rem;
}

.detalhes-label {
    font-weight: 600;
    color: #6c757d;
}

.detalhes-valor {
    font-weight: 400;
}

/* Código de configuração */
.configuracao-code {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 0.25rem;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    white-space: pre;
}

/* Responsividade */
@media (max-width: 768px) {
    .row-filtros .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .card-filtros .card-body {
        padding: 1rem 0.75rem;
    }
}

/* Animações */
.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* DataTables personalizações */
.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 0;
}

.dataTables_filter input {
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    padding: 0.25rem 0.5rem;
}

.dataTables_length select {
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    padding: 0.25rem 1.5rem 0.25rem 0.5rem;
}

/* Estilos para o botão de voltar */
.btn-voltar {
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    font-weight: 500;
    color: #212529;
    transition: all 0.2s ease-in-out;
}

.btn-voltar:hover {
    background-color: #e9ecef;
    color: #000;
    text-decoration: none;
}

.btn-voltar i {
    margin-right: 0.5rem;
}

/* Estilo para a tabela de registros */
#tabelaRegistros {
    width: 100%;
    border-collapse: collapse;
}

#tabelaRegistros th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
}

#tabelaRegistros td {
    padding: 10px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

#tabelaRegistros tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Estilo para os botões de limpar data */
.input-group-append .clear-date {
    cursor: pointer;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* Estilos para o modal de detalhes */
.modal-detalhes .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-detalhes .list-group-item {
    padding: 12px 20px;
    border-color: #eee;
}

.modal-detalhes pre {
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

/* Estilo para botão de recarregar */
#btnRecarregarTabela {
    margin-left: 10px;
}

/* Estilo para blocos de código */
.code-block {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    padding: 10px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

/* Estilo para mensagens de erro ou sem registros */
.empty-state {
    padding: 2rem 0;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .card-filtros .form-group {
        margin-bottom: 1rem;
    }
    
    .botoes-acao {
        margin-top: 1rem;
        display: flex;
        justify-content: space-between;
    }
    
    #tabelaRegistros th, 
    #tabelaRegistros td {
        padding: 8px 10px;
    }
}

/* Ajustes para a tabela e seus cabeçalhos */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

/* Garantir que o conteúdo da tabela não seja escondido pelo cabeçalho fixo */
.dataTables_wrapper .dataTable {
    margin-top: 0 !important;
}

/* Ajustes para cabeçalhos da tabela */
.dataTables_wrapper .dataTable thead th {
    position: sticky;
    top: 56px;
    z-index: 10;
    background-color: #f8f9fa;
}

/* Garantir que o conteúdo seja visível abaixo do cabeçalho */
.dataTables_wrapper .dataTable tbody td {
    vertical-align: middle;
    max-height: none;
    overflow: visible;
}

/* Estilos específicos para a página de logs */

/* Tabela de logs */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Em telas pequenas, reduzir o tamanho da fonte */
@media screen and (max-width: 768px) {
    #logsTable {
        font-size: 0.85rem;
    }
    
    #logsTable th,
    #logsTable td {
        padding: 0.5rem;
        white-space: nowrap;
    }
}

/* Detalhes do modal */
.field-name {
    font-weight: bold;
    margin-right: 8px;
}

.code-block {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
} 