/* Estilos para Autenticação (Login/Register) */
:root {
    --primary-color: #0b2c48;
    --secondary-color: #1f4f5f;
    --accent-color: #d4ac38;
    --success-color: #1f6f6e;
    --warning-color: #d4ac38;
    --danger-color: #c44536;
    --info-color: #1f8a9e;
    --dark-color: #0b1c2d;
    --light-color: #f4f6f8;
    
    --gradient-primary: linear-gradient(135deg, #0b2c48 0%, #0f3b5d 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(11, 44, 72, 0.9) 0%, rgba(31, 143, 158, 0.6) 100%);
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: radial-gradient(circle at 20% 20%, rgba(31, 143, 158, 0.08), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(212, 172, 56, 0.08), transparent 30%),
                var(--light-color);
    min-height: 100vh;
}

/* Container Principal */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(11, 44, 72, 0.05);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 70px rgba(11, 44, 72, 0.18);
    overflow: hidden;
}

/* Lado da Imagem */
.auth-image {
    background: var(--gradient-overlay),
                url('https://images.unsplash.com/photo-1505693416388-ac5ce068fe85?auto=format&fit=crop&w=1200&q=80') center/cover;
    min-height: 500px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    color: white;
}

.auth-image-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand {
    align-self: flex-start;
}

.auth-brand a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
}

.auth-brand a:hover {
    transform: scale(1.05);
}

.brand-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}

.auth-image-content {
    text-align: center;
    padding: 2rem 0;
}

.auth-image-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 6px 24px rgba(0, 0, 0, 0.35);
}

.auth-image-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Seção do Formulário */
.auth-form-section {
    display: flex;
    align-items: center;
    min-height: 500px;
}

.auth-form-container {
    width: 100%;
    padding: 3rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--secondary-color);
    font-size: 1rem;
}

/* Formulário */
.auth-form {
    margin-bottom: 2rem;
}

.form-floating {
    position: relative;
}

.form-floating .form-control {
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-floating .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(11, 44, 72, 0.25);
}

.form-floating .form-control:not(:placeholder-shown),
.form-floating .form-control:focus {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating label {
    padding: 1rem 3rem 1rem 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    transition: var(--transition);
}

.form-floating label i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

/* Toggle de Senha */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    z-index: 5;
    padding: 0.25rem;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--accent-color);
}

/* Opções do Formulário */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.forgot-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.forgot-link:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

/* Botão de Autenticação */
.auth-btn {
    position: relative;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    background: var(--gradient-primary);
    border: 1px solid rgba(212, 172, 56, 0.3);
    transition: var(--transition);
    overflow: hidden;
    color: #fff;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(11, 44, 72, 0.25);
}

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

.auth-btn .btn-loader {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.auth-btn.loading span {
    opacity: 0;
}

.auth-btn.loading .btn-loader {
    display: block;
}

/* Indicador de Força da Senha */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: var(--transition);
    border-radius: 2px;
}

.strength-fill.weak {
    background: var(--danger-color);
    width: 25%;
}

.strength-fill.fair {
    background: var(--warning-color);
    width: 50%;
}

.strength-fill.good {
    background: var(--info-color);
    width: 75%;
}

.strength-fill.strong {
    background: var(--success-color);
    width: 100%;
}

.strength-text {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Divisor */
.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

/* Botões Sociais */
.auth-social .btn {
    padding: 0.875rem 1.5rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.auth-social .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.auth-social .btn i {
    margin-right: 0.5rem;
}

/* Footer da Autenticação */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.auth-footer p {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-footer a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

.auth-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.auth-links span {
    color: var(--secondary-color);
}

/* Alertas */
#alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estados de Validação */
.form-control.is-valid {
    border-color: var(--success-color);
    padding-right: 3rem;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    padding-right: 3rem;
}

.valid-feedback,
.invalid-feedback {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 991px) {
    .auth-wrapper {
        margin: 1rem;
    }
    
    .auth-image {
        min-height: 300px;
        padding: 2rem;
    }
    
    .auth-image-content h2 {
        font-size: 2rem;
    }
    
    .auth-form-container {
        padding: 2rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 767px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-image {
        min-height: 200px;
        padding: 1.5rem;
    }
    
    .auth-image-content {
        padding: 1rem 0;
    }
    
    .auth-image-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .auth-image-content p {
        font-size: 1rem;
    }
    
    .auth-form-container {
        padding: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .auth-links {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .auth-links span {
        display: none;
    }
}

@media (max-width: 576px) {
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .form-floating .form-control {
        padding: 0.875rem 2.5rem 0.875rem 0.875rem;
    }
    
    .form-floating label {
        padding: 0.875rem 2.5rem 0.875rem 0.875rem;
    }
    
    .password-toggle {
        right: 0.75rem;
    }
}