/* Estilos Gerais e Tema de Cores */
:root {
    --primary-color: #2c5b36; /* Verde escuro para a navegação */
    --secondary-color: #4a935a; /* Verde mais claro para botões e links */
    --background-color: #f4f7f6; /* Fundo levemente acinzentado/esverdeado */
    --card-bg-color: #ffffff;
    --text-color: #333;
    --border-radius: 8px;
}

/* Habilita a rolagem suave para a página inteira */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1;
}

/* Animação de entrada suave */
.animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

/* Navegação */
.navbar.bg-dark {
    background-color: var(--primary-color) !important;
}

/* Botões com Efeitos */
.btn {
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.btn:hover, .btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Cards */
.card, .alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.card-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* Rodapé */
.footer {
    padding: 1rem 0;
    background-color: #e9ecef;
    text-align: center;
    color: #6c757d;
    margin-top: 40px;
    border-top: 1px solid #dee2e6;
    width: 100%;
}

/* --- Botão Voltar ao Topo --- */
#backToTopBtn {
    display: none; /* Inicia oculto */
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.3s;
}

#backToTopBtn:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

/* --- NOVO: Botão de Alertas Fixo --- */
#alertBtn {
    display: none; /* Começa oculto e é exibido via JS se houver alertas */
    position: fixed;
    bottom: 20px;
    left: 30px;
    z-index: 1050;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    line-height: 60px;
    padding: 0;
    text-align: center;
}

#alertBtn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
}

/* --- NOVO: Estilos para o Modal de Alertas --- */
.modal-body .table {
    margin-bottom: 0;
}
.modal-body h5 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--background-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}


/* --- MEDIA QUERIES PARA RESPONSIVIDADE --- */

/* Para telas pequenas (celulares) */
@media (max-width: 767.98px) {
    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    .form-inline .form-group {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
    .form-inline .btn {
        width: 100%;
    }
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }
    .d-flex .btn {
        margin-top: 1rem;
    }
}

/* Estilos para Impressão */
@media print {
    body.printing .navbar,
    body.printing .btn,
    body.printing #secao-aplicar-remedio,
    body.printing .footer,
    body.printing form,
    body.printing #backToTopBtn,
    body.printing #alertBtn {
        display: none !important;
    }
    body.printing #area-imprimivel {
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
}

/* Estilos para Pop-ups (SweetAlert2 e Toastr) */
.swal2-popup, .toast {
    border-radius: var(--border-radius) !important;
}
.swal2-title {
    color: var(--primary-color) !important;
}
#toast-container > .toast-warning {
    background-image: none !important;
    background-color: #f89406 !important;
}
.btn-toast {
    background-color: rgba(0,0,0,0.2);
    color: white;
    padding: 5px 10px;
    margin-top: 10px;
    display: inline-block;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}
.btn-toast:hover {
    background-color: rgba(0,0,0,0.4);
    color: white;
}
/* custom-styles.css (adicionar ao final do arquivo) */

/* --- Estilos da Timeline --- */
.timeline {
    position: relative;
    padding: 20px 0;
    list-style: none;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 4px;
    background: #e9ecef;
}

.timeline-item {
    margin-bottom: 20px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 3px solid #e9ecef;
    z-index: 1;
}

.timeline-content {
    margin-left: 65px;
    background: #fff;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
}

.timeline-content:before {
    content: '';
    position: absolute;
    top: 15px;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #fff;
}

.timeline-date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
    display: block;
}

.timeline-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.timeline-text {
    font-size: 0.9rem;
    color: #6c757d;
}
/* custom-styles.css (adicionar ao final do arquivo) */

/* Efeito de rotação para o ícone de expandir na tabela de baias */
.clickable-row .fa-chevron-right {
    transition: transform 0.2s ease-in-out;
}
.clickable-row[aria-expanded="true"] .fa-chevron-right {
    transform: rotate(90deg);
}