/* ============================================================
   auth.css — ConfortoCare
   Cobre: login, register, recuperar, redefinir senha
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Orbes decorativos de fundo */
body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: pulse 8s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.1), transparent);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% { transform: scale(1);   opacity: 0.5; }
    50%       { transform: scale(1.1); opacity: 0.8; }
}

/* ── Container ─────────────────────────────────────────────── */
.auth-container {
    width: 100%;
    max-width: 450px;   /* login, recuperar, redefinir */
    position: relative;
    z-index: 1;
}

.auth-container.register {
    max-width: 560px;   /* register precisa de mais espaço */
}

/* ── Card ───────────────────────────────────────────────────── */
.auth-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ─────────────────────────────────────────────────── */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}

.auth-logo i { font-size: 36px; color: #fff; }

.auth-title {
    font-size: 32px;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 15px;
    color: #94a3b8;
    font-weight: 500;
}

/* ── Alertas ────────────────────────────────────────────────── */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert i { font-size: 20px; flex-shrink: 0; }

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

/* ── Formulário ─────────────────────────────────────────────── */
.form-group { margin-bottom: 24px; }

/* Dois campos lado a lado (register) */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 10px;
}

.form-input-wrapper { position: relative; }

.form-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 20px;
    transition: color 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 16px 20px 16px 54px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-input::placeholder { color: #64748b; }

.form-input:focus {
    outline: none;
    background: rgba(15, 23, 42, 0.8);
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-input:focus ~ .form-input-icon { color: #3b82f6; }

/* Fallback: ícone antes do input no DOM — usado em alguns navegadores */
.form-input-wrapper:focus-within .form-input-icon { color: #3b82f6; }

/* ── Toggle de senha ────────────────────────────────────────── */
.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 20px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover { color: #3b82f6; }

/* ── Barra de força da senha ────────────────────────────────── */
.password-strength {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
}

.password-strength-fill.weak   { width: 33%;  background: #ef4444; }
.password-strength-fill.medium { width: 66%;  background: #f59e0b; }
.password-strength-fill.strong { width: 100%; background: #10b981; }

.password-strength-text { color: #64748b; }

/* ── Opções (lembrar-me / esqueci) ──────────────────────────── */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* ── Checkbox ───────────────────────────────────────────────── */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3b82f6;
    margin-top: 2px;
    flex-shrink: 0;
}

.form-checkbox label {
    font-size: 14px;
    color: #cbd5e1;
    cursor: pointer;
    font-weight: 500;
    line-height: 1.5;
}

.form-checkbox label a,
.form-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-checkbox label a:hover,
.form-link:hover { color: #60a5fa; }

/* ── Botão principal ────────────────────────────────────────── */
.btn-submit {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    color: #fff !important;
    font-family: 'Inter', sans-serif;
    -webkit-appearance: none;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.btn-submit:hover  { transform: translateY(-3px); }
.btn-submit:active { transform: translateY(-1px); }

/* Login — azul */
.btn-submit.login {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}
.btn-submit.login:hover  { box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4); }

/* Register — verde */
.btn-submit.register {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}
.btn-submit.register:hover { box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4); }

/* Recuperar / Redefinir — laranja (mesma cor da logo) */
.btn-submit.recuperar,
.btn-submit.redefinir {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}
.btn-submit.recuperar:hover,
.btn-submit.redefinir:hover { box-shadow: 0 12px 32px rgba(255, 107, 53, 0.4); }

/* ── Rodapé do card ─────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.auth-footer p {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

.auth-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.auth-footer a:hover { color: #60a5fa; }

/* ── Voltar ao login (link sutil) ───────────────────────────── */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 28px;
    transition: color 0.3s ease;
}

.auth-back:hover { color: #f1f5f9; }

/* ── Responsivo ─────────────────────────────────────────────── */
@media (max-width: 576px) {
    .auth-card {
        padding: 32px 24px;
    }

    .auth-title {
        font-size: 26px;
    }

    .auth-subtitle {
        font-size: 14px;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}