/* ========================================
   LOGIN EXTRAORDINARY DESIGN
   Rewritten for robust alignment & "Top" aesthetics
   ======================================== */

:root {
    --bg-dark: #0f172a;
    --primary-color: #3b82f6;
    --accent-color: #6366f1;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
}

body.login-page {
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.login-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* === LADO ESQUERDO (PRESERVADO O QUE O USER GOSTOU) === */
.login-info-section {
    flex: 1.2;
    background:
        linear-gradient(135deg, rgba(8, 15, 30, 0.92), rgba(17, 24, 39, 0.85)),
        url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop');
    /* Conexão Global */
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem;
    position: relative;
    overflow: hidden;
}

.login-info-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
    animation: pulseGlow 15s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

.info-content {
    position: relative;
    z-index: 10;
    max-width: 550px;
    animation: slideInLeft 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.info-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.info-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0.8;
}

.benefits-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: transform 0.3s ease, background 0.3s;
    backdrop-filter: blur(5px);
}

.benefit-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
}

.benefit-icon {
    color: var(--accent-color);
    width: 20px;
    height: 20px;
}

.benefit-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 400;
}

/* === LADO DIREITO (FORMULÁRIO - COMPLETAMENTE REESCRITO) === */
.login-form-section {
    flex: 0.8;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    z-index: 20;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.3);
    /* Sombra mais forte para separar do background */
}

/* Barra separadora sutil */
.login-form-section::after {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    animation: fadeIn 1.2s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* FORM GROUP & INPUTS - O CORAÇÃO DA CORREÇÃO */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

/* Classe crítica para esconder o Label acessivelmente sem quebrar layout */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Input Styles */
.form-control {
    width: 100%;
    height: 56px;
    /* Altura generosa para clique fácil */
    padding: 0 16px 0 50px;
    /* Esquerda: espaço seguro para ícone */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* Crucial */
}

.form-control::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

/* Ícone Absoluto - Centralização Matemática */
.form-icon {
    position: absolute;
    left: 18px;
    /* Afastamento da borda */
    top: 50%;
    transform: translateY(-50%);
    /* Centralização vertical exata */
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    pointer-events: none;
    /* Não interfere no clique */
    transition: color 0.3s, transform 0.3s;
    z-index: 5;
}

/* Estado Focus no Ícone */
.form-control:focus~.form-icon,
/* Se o ícone for irmão (sibling) */
.form-control:focus+.form-icon

/* Se for adjacente direto */
    {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Botão Submit */
.btn-primary {
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    filter: brightness(1.1);
}

/* Opções de Login */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

/* Checkbox customizado */
.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: all 0.2s;
}

.form-check-input::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 0.2s transform ease-in-out;
    box-shadow: inset 1em 1em white;
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.form-check-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:checked::before {
    transform: scale(1);
}

.login-options a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.login-options a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Animações */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }

    .login-info-section {
        padding: 3rem;
        flex: 0.4;
        min-height: 250px;
    }

    .info-title {
        font-size: 1.8rem;
    }

    .info-subtitle,
    .benefits-list {
        display: none;
    }

    .login-form-section {
        flex: 0.6;
        padding: 2rem;
    }

    .login-form-section::after {
        display: none;
    }
}