/* BASE GERAL */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    padding-top: 70px;
}

/* --- COMPONENTES COMUNS --- */

/* Estilo base para os containers principais das páginas */
.card-container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    text-align: center;
}

/* Estilo base para títulos de seção */
h2 {
    color: #333;
    font-weight: 700;
    font-size: 2.2em;
}

/* --- MENU SUPERIOR FIXO --- */
.top-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    box-sizing: border-box;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a, .logout-button {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Estilo para o link da home com ícone */
.nav-links a.home-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px; /* Padding ajustado para ícone */
}

.nav-links a.home-icon svg {
    width: 22px;
    height: 22px;
}

/* Estilo para o link ativo no menu */
.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.15);
}

.logout-button {
    background-color: #e34e5d;
    border: none;
    cursor: pointer;
    font-weight: 700;
    display: inline-block;
    padding: 10px 15px;
}

.logout-button:hover {
    background-color: #c82333;
}

/* Estilos para a saudação ao usuário */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name-display {
    color: white;
    font-weight: 500;
    white-space: nowrap;
}

/* RESPONSIVIDADE PARA MENU */
@media (max-width: 480px) {
    .top-menu {
        padding: 0 15px;
        height: 50px;
    }
    .nav-links {
        gap: 10px;
    }
    /* Aumenta o padding-top do body para o menu menor */
    body {
        padding-top: 60px;
    }
    .card-container {
        padding: 25px 20px;
    }
    h2 {
        font-size: 1.8em;
    }
    .input-grid-config {
        grid-template-columns: 1fr;
    }
    .form-actions {
        justify-content: center;
    }
    .btn-inicio {
        margin-right: 0;
    }
}

/* --- ESTILOS DE FORMULÁRIO PADRÃO (Adicionado para padronizar Café e outras culturas) --- */

.input-grid-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    font-family: inherit;
}

.section-header {
    color: #555;
    font-size: 1.3em;
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 15px;
    border-left: 5px solid #2e7d32;
    padding-left: 10px;
    text-align: left;
}

/* --- BOTÕES DE AÇÃO PADRÃO --- */
.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end; 
    gap: 15px;
    flex-wrap: wrap;
}

.action-button {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.2s;
    color: white;
}

.btn-calcular { background-color: #36b054; width: 100%; margin-top: 10px; font-size: 1.1em; }
.btn-calcular:hover { background-color: #218838; }
