@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;700&display=swap');

/* ============================================================
    RESET E ESTRUTURA GLOBAL
   ============================================================ */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    -webkit-tap-highlight-color: transparent;
}

/* Evita o balanço para os lados (horizontal) e garante altura total */
html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden; /* TRAVA O SCROLL LATERAL */
}

body {
    background: #050a18;
    display: flex;
    align-items: center;      /* CENTRALIZA VERTICAL NO PC */
    justify-content: center;   /* CENTRALIZA HORIZONTAL NO PC */
    position: relative;
    padding: 20px;
    min-height: 100vh;
}

.orb {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    opacity: 0.2;
    pointer-events: none; /* Garante que as orbes não atrapalhem cliques */
}
.orb-1 { background: #0066ff; top: -10%; right: -5%; }
.orb-2 { background: #003366; bottom: -10%; left: -5%; }

/* ============================================================
    CONTAINER PRINCIPAL
   ============================================================ */
.main-container {
    display: flex;
    width: 100%;
    max-width: 850px; 
    min-height: 580px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    z-index: 10;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.info-side {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    text-align: center;   
    background: rgba(10, 20, 40, 0.8);
}

.terapeuta-tag {
    color: #00d2ff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.info-side h2 { 
    color: #fff; 
    font-size: 2.2rem; 
    margin-bottom: 15px; 
    line-height: 1.2; 
}

.info-side p { 
    color: #a0aec0; 
    font-size: 1rem; 
    line-height: 1.5; 
    max-width: 300px; 
}

.form-side {
    flex: 1;
    padding: 40px;
    background: #f2f4f7; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-trg { 
    width: 180px; 
    margin-bottom: 25px; 
    align-self: center; 
}

h1 { color: #050a18; font-size: 1.5rem; margin-bottom: 20px; text-align: center; }

/* ============================================================
    INPUTS E REQUISITOS
   ============================================================ */
.input-group { margin-bottom: 15px; }

.input-group label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.input-group input {
    width: 100%;
    padding: 12px 20px;
    background: #ffffff;
    border: 2px solid #cbd5e0;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    color: #050a18;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: #0066ff;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper input { padding-right: 60px; }

.toggle-password {
    position: absolute;
    right: 15px;
    color: #0066ff;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    display: flex;
    align-items: center;
    user-select: none;
}

#pass-reqs {
    background: #fff;
    padding: 15px;
    border-radius: 15px;
    margin-top: 10px; 
    margin-bottom: 15px;
    display: none;
    border: 1px solid #fed7d7;
}

.req-text { 
    font-size: 0.8rem; 
    display: block; 
    margin-bottom: 4px; 
    color: #ff4d4d; 
    font-weight: 600;
}

/* ============================================================
    BOTÕES E MENSAGENS
   ============================================================ */
.btn-premium {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0066ff 0%, #00d2ff 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease, opacity 0.3s;
}

.btn-premium:active { transform: scale(0.98); }

#mensagem-info {
    margin-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    min-height: 1.2rem;
}

.toggle-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #4a5568;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

/* ============================================================
    AJUSTE FINAL PARA CELULAR (SEM SCROLL - FUNDO AZUL VISÍVEL)
   ============================================================ */
@media (max-width: 600px) {
    body { 
        padding: 20px; 
        padding-bottom: 80px; /* Truque para subir o centro visualmente */
        align-items: center; 
        justify-content: center;
        overflow: hidden; 
        height: 100vh;
        width: 100vw;
        position: fixed; 
    }

    .main-container { 
        flex-direction: column; 
        min-height: auto; 
        max-width: 100%;
        width: 100%;
        border-radius: 24px; /* Bordas arredondadas visíveis */
        margin: 0; 
        box-shadow: 0 15px 50px rgba(0,0,0,0.6); /* Sombra forte para destacar do fundo */
        border: 1px solid rgba(255,255,255,0.15);
        background: transparent;
        height: auto;
        max-height: 90vh; /* Não ocupa a tela toda */
        justify-content: center;
        overflow: hidden;
    }

    /* MODO LOGIN (Padrão): Exibe Info Side Compacto */
    .info-side { 
        display: flex;
        padding: 15px;
        min-height: auto;
        height: auto;
        background: rgba(10, 20, 40, 0.95);
        flex-shrink: 0; 
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    /* MODO CADASTRO (Ativado por JS): Esconde Info Side */
    body.cadastro-v .info-side {
        display: none !important;
    }

    .terapeuta-tag { margin-bottom: 5px; font-size: 0.75rem; color: #38bdf8; }
    .info-side h2 { font-size: 1rem; margin-bottom: 5px; line-height: 1.3; }
    .info-side p { 
        font-size: 0.75rem; 
        margin: 0; 
        opacity: 0.8; 
        display: -webkit-box; 
        -webkit-line-clamp: 2; 
        line-clamp: 2; /* Propriedade padrão para compatibilidade */
        -webkit-box-orient: vertical; 
        overflow: hidden; 
    }

    .form-side { 
        padding: 20px; 
        flex: 1; 
        justify-content: center;
        background: rgba(242, 244, 247, 0.95); 
        backdrop-filter: blur(10px);
    }

    .logo-trg { 
        width: 100px; 
        margin-bottom: 12px; 
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    h1 { font-size: 1.2rem; margin-bottom: 12px; }

    .input-group { margin-bottom: 10px; }
    
    .input-group input { 
        padding: 10px 15px; 
        font-size: 16px; 
    }

    .btn-premium { 
        padding: 12px; 
        font-size: 0.95rem; 
        margin-top: 5px;
        box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    }
    
    #pass-reqs {
        padding: 10px;
        margin-top: 5px;
        margin-bottom: 8px;
        background: rgba(255,255,255,0.8);
    }

    /* Ajustes específicos para Cadastro */
    body.cadastro-v .logo-trg { width: 85px; margin-bottom: 8px; }
    body.cadastro-v h1 { font-size: 1.1rem; margin-bottom: 8px; }
    body.cadastro-v .input-group { margin-bottom: 8px; }
    body.cadastro-v .btn-premium { padding: 10px; }
    
    .msg-erro-card {
        font-size: 0.75rem; 
        padding: 8px 10px;
        white-space: nowrap; 
        justify-content: center; 
        width: 100%;
        margin-bottom: 8px;
    }
}

/* ============================================================
    VALIDAÇÃO CUSTOMIZADA (IGUAL CHECKOUT)
   ============================================================ */
.msg-erro-card {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: none; 
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.input-error {
    border-color: #ff4d4d !important;
    background-color: #fff5f5 !important;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }