/* Paleta de Cores: Preto e Dourado */
:root {
    --bg-dark: #0f0f0f;         /* Fundo da página */
    --bg-card: #1a1a1a;         /* Fundo dos botões */
    --bg-header: #050505;       /* Fundo do cabeçalho */
    --gold: #D4AF37;            /* Dourado principal */
    --gold-hover: #F3CA3E;      /* Dourado claro (hover) */
    --text-light: #ffffff;      /* Texto branco */
    --text-muted: #aaaaaa;      /* Texto secundário */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    font-family: 'Inter', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- CABEÇALHO --- */
.top-header {
    background-color: var(--bg-header);
    border-bottom: 2px solid var(--gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.logos-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logos-container img {
    height: 40px; /* Reduzimos um pouco a altura da imagem em si... */
    width: auto;
    object-fit: contain;
    
    background-color: rgba(255, 255, 255, 0.95); /* Fundo branco limpo */
    padding: 5px 12px; /* Espaço para a logo "respirar" dentro do fundo branco */
    border-radius: 8px; /* Bordas levemente arredondadas */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); /* Sombra para dar profundidade */
}

.user-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.welcome-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
}

.logout-btn {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--gold);
    border-radius: 25px;
    padding: 8px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background-color: var(--gold);
    color: var(--bg-dark);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* --- Action Container for the Logout Button --- */
.main-actions {
    display: flex;
    justify-content: flex-end; /* Aligns the button to the right */
    margin-bottom: -20px; /* Pulls it up so it doesn't push the title down too much */
    position: relative;
    z-index: 10;
}

/* --- CORPO PRINCIPAL --- */
.main-content {
    flex: 1;
    padding: 40px 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.page-title {
    color: var(--gold);
    font-size: 2.5rem;
    margin: 0 0 5px 0;
    text-align: center;
}

.page-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* --- GRID DE MÓDULOS --- */
.modulos-grid {
    display: grid;
    /* MÁGICA DA RESPONSIVIDADE: Cria colunas que se ajustam sozinhas */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.modulo-card {
    background-color: var(--bg-card);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-light);
}

.modulo-card:hover {
    border-color: var(--gold);
    transform: translateY(-8px);
    background-color: #222;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.15);
}

.modulo-icon {
    font-size: 3rem;
    color: var(--gold);
    transition: transform 0.3s ease;
}

.modulo-card:hover .modulo-icon {
    transform: scale(1.1);
    color: var(--gold-hover);
}

.modulo-nome {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

/* --- SELO ISO --- */
.iso-logo {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    opacity: 0.8;
    z-index: 10;
}

/* --- MEDIA QUERIES (Telas Menores / Celulares) --- */
@media (max-width: 850px) {
    .top-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .logos-container img {
        height: 35px; /* Reduz logos no mobile */
    }

    .user-container {
        width: 100%;
        justify-content: space-between;
    }

    .main-actions{
        margin-bottom: 20px; /* Volta a margem normal no mobile para não ficar tão apertado */
    }
}

@media (max-width: 500px) {
    .page-title {
        font-size: 1.8rem;
    }
    .logos-container {
        gap: 10px;
    }
    .logos-container img {
        height: 25px; 
    }
    .modulos-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); /* 1 por linha no celular */
    }
    .iso-logo {
        display: none; /* Esconde a ISO no celular para não poluir a tela */
    }
}