/* Estilos específicos para páginas de autenticação */

/* Header com logo */
.page-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 2rem;
}

.header-logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.header-logo-img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

/* Logo na posição alvo (canto superior esquerdo da caixa branca) */
.target-logo-area {
    position: absolute;
    top: -30px;
    left: 5px;
    z-index: 10;
}

.target-logo-img {
    max-width: 100px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Texto de slogan */
.slogan-text {
    position: absolute;
    top: 8rem;
    left: 2rem;
    color: white;
    font-size: 1.2rem;
    font-weight: 300;
    max-width: 350px;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Layout da página de login */
.auth-container {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.auth-card {
    position: relative;
    display: flex;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: visible;
    width: 100%;
    max-width: 900px;
    height: 780px;
    margin-top: 2rem;
}

.auth-card-content {
    flex: 1;
    padding: 3.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 780px;
}

.auth-card-image {
    position: relative;
    z-index: 0;
    flex: 1;
    background-image: url('../img/login-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    overflow: hidden;
}

.auth-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(52, 152, 219, 0.4));
    backdrop-filter: blur(2px);
    z-index: 1;
}

/* Escondendo qualquer overlay de texto na imagem */
.auth-image-overlay {
    display: none;
}

/* Logo e título */
.auth-logo {
    max-width: 140px;
    margin-bottom: 1.5rem;
}

.auth-card h2 {
    color: var(--dark-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.auth-description {
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Estilos de form */
.form-group {
    margin-bottom: 2rem;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.icon-left {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-control.with-icon {
    padding-left: 45px;
    padding-right: 45px;
}

.form-control {
    background-color: #f8f9fa;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    background-color: #fff;
}

/* Botão para mostrar/ocultar senha */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px;
    font-size: 0.85rem;
    font-weight: 500;
}

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

/* Remove os estilos antigos do ícone */
.password-toggle-icon {
    display: none;
}

/* Layout das opções do formulário */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    width: 100%;
}

.forgot-password {
    text-align: right;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.forgot-password a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Botões */
.btn {
    border-radius: 10px;
    padding: 14px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1);
}

.btn i {
    font-size: 1rem;
}

/* Links de rodapé */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem 0;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    gap: 12px;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 10px 28px;
    border-radius: 25px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-footer a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-footer a i {
    font-size: 0.85em;
    transition: transform 0.3s ease;
}

.auth-footer a:hover i {
    transform: translateX(3px);
}

.mt-3 {
    margin-top: 1.5rem;
}

/* Alertas */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.alert i {
    font-size: 1.2rem;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.15);
    border-left: 4px solid var(--success-color);
    color: #2d7d5a;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.15);
    border-left: 4px solid var(--danger-color);
    color: #992e24;
}

/* Medidor de força da senha */
.password-strength-meter {
    margin-bottom: 1.5rem;
}

.meter-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.meter-bar {
    height: 5px;
    background-color: #eee;
    border-radius: 5px;
    margin-bottom: 5px;
}

.meter-fill {
    height: 100%;
    width: 0;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.meter-fill.weak {
    background-color: #e74c3c;
}

.meter-fill.medium {
    background-color: #f39c12;
}

.meter-fill.good {
    background-color: #3498db;
}

.meter-fill.strong {
    background-color: #2ecc71;
}

.meter-text {
    font-size: 0.85rem;
    color: #666;
    text-align: right;
}

/* Checkbox personalizado */
.custom-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    padding-left: 30px;
    margin-bottom: 0;
    line-height: normal;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
    margin: 0 0.25rem;
}

.checkbox-label a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 3px;
    height: 20px;
    width: 20px;
    background-color: #f8f9fa;
    border: 2px solid #f0f0f0;
    border-radius: 5px;
}

.custom-checkbox input:checked ~ .checkbox-label .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkbox-label .checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Separador ou */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #999;
    font-size: 0.9rem;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.separator:not(:empty)::before {
    margin-right: 1rem;
}

.separator:not(:empty)::after {
    margin-left: 1rem;
}

/* Botões sociais */
.social-login {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.btn-social {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #f0f0f0;
    background-color: #fff;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-social:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

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

.btn-facebook {
    border-color: #4267B2;
    color: #4267B2;
}

.btn-facebook:hover {
    background-color: #4267B2;
    color: white;
}

.btn-google {
    border-color: #DB4437;
    color: #DB4437;
}

.btn-google:hover {
    background-color: #DB4437;
    color: white;
}

/* Design responsivo */
@media (max-width: 992px) {
    .auth-card {
        max-width: 700px;
        height: auto;
        min-height: 600px;
    }
    
    .auth-card-content {
        min-height: auto;
        padding: 2.5rem 2rem;
    }
    
    .target-logo-area {
        top: -35px;
        left: 20px;
    }
    
    .target-logo-img {
        max-width: 90px;
    }
    
    .auth-card h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    .header-logo {
        top: 1rem;
        left: 1rem;
    }
    
    .header-logo-img {
        max-width: 120px;
    }
    
    .auth-container {
        padding: 1rem;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .target-logo-area {
        top: -25px;
        left: 15px;
    }
    
    .target-logo-img {
        max-width: 80px;
    }
    
    .auth-card {
        flex-direction: column;
        height: auto;
        margin-top: 1rem;
        margin-bottom: 2rem;
        max-width: 100%;
        width: 100%;
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .auth-card-image {
        display: none;
    }
    
    .auth-card-content {
        padding: 2rem 1.5rem 2.5rem;
        min-height: auto;
        width: 100%;
    }
    
    .auth-card h2 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
        text-align: center;
    }
    
    .auth-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        text-align: center;
        color: #777;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-control {
        padding: 14px 15px;
        font-size: 16px; /* Previne zoom no iOS */
        border-radius: 8px;
        height: auto;
        min-height: 48px; /* Tamanho mínimo para touch */
    }
    
    .form-control.with-icon {
        padding-left: 45px;
        padding-right: 15px;
    }
    
    .icon-left {
        left: 15px;
        font-size: 1rem;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 1rem;
        min-height: 48px;
        border-radius: 8px;
        font-weight: 600;
    }
    
    .btn-primary {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border: none;
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
    
    .btn-primary:hover, .btn-primary:focus {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
    }
    
    .terms-checkbox {
        margin-bottom: 1.2rem;
    }
    
    .terms-label {
        font-size: 0.85rem;
        line-height: 1.4;
        padding-left: 35px;
    }
    
    .terms-checkbox .checkmark {
        width: 22px;
        height: 22px;
        top: 2px;
        border-radius: 4px;
    }
    
    .terms-checkbox .terms-label .checkmark:after {
        left: 8px;
        top: 4px;
        width: 5px;
        height: 9px;
    }
    
    .alert {
        padding: 12px 15px;
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
        border-radius: 8px;
        line-height: 1.4;
    }
    
    .alert i {
        margin-right: 8px;
        font-size: 0.9rem;
    }
    
    .discrete-referral {
        font-size: 10px;
        margin-top: 8px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 2rem;
    }
    
    .auth-footer {
        position: relative;
        margin-top: 1.5rem;
        bottom: auto;
        padding-bottom: 1rem;
        text-align: center;
        font-size: 0.9rem;
    }
    
    .auth-footer a {
        padding: 8px 15px;
        font-size: 0.9rem;
        display: inline-block;
        margin-top: 5px;
    }
}

/* Melhorias para telas muito pequenas */
@media (max-width: 480px) {
    .auth-container {
        padding: 0.5rem;
        padding-top: 1.5rem;
    }
    
    .auth-card {
        margin-top: 0.5rem;
        border-radius: 10px;
    }
    
    .auth-card-content {
        padding: 1.5rem 1.2rem 2rem;
    }
    
    .target-logo-area {
        top: -20px;
        left: 10px;
    }
    
    .target-logo-img {
        max-width: 70px;
    }
    
    .auth-card h2 {
        font-size: 1.4rem;
        margin-bottom: 0.6rem;
    }
    
    .auth-description {
        font-size: 0.85rem;
        margin-bottom: 1.2rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .form-control.with-icon {
        padding-left: 40px;
    }
    
    .icon-left {
        left: 12px;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    .terms-label {
        font-size: 0.8rem;
        padding-left: 30px;
    }
    
    .terms-checkbox .checkmark {
        width: 20px;
        height: 20px;
    }
    
    .terms-checkbox .terms-label .checkmark:after {
        left: 7px;
        top: 3px;
        width: 4px;
        height: 8px;
    }
    
    .alert {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .discrete-referral {
        font-size: 9px;
    }
    
    .auth-footer {
        margin-top: 1.2rem;
        font-size: 0.85rem;
    }
    
    .auth-footer a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* Melhorias para acessibilidade e touch */
@media (max-width: 768px) {
    /* Aumentar áreas de toque para elementos interativos */
    .terms-label {
        min-height: 44px;
        display: flex;
        align-items: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Melhorar foco para navegação por teclado */
    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
        outline: none;
    }
    
    .btn:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    /* Animações suaves para melhor UX */
    .auth-card {
        animation: slideUp 0.3s ease-out;
    }
    
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Scroll suave */
    html {
        scroll-behavior: smooth;
    }
    
    /* Otimizações para iOS Safari */
    .form-control {
        -webkit-appearance: none;
        -webkit-border-radius: 8px;
    }
    
    .btn {
        -webkit-appearance: none;
        -webkit-border-radius: 8px;
    }
}

/* Orientação landscape em dispositivos móveis */
@media (max-width: 768px) and (orientation: landscape) {
    .auth-container {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .auth-card {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .auth-card-content {
        padding: 1.5rem 1.5rem 2rem;
    }
    
    .target-logo-area {
        top: -15px;
    }
    
    .target-logo-img {
        max-width: 65px;
    }
    
    .auth-card h2 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .auth-description {
        margin-bottom: 1rem;
        font-size: 0.85rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}

.main-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.main-logo-img {
    max-width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Checkbox dos termos (específico para página de registro) */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    width: 100%;
}

.terms-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.terms-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    padding-left: 30px;
    line-height: 1.5;
}

.terms-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    margin: 0 5px;
}

.terms-label a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.terms-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 3px;
    height: 20px;
    width: 20px;
    background-color: #f8f9fa;
    border: 2px solid #f0f0f0;
    border-radius: 5px;
}

.terms-checkbox input:checked ~ .terms-label .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.terms-checkbox .terms-label .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
} 