/* ============================================ */
/* TOP CARNES - ESTILOS DE AUTENTICAÇÃO          */
/* ============================================ */
/* Autor: Wellmax Solution                       */
/* Versão: 1.0.0                                 */
/* ============================================ */

/* ============================================ */
/* CONTAINER PRINCIPAL                           */
/* ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a0a00 0%, #3E2723 30%, #4E342E 60%, #1a0a00 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 20px 40px;
}

/* Partículas de fogo no fundo */
.auth-particulas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.auth-particula {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--cor-secundaria);
    border-radius: 50%;
    animation: authParticula 6s infinite;
    opacity: 0;
}

.auth-particula:nth-child(1) { left: 5%; animation-delay: 0s; }
.auth-particula:nth-child(2) { left: 15%; animation-delay: 0.4s; width: 2px; height: 2px; }
.auth-particula:nth-child(3) { left: 25%; animation-delay: 0.8s; }
.auth-particula:nth-child(4) { left: 35%; animation-delay: 1.2s; width: 4px; height: 4px; }
.auth-particula:nth-child(5) { left: 45%; animation-delay: 1.6s; }
.auth-particula:nth-child(6) { left: 55%; animation-delay: 2s; width: 2px; height: 2px; }
.auth-particula:nth-child(7) { left: 65%; animation-delay: 2.4s; }
.auth-particula:nth-child(8) { left: 75%; animation-delay: 2.8s; width: 5px; height: 5px; }
.auth-particula:nth-child(9) { left: 85%; animation-delay: 3.2s; }
.auth-particula:nth-child(10) { left: 95%; animation-delay: 3.6s; width: 3px; height: 3px; }
.auth-particula:nth-child(11) { left: 10%; animation-delay: 4s; }
.auth-particula:nth-child(12) { left: 30%; animation-delay: 4.4s; width: 2px; height: 2px; }
.auth-particula:nth-child(13) { left: 50%; animation-delay: 4.8s; }
.auth-particula:nth-child(14) { left: 70%; animation-delay: 5.2s; width: 4px; height: 4px; }
.auth-particula:nth-child(15) { left: 90%; animation-delay: 5.6s; }

@keyframes authParticula {
    0% { transform: translateY(100vh) translateX(0) scale(0); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { transform: translateY(-10vh) translateX(50px) scale(2); opacity: 0; }
}

/* Gradientes decorativos */
.auth-gradiente {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    pointer-events: none;
}

.auth-gradiente-1 {
    width: 400px;
    height: 400px;
    background: var(--cor-primaria);
    top: -100px;
    right: -100px;
    animation: authGradiente 6s ease-in-out infinite;
}

.auth-gradiente-2 {
    width: 350px;
    height: 350px;
    background: var(--cor-secundaria);
    bottom: -80px;
    left: -80px;
    animation: authGradiente 7s ease-in-out infinite reverse;
}

@keyframes authGradiente {
    0%, 100% { transform: scale(1) translate(0, 0); }
    33% { transform: scale(1.2) translate(30px, -30px); }
    66% { transform: scale(0.9) translate(-20px, 20px); }
}

/* ============================================ */
/* CARD DE AUTENTICAÇÃO                          */
/* ============================================ */
.auth-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    animation: authCardIn 0.8s ease;
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo no card */
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 8px;
    animation: fireBounce 1.5s ease-in-out infinite;
}

.auth-logo .logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--cor-branca);
}

.auth-logo .logo-text span {
    color: var(--cor-secundaria);
}

.auth-logo p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 6px;
}

/* Título */
.auth-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cor-branca);
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitulo {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* Tabs (Entrar / Cadastrar) */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 32px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    font-family: var(--fonte-principal);
}

.auth-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cor-branca);
}

.auth-tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.03);
}

/* ============================================ */
/* FORMULÁRIOS                                   */
/* ============================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form.hidden {
    display: none;
}

/* Grupo de campo */
.campo-grupo {
    position: relative;
}

.campo-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.campo-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.campo-icone {
    position: absolute;
    left: 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.campo-input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--cor-branca);
    font-size: 1rem;
    font-family: var(--fonte-principal);
    transition: all 0.3s ease;
    outline: none;
}

.campo-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.campo-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--cor-secundaria);
    box-shadow: 0 0 0 4px rgba(245, 124, 0, 0.1);
}

.campo-input.erro {
    border-color: var(--cor-erro);
    box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.1);
}

.campo-erro {
    color: var(--cor-erro);
    font-size: 0.8rem;
    margin-top: 6px;
    display: none;
}

.campo-input.erro + .campo-erro {
    display: block;
}

/* Botão de mostrar senha */
.btn-mostrar-senha {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 8px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.btn-mostrar-senha:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Checkbox e links */
.auth-opcoes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cor-secundaria);
    cursor: pointer;
}

.auth-link {
    color: var(--cor-secundaria);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--cor-secundaria-clara);
    text-decoration: underline;
}

/* Botão principal */
.btn-auth {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-primaria-escura));
    color: var(--cor-branca);
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--fonte-principal);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.4);
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading spinner no botão */
.btn-auth .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--cor-branca);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

.btn-auth.loading .btn-text { display: none; }
.btn-auth.loading .spinner { display: block; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Separador */
.auth-separador {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-separador::before,
.auth-separador::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Botão WhatsApp */
.btn-auth-whatsapp {
    width: 100%;
    padding: 14px;
    background: rgba(37, 211, 102, 0.15);
    color: #25D366;
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--fonte-principal);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-auth-whatsapp:hover {
    background: rgba(37, 211, 102, 0.25);
    border-color: rgba(37, 211, 102, 0.5);
}

/* ============================================ */
/* VERIFICAÇÃO OTP                               */
/* ============================================ */
.otp-container {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.otp-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--cor-branca);
    font-family: var(--fonte-principal);
    outline: none;
    transition: all 0.3s ease;
}

.otp-input:focus {
    border-color: var(--cor-secundaria);
    box-shadow: 0 0 0 4px rgba(245, 124, 0, 0.1);
    background: rgba(255, 255, 255, 0.1);
}

.otp-input.preenchido {
    border-color: var(--cor-sucesso);
    background: rgba(46, 125, 50, 0.15);
}

/* Timer do OTP */
.otp-timer {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 12px;
}

.otp-timer span {
    color: var(--cor-secundaria);
    font-weight: 600;
}

/* ============================================ */
/* MENSAGENS E ALERTAS                           */
/* ============================================ */
.auth-mensagem {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-mensagem.erro {
    display: block;
    background: rgba(198, 40, 40, 0.15);
    border: 1px solid rgba(198, 40, 40, 0.3);
    color: #EF5350;
}

.auth-mensagem.sucesso {
    display: block;
    background: rgba(46, 125, 50, 0.15);
    border: 1px solid rgba(46, 125, 50, 0.3);
    color: #66BB6A;
}

.auth-mensagem.info {
    display: block;
    background: rgba(25, 118, 210, 0.15);
    border: 1px solid rgba(25, 118, 210, 0.3);
    color: #42A5F5;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================ */
/* RESPONSIVO - TABLET                          */
/* ============================================ */
@media (max-width: 1024px) {
    .auth-card {
        max-width: 420px;
        padding: 40px 30px;
    }
}

/* ============================================ */
/* RESPONSIVO - MOBILE                          */
/* ============================================ */
@media (max-width: 768px) {
    .auth-page {
        padding: 90px 16px 30px;
    }
    
    .auth-card {
        max-width: 100%;
        padding: 32px 22px;
        border-radius: 20px;
    }
    
    .auth-logo .logo-icon {
        font-size: 2.8rem;
    }
    
    .auth-logo .logo-text {
        font-size: 1.3rem;
    }
    
    .auth-titulo {
        font-size: 1.3rem;
    }
    
    .campo-input {
        padding: 13px 14px 13px 42px;
        font-size: 0.95rem;
    }
    
    .btn-auth {
        padding: 14px;
        font-size: 1rem;
    }
    
    .otp-input {
        width: 44px;
        height: 52px;
        font-size: 1.3rem;
    }
    
    .auth-opcoes {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 380px) {
    .auth-card {
        padding: 24px 16px;
    }
    
    .otp-container {
        gap: 8px;
    }
    
    .otp-input {
        width: 38px;
        height: 46px;
        font-size: 1.1rem;
    }
}