/* assets/css/login.css */

/* ===== VARIÁVEIS CSS ATUALIZADAS ===== */
:root {
    --rolex-green: #006039;
    --rolex-green-dark: #004d2d;
    --rolex-green-light: #007a45;
    --rolex-gold: #c9b086;
    --rolex-gold-dark: #b89a6a;
    --rolex-gold-light: #d8c6a4;
    --light-gold: #e8d9bc;
    --dark-gray: #1a1a1a;
    --darker-bg: #0d0d0d;
    --medium-gray: #666;
    --white: #ffffff;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

/* ===== RESET E CONFIGURAÇÕES GERAIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--darker-bg) 0%, #111 100%);
    color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== LAYOUT PRINCIPAL ===== */
main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px; /* ✅ REDUZIDO: Mais perto do header */
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== FORMULÁRIO DE REGISTRO PREMIUM ===== */
.auth-container {
    width: 100%;
    padding: 2.5rem; /* ✅ REDUZIDO: Menos padding interno */
    background: linear-gradient(145deg, var(--dark-gray), #111111);
    border-radius: 20px;
    box-shadow:
        0 25px 70px rgba(0, 96, 57, 0.2),
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(201, 176, 134, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(25px);
    animation: slideInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rolex-green), var(--rolex-gold), var(--rolex-green));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    z-index: 1;
}

/* CORREÇÃO: Removido o ::after que bloqueava cliques */
.auth-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 176, 134, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none; /* ✅ IMPORTANTE: não bloqueia cliques */
}

.auth-container:hover::after {
    opacity: 1;
}

@keyframes shimmer {
    0%, 100% { background-position: -200% 0; }
    50% { background-position: 200% 0; }
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 2rem; /* ✅ REDUZIDO: Menos espaço abaixo do título */
    color: var(--rolex-gold);
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem; /* ✅ REDUZIDO: Título um pouco menor */
    font-weight: 600;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
}

.auth-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px; /* ✅ REDUZIDO: Linha mais próxima */
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--rolex-green), var(--rolex-gold));
    border-radius: 2px;
}

/* ===== GRUPOS DE FORMULÁRIO ===== */
.auth-form .form-group {
    margin-bottom: 1.5rem; /* ✅ REDUZIDO: Menos espaço entre campos */
    position: relative;
    z-index: 2;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 0.6rem; /* ✅ REDUZIDO: Label mais próxima do input */
    color: var(--rolex-gold-light);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.auth-form .form-control {
    width: 100%;
    padding: 14px 52px 14px 18px; /* ✅ REDUZIDO: Padding vertical menor */
    background: linear-gradient(135deg, rgba(5, 18, 5, 0.4), rgba(10, 25, 15, 0.6));
    border: 1.5px solid rgba(201, 176, 134, 0.25);
    border-radius: 12px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 2;
}

.auth-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.auth-form .form-control:hover {
    border-color: rgba(201, 176, 134, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 96, 57, 0.15);
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--rolex-gold);
    background: linear-gradient(135deg, rgba(5, 18, 5, 0.6), rgba(10, 25, 15, 0.8));
    box-shadow:
        0 0 0 4px rgba(201, 176, 134, 0.2),
        0 12px 40px rgba(0, 96, 57, 0.25);
    transform: translateY(-3px);
}

/* ===== TOGGLE DE PASSWORD CORRIGIDO ===== */
.password-toggle {
    position: relative;
}

.password-toggle .form-control {
    padding-right: 52px; /* ✅ Espaço para o botão do olho */
}

.password-toggle .toggle-password {
    position: absolute;
    right: 8px; /* ✅ Dentro da caixa */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(201, 176, 134, 0.1);
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    padding: 6px;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10; /* ✅ Alto z-index */
    backdrop-filter: blur(5px);
}

.password-toggle .toggle-password:hover {
    color: var(--rolex-gold);
    background: rgba(201, 176, 134, 0.2);
    transform: translateY(-50%) scale(1.05);
}

/* ===== STRENGTH METER ===== */
.password-strength {
    margin-top: 0.6rem; /* ✅ REDUZIDO: Mais próximo do input */
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.strength-meter {
    height: 100%;
    width: 0;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.strength-meter::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

.strength-weak {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

.strength-medium {
    background: linear-gradient(90deg, #ffc107, #f39c12);
}

.strength-strong {
    background: linear-gradient(90deg, var(--rolex-green), #28a745);
}

.password-feedback {
    margin-top: 0.6rem; /* ✅ REDUZIDO: Mais próximo */
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 20px;
}

.password-feedback::before {
    content: '💡';
    font-size: 1rem;
}

/* ===== CHECKBOX E TERMOS ===== */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 0.4rem; /* ✅ REDUZIDO: Menos padding */
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    z-index: 2;
}

.checkbox-label:hover {
    background: rgba(201, 176, 134, 0.05);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: var(--rolex-gold);
    transform: scale(1.1);
    cursor: pointer;
    z-index: 3;
}

.terms-text {
    font-size: 0.85rem;
    color: var(--light-gold);
    line-height: 1.5;
    padding-left: 2rem;
    margin-top: 0.4rem; /* ✅ REDUZIDO: Mais próximo */
    z-index: 2;
}

.terms-text a {
    color: var(--rolex-gold);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.terms-text a:hover {
    color: var(--light-gold);
    border-bottom-color: var(--rolex-gold);
}

/* ===== BOTÃO PREMIUM ===== */
.auth-form .btn {
    width: 100%;
    padding: 16px; /* ✅ REDUZIDO: Botão mais compacto */
    font-size: 1.1rem;
    margin-top: 1.5rem; /* ✅ REDUZIDO: Mais próximo dos campos */
    background: linear-gradient(135deg, var(--rolex-gold), var(--rolex-gold-dark));
    color: var(--darker-bg);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(201, 176, 134, 0.4);
    font-family: 'Inter', sans-serif;
    z-index: 2;
}

.auth-form .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    pointer-events: none; /* ✅ Não bloqueia cliques */
}

.auth-form .btn:hover {
    background: linear-gradient(135deg, var(--rolex-gold-light), var(--rolex-gold));
    transform: translateY(-3px);
    box-shadow:
        0 15px 40px rgba(201, 176, 134, 0.5),
        0 6px 20px rgba(201, 176, 134, 0.3);
}

.auth-form .btn:hover::before {
    left: 100%;
}

.auth-form .btn:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(201, 176, 134, 0.4);
}

/* ===== LINKS DE AUTENTICAÇÃO ===== */
.auth-links {
    text-align: center;
    margin-top: 2rem; /* ✅ REDUZIDO: Mais próximo do botão */
    padding-top: 1.5rem; /* ✅ REDUZIDO: Seção mais compacta */
    border-top: 1px solid rgba(201, 176, 134, 0.2);
    position: relative;
    z-index: 2;
}

.auth-links::before {
    content: 'ou';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-gray);
    padding: 0 1rem;
    color: var(--rolex-gold);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-links p {
    color: var(--light-gold);
    margin-bottom: 0;
}

.auth-links a {
    color: var(--rolex-gold);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    z-index: 3;
}

.auth-links a:hover {
    color: var(--light-gold);
    background: rgba(201, 176, 134, 0.15);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ===== ALERTAS ===== */
.alert {
    padding: 1.1rem 1.3rem; /* ✅ REDUZIDO: Alert mais compacto */
    border-radius: 12px;
    margin-bottom: 1.5rem; /* ✅ REDUZIDO: Menos espaço abaixo */
    border: 1px solid transparent;
    position: relative;
    font-weight: 500;
    backdrop-filter: blur(10px);
    animation: slideInDown 0.5s ease-out;
    z-index: 2;
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 5px 0 0 5px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(0, 96, 57, 0.2));
    color: #d4edda;
    border-color: rgba(40, 167, 69, 0.3);
}

.alert-success::before {
    background: linear-gradient(180deg, var(--rolex-green), #28a745);
}

.alert-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15), rgba(108, 13, 13, 0.2));
    color: #f8d7da;
    border-color: rgba(220, 53, 69, 0.3);
}

.alert-error::before {
    background: linear-gradient(180deg, #dc3545, #e74c3c);
}

/* ===== TEXTO DE AJUDA ===== */
.form-text {
    font-size: 0.8rem;
    color: var(--rolex-gold-light);
    margin-top: 0.4rem; /* ✅ REDUZIDO: Mais próximo */
    display: block;
    opacity: 0.8;
}

/* ===== FEEDBACK DE VALIDAÇÃO ===== */
.validation-feedback {
    margin-top: 0.4rem; /* ✅ REDUZIDO: Mais próximo */
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 20px;
    z-index: 2;
}

.validation-feedback::before {
    content: '⚠';
    font-size: 0.9rem;
}

/* ===== LOADING STATE ===== */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -12px;
    border: 3px solid rgba(13, 13, 13, 0.3);
    border-top: 3px solid var(--darker-bg);
    border-right: 3px solid var(--darker-bg);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    pointer-events: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    main {
        padding: 70px 15px 30px; /* ✅ REDUZIDO: Mobile mais próximo */
    }
    
    .auth-container {
        padding: 2rem 1.5rem; /* ✅ REDUZIDO: Mobile mais compacto */
        border-radius: 16px;
    }
    
    .auth-container h2 {
        font-size: 2rem; /* ✅ REDUZIDO: Título mobile menor */
    }
}

@media (max-width: 576px) {
    main {
        padding: 60px 12px 25px; /* ✅ REDUZIDO: Ainda mais próximo */
    }
    
    .auth-container {
        padding: 1.8rem 1.2rem;
        margin: 0 auto;
    }
    
    .auth-container h2 {
        font-size: 1.8rem; /* ✅ REDUZIDO */
        margin-bottom: 1.5rem;
    }
    
    .auth-form .form-control {
        padding: 12px 48px 12px 14px; /* ✅ REDUZIDO: Mobile mais compacto */
    }
    
    .auth-form .btn {
        padding: 14px; /* ✅ REDUZIDO: Botão mobile menor */
        font-size: 1rem;
    }
    
    .password-toggle .toggle-password {
        width: 32px;
        height: 32px;
        right: 6px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 50px 10px 20px; /* ✅ REDUZIDO: Mínimo para mobile */
    }
    
    .auth-container {
        padding: 1.5rem 1rem; /* ✅ REDUZIDO: Mínimo padding */
        border-radius: 14px;
    }
    
    .auth-container h2 {
        font-size: 1.6rem; /* ✅ REDUZIDO: Título mobile mínimo */
    }
    
    .auth-form .form-group {
        margin-bottom: 1.2rem; /* ✅ REDUZIDO: Espaço mínimo entre campos */
    }
    
    .terms-text {
        padding-left: 1.5rem;
        font-size: 0.8rem;
    }
    
    .auth-form .form-control {
        padding: 10px 44px 10px 12px; /* ✅ REDUZIDO: Mínimo para mobile */
    }
    
    .password-toggle .toggle-password {
        width: 30px;
        height: 30px;
        right: 4px;
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .auth-container {
        animation: none;
    }
    
    .auth-form .btn::before {
        display: none;
    }
}

.auth-form .form-control:focus-visible {
    outline: 2px solid var(--rolex-gold);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid var(--rolex-gold);
    outline-offset: 2px;
}

/* ===== ESTADOS DE VALIDAÇÃO ===== */
.form-control.valid {
    border-color: var(--rolex-green);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(5, 18, 5, 0.6));
}

.form-control.invalid {
    border-color: var(--error);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(5, 18, 5, 0.6));
}