/* ARQUIVO: public/css/login.css */

/* --- IMPORTAÇÃO DE FONTES --- */
@font-face {
    font-family: 'Surgena';
    src: url('/font/Surgena-Regular.woff2') format('woff2'); 
    font-weight: normal;
}
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

/* --- VARIÁVEIS NEON --- */
:root {
    --bg-fundo: #050505;
    --bg-card: rgba(20, 20, 20, 0.6);
    --borda: rgba(0, 255, 255, 0.2);
    --ciano: #00FFFF;
    --branco: #FFFFFF;
    --cinza: #A0A0A0;
    --glow: 0 0 15px rgba(0, 255, 255, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-fundo);
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: radial-gradient(circle at 50% 10%, rgba(0, 255, 255, 0.05), transparent 40%);
}

/* --- CARD PRINCIPAL --- */
.login-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--borda);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ciano), transparent);
}

.section-title {
    font-family: 'Surgena', sans-serif;
    color: var(--ciano);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: var(--glow);
}

/* --- LOGO --- */
.brand-logo-top {
    text-align: center;
    margin-bottom: 30px;
    animation: floatLogo 3s ease-in-out infinite;
}

.brand-logo-top img {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.5));
    transition: transform 0.3s;
}

.brand-logo-top img:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 30px rgba(0, 255, 255, 0.8));
}

@keyframes floatLogo {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* --- FORMULÁRIO --- */
label {
    display: block;
    color: var(--cinza);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.row-grid {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.col { flex: 1; }
.col-small { width: 100px; } /* Largura segura para o DDD não quebrar */

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Ícone Padrão (Esquerda) */
.input-wrapper i:not(.toggle-pass) {
    position: absolute;
    left: 15px;
    color: var(--cinza);
    font-size: 1.1rem;
    z-index: 10;
    pointer-events: none; /* Deixa o clique passar para o input */
}

/* Ícone do Olho (Direita) - CORRIGIDO */
.input-wrapper .toggle-pass {
    position: absolute;
    right: 15px !important;
    left: auto !important;
    cursor: pointer;
    color: var(--cinza);
    z-index: 20;
    font-size: 1.2rem;
}

/* INPUTS GERAIS */
input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--borda);
    /* Padding para não cobrir o texto com os ícones */
    padding: 12px 45px 12px 45px; 
    border-radius: 8px;
    color: var(--branco);
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: 0.3s;
    font-size: 0.95rem;
    position: relative;
    z-index: 5;
}

/* SELECT (DDD) - CORRIGIDO */
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--borda);
    /* Importante: Remove o padding esquerdo grande para o texto aparecer */
    padding: 12px 10px !important; 
    border-radius: 8px;
    color: var(--branco);
    text-align: center;
    cursor: pointer;
    outline: none;
    font-size: 0.95rem;
    appearance: none; /* Remove seta padrão */
}

/* Garante fundo preto nas opções */
select option {
    background-color: #050505;
    color: #fff;
    padding: 10px;
    border: none;
}

input:focus, select:focus {
    border-color: var(--ciano);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* Brilho no ícone ao focar */
input:focus + i, .input-wrapper:focus-within i {
    color: var(--ciano);
}

/* --- BOTÕES --- */
.btn-neon {
    width: 100%;
    background: var(--ciano);
    color: #000;
    font-family: 'Surgena', sans-serif;
    font-weight: bold;
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-neon:hover {
    box-shadow: var(--glow);
    background: #fff;
}

/* --- DIVISOR "OU" --- */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: var(--cinza);
    font-size: 0.8rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.divider span { padding: 0 10px; }

/* --- SOCIAL BUTTONS --- */
.social-login {
    display: flex;
    justify-content: center;
}

.btn-social {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--branco);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
    text-decoration: none;
    font-weight: 500;
}

.btn-social:hover {
    border-color: var(--ciano);
    background: rgba(0,255,255,0.05);
}

/* --- FOOTER LINKS --- */
.footer-links {
    text-align: center;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-links a {
    color: var(--cinza);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}

.footer-links a span { color: var(--ciano); font-weight: bold; }
.footer-links a:hover { color: var(--branco); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.forgot-pass {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: var(--cinza);
    margin-top: -15px;
    margin-bottom: 20px;
    text-decoration: none;
    transition: 0.3s;
}
.forgot-pass:hover { color: var(--ciano); text-shadow: 0 0 5px var(--ciano); }

/* --- CORREÇÃO DO FUNDO BRANCO (AUTOFILL) --- */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #0F0F0F inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* --- RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 480px) {
    /* Empilha os campos */
    .row-grid {
        flex-direction: column;
        gap: 0;
    }
    .row-grid .col, .row-grid .col-small {
        margin-bottom: 20px;
        width: 100%;
    }
    
    /* Exceção: Mantém DDI e Telefone lado a lado */
    .row-grid:has(select) {
        flex-direction: row; 
        gap: 10px;
    }
    .row-grid:has(select) .col-small {
        width: 100px; /* Mantém largura fixa para o DDI */
        margin-bottom: 0;
    }
    .row-grid:has(select) .col {
        margin-bottom: 0;
    }

    .login-card { padding: 30px 20px; }
    .login-container { padding: 10px; }
}