/* Variáveis de cores - Paleta Elotech */
:root {
    --elotech-primary: #00379B;     /* Azul principal */
    --elotech-secondary: #0094FF;   /* Azul secundário */
    --elotech-accent: #FF6C00;      /* Laranja accent */
    --elotech-light: #F5F9FF;       /* Azul claro para fundos */
    --elotech-dark: #1A2740;        /* Azul escuro quase preto */
    --elotech-success: #009E4F;     /* Verde sucesso */
    --elotech-warning: #FBAB18;     /* Amarelo alerta */
    --elotech-danger: #DB3B3B;      /* Vermelho erro */
    --elotech-text: #424F66;        /* Texto principal */
    --elotech-gray: #E9ECF2;        /* Cinza claro para bordas e separadores */
}

/* Estilos gerais */
html, body {
    height: 100%;
    min-height: 100%;
}

body {
    background-color: var(--elotech-light);
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--elotech-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1 0 auto;
}

/* Header e navegação */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 55, 155, 0.2);
    padding: 0.6rem 1rem;
    background: linear-gradient(90deg, var(--elotech-primary) 0%, var(--elotech-secondary) 100%);
    margin-bottom: 1rem;
}

.navbar-dark {
    background: var(--elotech-primary);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
    padding: 0.25rem 0;
    font-size: 1.1rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 0 0.15rem;
    font-size: 0.9rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* Cards e containers */
.container {
    padding: 1.2rem;
}

.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
    background-color: white;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--elotech-gray);
    padding: 1rem 1.2rem;
    border-radius: 8px 8px 0 0 !important;
    font-weight: 500;
}

.card-header h5 {
    color: var(--elotech-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0;
}

.card-body {
    padding: 1.2rem;
}

.header-container {
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 55, 155, 0.1);
    margin-bottom: 1.5rem;
}

/* Botões */
.btn-primary {
    background-color: #0d6efd;
    border: none;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 55, 155, 0.25);
    transition: all 0.2s ease;
}

.btn-primary:hover, 
.btn-primary:focus {
    background-color: #0b5ed7;
    box-shadow: 0 6px 15px rgba(0, 55, 155, 0.35);
    transform: translateY(-2px);
}

/* Títulos e textos */
h2 {
    color: var(--elotech-primary);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

#pageTitle {
    font-size: 1.5rem;
    color: var(--elotech-primary);
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.text-muted {
    color: #7E8596 !important;
    font-weight: 400;
    font-size: 0.9rem;
}

/* Tabelas */
.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 55, 155, 0.05);
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-top: none;
    padding: 0.75rem 1rem;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

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

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.status-normal {
    background-color: rgba(0, 158, 79, 0.15);
    color: var(--elotech-success);
    border: 1px solid rgba(0, 158, 79, 0.3);
}

.status-warning {
    background-color: rgba(251, 171, 24, 0.15);
    color: var(--elotech-warning);
    border: 1px solid rgba(251, 171, 24, 0.3);
}

.status-danger {
    background-color: rgba(219, 59, 59, 0.15);
    color: var(--elotech-danger);
    border: 1px solid rgba(219, 59, 59, 0.3);
}

/* Formulários e inputs */
.form-control {
    border-radius: 6px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--elotech-gray);
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--elotech-secondary);
    box-shadow: 0 0 0 3px rgba(0, 148, 255, 0.15);
}

.input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

/* Switch de atualização */
.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label {
    font-weight: 500;
    color: var(--elotech-primary);
}

/* Loading e status */
#loadingIndicator {
    min-height: 200px;
    padding: 3rem 0;
}

.spinner-border {
    color: var(--elotech-secondary) !important;
    width: 3rem;
    height: 3rem;
}

#statusConsulta {
    font-size: 0.85rem;
    color: var(--elotech-text);
    background-color: var(--elotech-light);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
}

/* Alerts e mensagens */
.alert-danger {
    background-color: rgba(219, 59, 59, 0.1);
    border: none;
    color: var(--elotech-danger);
    border-radius: 8px;
    padding: 1rem 1.5rem;
}

/* Logs */
#tbodyLogs .success {
    color: var(--elotech-success);
}

#tbodyLogs .error {
    color: var(--elotech-danger);
}

/* Animação para atualização */
@keyframes fadeUpdate {
    0% { background-color: rgba(0, 148, 255, 0.15); }
    100% { background-color: transparent; }
}

.row-updated {
    animation: fadeUpdate 2s ease-out;
}

/* Footer */
footer {
    flex-shrink: 0;
    background-color: white !important;
    box-shadow: 0 -2px 10px rgba(0, 55, 155, 0.1);
    padding: 1rem 0 !important;
    /* position: sticky; */
    bottom: 0;
    width: 100%;
}

footer p {
    color: var(--elotech-text) !important;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .card-header, .card-body {
        padding: 1rem;
    }
    
    .table th, .table td {
        padding: 0.75rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    #pageTitle {
        font-size: 1.5rem;
    }
}

/* Estilos para os botões flutuantes */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.floating-buttons .btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.floating-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.floating-buttons .btn i {
    font-size: 1.2rem;
}

/* Animação para o botão voltar ao topo */
#btnVoltarTopo {
    display: none;
}

#btnVoltarTopo.visible {
    display: flex;
}

.filtros-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.filtro-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filtro-item label {
    font-weight: 500;
    color: #495057;
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Inputs e selects */
input[type="text"],
select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Estilos aprimorados para filtros e tabelas */
.form-label {
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #495057;
}

.form-select:focus, .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn {
    font-weight: 500;
    padding: 0.375rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

.elotech-conditional {
    padding: 10px 0;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

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

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

/* Responsividade */
@media (max-width: 768px) {
    .row > div {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        border-radius: 0 0 8px 8px;
    }
} 