:root { --cor-primaria: #3498db; --cor-secundaria: #2980b9; --cor-fundo: #f4f7f6; --cor-container: #ffffff; --cor-texto: #333; --cor-borda: #ddd; --cor-sucesso: #2ecc71; --cor-erro: #e74c3c; --cor-aviso: #f39c12; }

/* --- CONFIGURAÇÃO GERAL --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    box-sizing: border-box;
}

/* --- CONTAINER --- */
.form-container, .container {
    background-color: var(--cor-container);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Elementos de Formulário */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.95rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid var(--cor-borda); border-radius: 8px; box-sizing: border-box; font-size: 1rem; }
button, .btn { width: 100%; padding: 14px; border: none; background-color: var(--cor-primaria); color: white; font-size: 16px; font-weight: bold; border-radius: 8px; cursor: pointer; }

/* Utilitários */
.links-uteis { text-align: center; margin-top: 20px; }
.links-uteis a { color: var(--cor-primaria); text-decoration: none; font-weight: 600; }
.mensagem { padding: 12px; margin-bottom: 15px; border-radius: 6px; text-align: center; font-weight: 500; font-size: 0.9rem; }
.sucesso { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.erro { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Header */
.header-portal { padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; margin-bottom: 15px; }
.header-organizado { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.titulo-bem-vindo { margin: 5px 0; font-size: 1.6rem; text-align: center; color: #333; line-height: 1.2; }
.btn-sair-header { background-color: #dc3545; color: white; padding: 6px 16px; border-radius: 20px; text-decoration: none; font-size: 0.8rem; font-weight: bold; align-self: flex-end; }

/* Badges */
.status-vip-badge { display: inline-block; padding: 5px 12px; border-radius: 15px; font-size: 0.85rem; font-weight: bold; }
.vip-active { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.vip-free { background-color: #f8f9fa; color: #6c757d; border: 1px solid #dee2e6; }
.vip-expired { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* --- MENU GRID (3 COLUNAS) --- */
.menu ul { 
    list-style: none; padding: 0; margin: 0; 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* MUDANÇA: 3 Colunas iguais */
    gap: 10px; /* Espaço um pouco menor para caber */
}

.menu li a { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none; 
    color: #444; 
    background-color: #fff; 
    border: 1px solid #e0e0e0; 
    border-radius: 10px; 
    padding: 10px 5px; /* Padding menor */
    height: 100px; /* Altura levemente menor */
    transition: transform 0.1s; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); 
}

.menu li a:active { transform: scale(0.98); background-color: #f0f0f0; }

/* Ajuste de tamanho para caber 3 na linha */
.menu .icone { 
    font-size: 1.8rem; /* Ícone menor */
    margin-bottom: 6px; 
}
.menu .texto { 
    font-size: 0.75rem; /* Fonte menor */
    font-weight: 600; 
    text-align: center; 
    line-height: 1.1; 
}

/* --- MODO APP NATIVO (CELULAR) --- */
@media (max-width: 600px) {
    body {
        padding: 0 !important;
        align-items: flex-start;
        background-color: #ffffff;
    }

    .form-container, .container {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 100vh;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 20px !important;
        margin: 0 !important;
    }
}

/* --- MODO TABLET (TELA CHEIA GRANDE) --- */
@media (min-width: 601px) {
    html, body { height: 100%; width: 100%; padding: 0; display: block; background-color: #fff; }
    .container { width: 100%; max-width: 100%; min-height: 100%; padding: 40px; border-radius: 0; box-shadow: none; }
    .menu ul { grid-template-columns: repeat(3, 1fr); gap: 25px; } /* No tablet mantém 3 mas maiores */
    .menu li a { height: 180px; }
    .menu .icone { font-size: 3.5rem; }
    .menu .texto { font-size: 1.2rem; }
    .titulo-bem-vindo { font-size: 2.5rem; }
    input, select, textarea, button { font-size: 1.2rem; padding: 15px; }
}
