/* --- PÁGINA DE LOGIN / CADASTRO (DESIGN MODERNO) --- */
.auth-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 220px);
    padding: 20px 15px;
}

.auth-box.modern-auth {
    background-color: var(--white);
    width: 100%;
    max-width: 440px;
    border-radius: 24px; /* Bordas mais suaves */
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 40px 30px;
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--gray-dark);
}

/* Novo Estilo de Abas (Segmented Control) */
.auth-toggle-container {
    position: relative;
    display: flex;
    background-color: var(--gray-light);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 30px;
}

.auth-toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1;
}

.toggle-btn {
    flex: 1;
    position: relative;
    z-index: 2;
    background: none;
    border: none;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-dark);
    cursor: pointer;
    transition: color 0.3s;
}

.toggle-btn.active {
    color: var(--blue);
}

/* Formulários */
.auth-form {
    display: none;
    animation: authFadeIn 0.4s ease;
}

.auth-form.active {
    display: block;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 15px;
    line-height: 1;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1.5px solid var(--gray-medium);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    background-color: #fafafa;
    color: var(--text-dark);
    line-height: 1.5;
}

.input-with-icon input:focus {
    border-color: var(--blue);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(30, 94, 255, 0.1);
}

.input-with-icon input:focus + i,
.input-with-icon input:focus ~ i {
    color: var(--blue);
}

.forgot-password {
    text-align: right;
    margin-bottom: 25px;
    margin-top: -5px;
}

.forgot-password a {
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.btn-auth {
    background-color: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(30, 94, 255, 0.25);
}

.btn-auth:hover {
    background-color: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 61, 179, 0.3);
}

/* Divisor Social */
.social-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-medium);
}

.social-divider span {
    padding: 0 15px;
    color: var(--gray-dark);
    font-size: 13px;
    font-weight: 600;
}

/* Botões Sociais */
.social-logins {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--white);
    border: 1.5px solid var(--gray-medium);
    border-radius: 12px;
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-social:hover {
    background-color: var(--gray-light);
    border-color: #ccc;
}

.btn-social i {
    font-size: 16px;
}

.btn-google i { color: #DB4437; }
.btn-facebook i { color: #1877F2; }
.btn-apple i { color: #000000; }

@media (max-width: 480px) {
    .social-logins {
        grid-template-columns: 1fr; /* Em telas muito pequenas, empilha os botões */
    }
}
/* --- CABEÇALHO MINIMALISTA (LOGIN / CHECKOUT) --- */
.header-minimal {
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 0 20px;
}

.back-btn {
    font-size: 22px;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.back-btn:hover {
    background-color: var(--gray-light);
    color: var(--blue);
}

@media (min-width: 768px) {
    .header-minimal {
        padding: 0 40px;
    }
}
/* --- ALERTAS (login + recuperação) --- */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: left;
}

.auth-alert-sucesso {
    background: #e6f4ea;
    color: #1e8e3e;
}

.auth-alert-erro {
    background: #fdf0ef;
    color: #e74c3c;
}

/* --- ÍCONE DECORATIVO NO TOPO --- */
.auth-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--blue);
    margin: 0 auto 18px;
}

.auth-icon-success { background: #e6f4ea; color: #1e8e3e; }
.auth-icon-error   { background: #fdf0ef; color: #e74c3c; }

/* --- LINK VOLTAR NO TOPO DO FORM --- */
.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    margin-bottom: 20px;
}

.auth-back-link:hover { text-decoration: underline; }

/* --- ESTADO ENVIADO COM SUCESSO --- */
.auth-success-state {
    text-align: center;
}

.auth-success-icon {
    font-size: 52px;
    color: var(--blue);
    margin-bottom: 16px;
}

.auth-success-state p {
    font-size: 14px;
    color: var(--gray-dark);
    line-height: 1.6;
    margin-bottom: 0;
}

/* --- BOTÃO MOSTRAR/OCULTAR SENHA --- */
.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 0.2s;
}

.toggle-password:hover { color: var(--blue); }

/* --- INDICADOR DE FORÇA DA SENHA --- */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -10px 0 18px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--gray-medium);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 4px;
    border-radius: 2px;
    width: 0;
    transition: width .3s, background .3s;
}

.strength-label {
    font-size: 12px;
    font-weight: 700;
    min-width: 70px;
    text-align: right;
}