/* /css/style.css */

/* --- :root - Variáveis Globais de Cores --- */
:root {
    --cor-fundo: #f4f7f6;
    --cor-fundo-card: #FFFFFF;
    --cor-texto-principal: #333333;
    --cor-texto-secundario: #666666;
    --cor-primaria: #FFA500;    /* Laranja Moto One */
    --cor-secundaria: #009999;  /* Verde-azulado Petronas */
    --cor-borda: #e0e0e0;
    --cor-erro: #e74c3c;
}

/* --- Estilos Gerais (Reset e Padrões) --- */
html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto-principal);
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centraliza o conteúdo verticalmente */
}

h1, h2, h3, h4 {
    color: var(--cor-texto-principal);
}

p {
    line-height: 1.6;
    color: var(--cor-texto-secundario);
}

a {
    color: var(--cor-primaria);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
    color: #E69500;
}

/* --- Estilos de Formulário Genéricos --- */
/* Usado em páginas como meu_perfil, esqueci_senha, cadastro */
.form-container {
    width: 100%;
    max-width: 450px;
    padding: 30px;
    background-color: var(--cor-fundo-card);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: auto; /* Empurra o footer para baixo */
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--cor-borda);
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.2);
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    background-color: var(--cor-primaria);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #E69500;
}

/* --- Layout Específico: Página de Login --- */
.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background-color: var(--cor-fundo-card);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: auto; /* Empurra o footer para baixo */
}

.login-branding {
    width: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.2)), url('../img/background-moto.jpg');
    background-size: cover;
    background-position: center;
    padding: 40px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-branding .logos { display: flex; align-items: center; gap: 15px; }
.login-branding .logos img { max-height: 40px; }
.login-branding .texto-campanha h1 { font-size: 2.5em; margin-bottom: 10px; line-height: 1.2; color: #fff; }
.login-branding .texto-campanha p { font-size: 1.1em; opacity: 0.9; }

.login-form-area {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- Layout Específico: Painel do Cliente --- */
.painel-wrapper {
    width: 100%;
    max-width: 800px;
    margin-bottom: auto; /* Empurra o footer para baixo */
}

.painel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--cor-borda);
    flex-wrap: wrap;
    gap: 15px;
}

.painel-header h2 { margin: 0; font-size: 1.8em; }
.user-menu a { margin-left: 20px; font-weight: bold; }
.user-menu a.logout-link { color: var(--cor-erro); }
.user-menu a.logout-link:hover { color: #c0392b; }

.card-acao-principal {
    background-color: var(--cor-fundo-card);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    margin-bottom: 30px;
}

.card-acao-principal h3 { margin-top: 0; font-size: 1.5em; color: var(--cor-secundaria); }
.card-acao-principal .btn { padding: 15px 30px; font-size: 1.1em; display: inline-flex; align-items: center; gap: 10px; width: auto; }

.dashboard-pessoal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.dashboard-card {
    background-color: var(--cor-fundo-card);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.dashboard-card .numero { font-size: 2.5em; font-weight: bold; color: var(--cor-primaria); line-height: 1; }
.dashboard-card .legenda { font-size: 0.9em; color: var(--cor-texto-secundario); margin-top: 5px; }
.dashboard-card a { display: block; margin-top: 15px; font-weight: bold; color: var(--cor-secundaria); }

/* --- Rodapé Universal --- */
footer {
    width: 100%;
    text-align: center;
    padding: 20px;
    margin-top: 40px; /* Espaçamento acima do rodapé */
    color: var(--cor-texto-secundario);
    font-size: 0.9em;
}

/* --- AJUSTES PARA CELULAR (Mobile-First) --- */
@media (max-width: 768px) {
    body { padding: 0; }

    .login-wrapper {
        flex-direction: column;
        min-height: 100vh;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 0;
    }

    .login-branding, .login-form-area {
        width: 100%;
        box-sizing: border-box;
    }

    .login-branding { min-height: 250px; padding: 25px; text-align: center; justify-content: center; }
    .login-branding .logos { justify-content: center; margin-bottom: 20px; }
    .login-branding .texto-campanha h1 { font-size: 1.8em; }
    .login-form-area { padding: 30px 25px; }

    .painel-wrapper, .form-container {
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
        margin-bottom: 0;
        box-shadow: none;
    }
    
    .painel-header { flex-direction: column; align-items: flex-start; }
    
    footer { margin-top: 20px; padding-bottom: 20px; }
}

/* /css/style.css */

/* --- NOVOS ESTILOS PARA GAMIFICAÇÃO NO PAINEL --- */

.card-nivel {
    text-align: left;
}

.nivel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.nome-nivel {
    font-size: 1.5em;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 20px;
    color: #fff;
}

/* Cores específicas para cada nível */
.nivel-bronze { background-color: #CD7F32; } /* Cor de bronze */
.nivel-prata { background-color: #C0C0C0; } /* Cor de prata */
.nivel-ouro { background-color: #FFD700; }  /* Cor de ouro */

.info-proximo-nivel {
    font-size: 0.85em;
    color: #888;
    font-weight: bold;
}

.barra-progresso-container {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.barra-progresso-preenchimento {
    height: 100%;
    background-color: var(--cor-secundaria); /* Verde */
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.legenda-progresso {
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

