/* Arquivo: assets/css/dashboard-styles.css */
.intelreg-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: auto;
    gap: 20px;
    padding: 20px 0;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* Estilos específicos para o KPI */
.kpi-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.kpi-card h2 {
    font-size: 1.1em;
    color: #616161;
    margin-bottom: 5px;
}

.kpi-card p {
    font-size: 3em;
    font-weight: 700;
    color: #3F51B5;
    margin-top: 5px;
}

/* Estilos para os gráficos */
.chart-card {
    height: 350px; 
    display: flex;
    flex-direction: column;
}

.chart-card h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: #333;
    padding-bottom: 10px;
}

/* Faz o gráfico de alerta ocupar a largura total do grid */
.chart-full-width {
    grid-column: 1 / -1; 
    height: 400px;
}

/* Media query para responsividade em telas menores */
@media (max-width: 900px) {
    .intelreg-dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    .chart-full-width {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .intelreg-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-card {
        height: auto !important;
    }
}

/* Estilos para o Chatbot */
#intelreg-chatbot-container {
    max-width: 600px;
    margin: 40px auto;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background-color: #fff;
    font-family: Arial, sans-serif;
}

#chat-history {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
}

.message {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 15px;
    max-width: 80%;
    line-height: 1.4;
    white-space: pre-wrap; /* Preserva quebras de linha */
}

.user-message {
    background-color: #3F51B5; /* Índigo */
    color: white;
    margin-left: auto; /* Alinha à direita */
    border-bottom-right-radius: 3px;
}

.bot-message {
    background-color: #e0e7ff; /* Azul claro */
    color: #333;
    margin-right: auto; /* Alinha à esquerda */
    border-bottom-left-radius: 3px;
}

.loading-message {
    background-color: #ffc107;
    color: #333;
    animation: pulse 1.5s infinite; /* Efeito para mostrar que está pensando */
}

#chat-form {
    display: flex;
    padding: 15px;
}

#chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px 0 0 20px;
    outline: none;
}

#chat-submit-btn {
    padding: 10px 20px;
    border: none;
    background-color: #4CAF50; /* Verde */
    color: white;
    cursor: pointer;
    border-radius: 0 20px 20px 0;
    transition: background-color 0.3s;
}

#chat-submit-btn:hover:not(:disabled) {
    background-color: #45a049;
}

#chat-submit-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* Animação para o estado "Pensando" */
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}
