/* Login com a paleta da Carex: vermelho, verde, branco e preto. Uma pilula vermelha se expande e
   revela o painel preto; o botao "Entrar" e verde e, no hover, cresce e as letras sobem. */

.cx-login-corpo {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: #ffffff;
    font-family: var(--cx-font);
    -webkit-font-smoothing: antialiased;
}

.cx-login-palco {
    width: 100%;
    max-width: 400px;
}

.cx-login-cartao {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 2.25rem 2rem 2rem;
    border-radius: 32px;
    background: #111827;
    color: #ffffff;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(17, 24, 39, 0.35);
}

/* Pilula vermelha: nasce no centro, cresce ate cobrir o cartao e depois some, revelando o painel */
.cx-login-liquido {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    pointer-events: none;
    animation: cx-login-liquido 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cx-login-liquido span {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

@keyframes cx-login-liquido {
    0% { clip-path: inset(44% 36% 44% 36% round 999px); opacity: 1; }
    55% { clip-path: inset(0% 0% 0% 0% round 32px); opacity: 1; }
    100% { clip-path: inset(0% 0% 0% 0% round 32px); opacity: 0; }
}

.cx-login-conteudo {
    position: relative;
    z-index: 1;
    animation: cx-login-entrar 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

@keyframes cx-login-entrar {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.cx-login-marca {
    margin: 0;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.cx-login-titulo {
    margin: 0.35rem 0 1.75rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
}

.cx-login-campo { margin-bottom: 1.1rem; }

.cx-login-rotulo {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.cx-login-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-family: var(--cx-font);
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.cx-login-input::placeholder { color: rgba(255, 255, 255, 0.35); }

.cx-login-input:focus {
    outline: none;
    border-color: #059669;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3);
}

/* Autopreenchimento do navegador pinta o campo de azul claro; mantemos o painel preto */
.cx-login-input:-webkit-autofill,
.cx-login-input:-webkit-autofill:hover,
.cx-login-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1f2937 inset;
    -webkit-text-fill-color: #ffffff;
    caret-color: #ffffff;
    transition: background-color 5000s ease-in-out 0s;
}

/* Botao verde: ao passar o mouse cresce um pouco e as letras sobem */
.cx-login-entrar {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.95rem;
    border: none;
    border-radius: 72px;
    background: #059669;
    color: #ffffff;
    font-family: var(--cx-font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, background-color 0.3s ease;
}

.cx-login-entrar:hover {
    transform: scale(1.03);
    background: #047857;
    box-shadow: 0 10px 24px -10px rgba(5, 150, 105, 0.6);
}

.cx-login-entrar:active { transform: scale(0.98); }
.cx-login-entrar:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }

.cx-login-esqueci {
    display: block;
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.3s ease;
}

.cx-login-esqueci:hover { color: #34d399; }

.cx-login-aviso {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
}

.cx-login-aviso.is-erro {
    background: rgba(220, 38, 38, 0.18);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.cx-login-aviso.is-sucesso {
    background: rgba(5, 150, 105, 0.18);
    color: #a7f3d0;
    border: 1px solid rgba(52, 211, 153, 0.4);
}

@media (max-width: 480px) {
    .cx-login-cartao { padding: 2rem 1.5rem 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .cx-login-liquido { display: none; }
    .cx-login-conteudo { animation: none; }
    .cx-login-entrar,
    .cx-login-input,
    .cx-login-esqueci { transition: none; }
}
