/* ============================================
   AUTH MODAL - LOGIN/CADASTRO
   ============================================ */

.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.auth-modal.active {
    display: flex !important;
}

.auth-modal-content {
    background: linear-gradient(135deg, #1a1f3a 0%, #2d3561 100%);
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Left Panel - Branding */
.auth-modal-left {
    width: 40%;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.auth-modal-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.auth-branding {
    text-align: center;
    z-index: 1;
    position: relative;
}

.auth-logo {
    margin-bottom: 20px;
}

.auth-logo-image {
    max-width: 200px;
    height: auto;
}

.auth-logo-fallback {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.auth-logo-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
}

.auth-logo-highlight {
    color: #2563eb;
}

.auth-logo-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.auth-welcome-text {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Right Panel - Forms */
.auth-modal-right {
    width: 60%;
    padding: 40px;
    overflow-y: auto;
    background: #1a1f3a;
    position: relative;
}

.auth-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10;
}

.auth-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.auth-tab-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 600;
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.auth-tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.auth-tab-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Form Container */
.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
}

/* Login Options */
.auth-login-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-option-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

.auth-option-btn.active {
    background: rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
    color: #fff;
}

.auth-option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Form Groups */
.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.auth-form-group-inline {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-icon-left {
    position: absolute;
    left: 15px;
    color: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.auth-form-group input,
.auth-form-group select {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.auth-form-group input:focus,
.auth-form-group select:focus {
    outline: none;
    border-color: #2563eb;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-form-group input:read-only {
    background: rgba(255, 255, 255, 0.03);
    cursor: not-allowed;
}

.auth-clear-btn,
.auth-toggle-password {
    position: absolute;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.auth-clear-btn:hover,
.auth-toggle-password:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* CPF Group */
.auth-cpf-group {
    display: flex;
    gap: 10px;
}

.auth-cpf-group .auth-form-group-inline {
    flex: 1;
}

.auth-btn-verify {
    padding: 12px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.auth-btn-verify:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.auth-btn-verify:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Country Code */
.auth-country-code {
    width: 80px !important;
    padding-right: 10px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important;
}

.auth-country-code + input {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    padding-left: 15px !important;
}

/* Date Group */
.auth-date-group {
    display: flex;
    gap: 10px;
}

.auth-date-group select {
    flex: 1;
    padding: 12px 15px;
}

/* Gender Group */
.auth-gender-group {
    display: flex;
    gap: 20px;
}

.auth-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
}

.auth-radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

/* Form Options */
.auth-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

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

.auth-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.auth-checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.auth-checkbox-label input[type="checkbox"]:checked + .auth-checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

.auth-checkbox-label input[type="checkbox"]:checked + .auth-checkmark::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
}

.auth-forgot-password {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-forgot-password:hover {
    color: #3b82f6;
}

/* Primary Button */
.auth-btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4);
}

.auth-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Social Login */
.auth-social-login {
    margin: 30px 0;
    text-align: center;
}

.auth-divider-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 15px;
    position: relative;
}

.auth-divider-text::before,
.auth-divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider-text::before {
    left: 0;
}

.auth-divider-text::after {
    right: 0;
}

.auth-btn-google {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: none;
    border-radius: 8px;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.auth-btn-google:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.auth-btn-google i {
    font-size: 1.2rem;
}

/* Terms */
.auth-terms {
    margin: 20px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.auth-terms a {
    color: #2563eb;
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* Switch Form */
.auth-switch-form {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.auth-switch-form a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

.auth-switch-form a:hover {
    text-decoration: underline;
}

/* Help Link */
.auth-help-link {
    text-align: center;
    margin-top: 20px;
}

.auth-help-link a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.auth-help-link a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Error Message */
.auth-error-message {
    color: #3b82f6;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.auth-error-message.show {
    display: block;
}

/* Header Buttons */
.btn-login,
.btn-register {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-login {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-register {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-modal-content {
        flex-direction: column;
        max-height: 95vh;
    }
    
    .auth-modal-left {
        width: 100%;
        padding: 30px 20px;
        min-height: 150px;
    }
    
    .auth-logo-image {
        max-width: 150px;
    }
    
    .auth-logo-text {
        font-size: 2rem;
    }
    
    .auth-welcome-text {
        font-size: 1.2rem;
    }
    
    .auth-modal-right {
        width: 100%;
        padding: 30px 20px;
    }
    
    .auth-close-btn {
        top: 10px;
        right: 10px;
    }
    
    .btn-login,
    .btn-register {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .btn-login span,
    .btn-register span {
        display: none;
    }
    
    .btn-login::before {
        content: 'Entrar';
    }
    
    .btn-register::before {
        content: 'Cadastro';
    }
}

@media (max-width: 480px) {
    .auth-modal {
        padding: 10px;
    }
    
    .auth-modal-content {
        border-radius: 15px;
    }
    
    .auth-modal-left {
        padding: 20px 15px;
        min-height: 120px;
    }
    
    .auth-modal-right {
        padding: 20px 15px;
    }
    
    .auth-tabs {
        margin-bottom: 20px;
    }
    
    .auth-tab-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

