/* AgroAvalIA - Master Style Corrigido e Blindado */
:root {
    --verde-safra: #2E7D32;
    --azul-tech: #1976D2;
    --cinza-industrial: #455A64;
    --fundo-site: #F4F7F6;
    --branco: #FFFFFF;
    --texto-principal: #2C3E50;
    --texto-secundario: #7F8C8D;
    --sombra-card: 0 4px 15px rgba(0,0,0,0.1);
    --raio-borda: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Roboto', sans-serif; background: var(--fundo-site); color: var(--texto-principal); line-height: 1.6; }
.main-container { padding: 30px; max-width: 1400px; margin: 0 auto; }

/* --- HEADER MASTER (CORRIGIDO PARA NÃO QUEBRAR) --- */
.header-master {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    background: var(--branco); 
    padding: 0 30px; /* Ajustado para dar mais espaço */
    height: 80px;   /* Altura fixa para manter o padrão */
    border-bottom: 4px solid var(--verde-safra);
    flex-wrap: nowrap; /* IMPEDE A QUEBRA */
    gap: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Container de Links de Navegação */
.nav-links {
    display: flex;
    gap: 10px; /* Espaço entre os botões */
    align-items: center;
    flex-wrap: nowrap; /* Garante que os botões fiquem lado a lado */
}

/* Ajuste nos links do menu para caberem melhor */
.nav-links a, .nav-links button {
    white-space: nowrap; /* Impede que o texto do botão quebre em duas linhas */
    font-size: 0.85rem;   /* Ajuste leve no tamanho da fonte */
    padding: 0 15px;      /* Reduz o respiro interno para caber tudo */
    height: 45px;         /* Botões um pouco mais baixos no menu */
}

/* --- DASHBOARD GRID --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    align-items: start;
}

/* --- CARDS --- */
.card {
    background: var(--branco);
    padding: 25px;
    border-radius: var(--raio-borda);
    box-shadow: var(--sombra-card);
    border-top: 5px solid var(--azul-tech);
    min-width: 0; 
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card h3 { margin-bottom: 15px; color: var(--cinza-industrial); font-size: 1.2rem; }

/* --- FORMULÁRIOS E BOTÕES --- */
.search-bar, .farm-select, input, select {
    height: 55px; border-radius: 8px; border: 1px solid #ddd; padding: 10px 15px; width: 100%; margin-bottom: 10px;
}

.btn-table, .status-badge { 
    height: 55px; 
    border-radius: 8px; 
    font-weight: bold; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none; 
    border: none; 
    transition: 0.3s;
}

.btn-table { background: #eee; color: #333; padding: 0 20px; }
.btn-table:hover { background: #ddd; }

.status-badge { background: var(--verde-safra); color: white; padding: 0 25px; }
.status-badge:hover { opacity: 0.9; }

/* --- RESPONSIVIDADE PARA O MENU --- */
@media (max-width: 1100px) {
    .header-master {
        height: auto;
        padding: 15px;
        flex-direction: column; /* Em telas muito pequenas ele empilha, mas no desktop fica reto */
    }
    .nav-links {
        width: 100%;
        overflow-x: auto; /* Adiciona scroll horizontal se não couber no celular */
        padding-bottom: 10px;
        justify-content: flex-start;
    }
}