/**
 * login.css — Engajex Login Page
 * Depende de: design-tokens.css, cards.css (via style.css @import)
 */

/* ============================================================
   RESET PARA ESTA PÁGINA
   ============================================================ */
body.page-login {
    background: var(--slate-950);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    min-height: 100vh;
    overflow: hidden;
}


/* ============================================================
   LAYOUT SPLIT
   ============================================================ */
.login-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}


/* ============================================================
   PAINEL ESQUERDO — Branding
   ============================================================ */
.login-panel--brand {
    flex: 1;
    background: linear-gradient(145deg,
        var(--indigo-900) 0%,
        var(--indigo-700) 40%,
        var(--violet-600) 75%,
        #5b21b6 100%
    );
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Glows decorativos */
.login-panel--brand::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 65%);
    top: -120px;
    right: -120px;
    border-radius: 50%;
    pointer-events: none;
}

.login-panel--brand::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 65%);
    bottom: -80px;
    left: -60px;
    border-radius: 50%;
    pointer-events: none;
}

/* Grades flutuantes decorativas */
.login-brand__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* Cabeçalho do painel */
.login-brand__header {
    position: relative;
    z-index: 1;
}

.login-brand__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.login-brand__logo img {
    height: 36px;
    width: auto;
}

/* Conteúdo central */
.login-brand__body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 0;
}

.login-brand__tagline {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(196, 181, 253, 0.8);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-brand__tagline::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: rgba(196, 181, 253, 0.6);
    border-radius: 2px;
}

.login-brand__title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    margin: 0 0 1.25rem;
    letter-spacing: -0.03em;
}

.login-brand__title span {
    background: linear-gradient(to right, #c4b5fd, #a5f3fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-brand__subtitle {
    font-size: 1rem;
    color: rgba(226, 232, 240, 0.75);
    line-height: 1.65;
    max-width: 400px;
    margin-bottom: 2.5rem;
}

/* Lista de features */
.login-brand__features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.login-brand__features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(226, 232, 240, 0.9);
    font-size: 0.9375rem;
    font-weight: 500;
}

.login-brand__features li i {
    width: 22px;
    height: 22px;
    min-width: 22px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    color: #a5f3fc;
}

/* Rodapé do painel de marca */
.login-brand__footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.login-brand__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.85);
}

.login-brand__badge i {
    color: #4ade80;
    font-size: 0.6875rem;
}

/* Formas geométricas decorativas */
.login-brand__shapes {
    position: absolute;
    right: 2rem;
    bottom: 6rem;
    z-index: 0;
    opacity: 0.12;
}

.login-brand__shapes .shape {
    position: absolute;
    border: 2px solid white;
    border-radius: 12px;
}

.login-brand__shapes .shape-1 {
    width: 120px;
    height: 120px;
    transform: rotate(15deg);
    top: 0; right: 0;
}

.login-brand__shapes .shape-2 {
    width: 80px;
    height: 80px;
    transform: rotate(-10deg);
    top: 60px; right: 80px;
    border-radius: 50%;
}

.login-brand__shapes .shape-3 {
    width: 50px;
    height: 50px;
    transform: rotate(30deg);
    top: 160px; right: 20px;
}


/* ============================================================
   PAINEL DIREITO — Formulário
   ============================================================ */
.login-panel--form {
    width: 480px;
    min-width: 480px;
    background: var(--slate-900);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 3rem;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.login-form-wrap {
    width: 100%;
    max-width: 380px;
}

/* Header do formulário */
.login-form-header {
    margin-bottom: 2rem;
}

.login-form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--slate-50);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.login-form-header p {
    font-size: 0.9375rem;
    color: var(--slate-400);
    margin: 0;
}

/* Alertas */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.login-alert--success {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.login-alert--error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.login-alert i {
    margin-top: 1px;
    flex-shrink: 0;
}

/* Grupos de formulário */
.login-form .form-group {
    margin-bottom: 1.125rem;
}

.login-form .form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-300);
    margin-bottom: 0.5rem;
}

.login-form .form-control {
    width: 100%;
    height: 46px;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.625rem;
    color: var(--slate-100);
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    outline: none;
    -webkit-appearance: none;
}

.login-form .form-control::placeholder {
    color: var(--slate-600);
}

.login-form .form-control:focus {
    border-color: var(--indigo-500);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.login-form .form-control:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.18);
}

/* Input com ícone */
.input-wrap {
    position: relative;
}

.input-wrap .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-500);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.15s ease;
}

.input-wrap .form-control {
    padding-left: 2.75rem;
}

.input-wrap .form-control:focus ~ .input-icon,
.input-wrap:focus-within .input-icon {
    color: var(--indigo-400);
}

/* Toggle de senha */
.input-wrap .toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--slate-500);
    cursor: pointer;
    padding: 0;
    font-size: 0.875rem;
    transition: color 0.15s ease;
}

.input-wrap .toggle-password:hover {
    color: var(--slate-300);
}

/* Botão submit */
.login-form .btn-submit {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--indigo-600) 0%, var(--violet-600) 100%);
    color: white;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    margin-top: 1.5rem;
    transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    letter-spacing: 0.01em;
}

.login-form .btn-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.login-form .btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* Rodapé do formulário */
.login-form-footer {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.875rem;
    color: var(--slate-500);
}

.login-form-footer a {
    color: var(--indigo-400);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.login-form-footer a:hover {
    color: var(--indigo-300);
}

.login-form-footer .divider {
    display: inline-block;
    margin: 0 0.5rem;
    color: var(--slate-700);
}


/* ============================================================
   ANIMAÇÃO DE ENTRADA
   ============================================================ */
@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-form-wrap {
    animation: loginFadeIn 0.45s ease both;
}

.login-panel--brand .login-brand__body {
    animation: loginFadeIn 0.5s ease 0.1s both;
}


/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 900px) {
    .login-panel--brand {
        display: none;
    }

    .login-panel--form {
        width: 100%;
        min-width: 0;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-panel--form {
        padding: 1.5rem 1.25rem;
        align-items: flex-start;
        padding-top: 3rem;
    }
}
