/* ============================================================
   RESET E BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-50: #eff6ff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --success: #16a34a;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-focus: 0 0 0 4px rgba(37, 99, 235, 0.10);
    --radius: 12px;
    --radius-lg: 20px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

/* ============================================================
   FUNDO ANIMADO COM GRADIENTES MÓVEIS
   ============================================================ */
.background-animated {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
}

.bg-gradient-1 {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15), transparent 70%);
    border-radius: 50%;
    animation: floatGradient1 20s ease-in-out infinite;
}

.bg-gradient-2 {
    position: absolute;
    bottom: -40%;
    right: -10%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.10), transparent 70%);
    border-radius: 50%;
    animation: floatGradient2 25s ease-in-out infinite;
}

.bg-gradient-3 {
    position: absolute;
    top: 20%;
    right: 20%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.08), transparent 70%);
    border-radius: 50%;
    animation: floatGradient3 18s ease-in-out infinite;
}

@keyframes floatGradient1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

@keyframes floatGradient2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 20px) scale(1.2); }
}

@keyframes floatGradient3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.15); }
}

/* ============================================================
   PARTÍCULAS FLUTUANTES
   ============================================================ */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: floatParticle linear infinite;
}

.particle:nth-child(1) { width: 80px; height: 80px; top: 10%; left: 5%; animation-duration: 25s; animation-delay: 0s; }
.particle:nth-child(2) { width: 120px; height: 120px; top: 70%; right: 8%; animation-duration: 30s; animation-delay: 2s; }
.particle:nth-child(3) { width: 60px; height: 60px; top: 40%; left: 15%; animation-duration: 20s; animation-delay: 4s; }
.particle:nth-child(4) { width: 100px; height: 100px; bottom: 20%; right: 20%; animation-duration: 28s; animation-delay: 1s; }
.particle:nth-child(5) { width: 50px; height: 50px; top: 15%; right: 30%; animation-duration: 22s; animation-delay: 3s; }
.particle:nth-child(6) { width: 90px; height: 90px; bottom: 40%; left: 25%; animation-duration: 26s; animation-delay: 5s; }
.particle:nth-child(7) { width: 70px; height: 70px; top: 60%; right: 40%; animation-duration: 24s; animation-delay: 2s; }
.particle:nth-child(8) { width: 110px; height: 110px; top: 25%; left: 60%; animation-duration: 32s; animation-delay: 0s; }

@keyframes floatParticle {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -40px) rotate(90deg); }
    50% { transform: translate(-20px, 30px) rotate(180deg); }
    75% { transform: translate(40px, 20px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* ============================================================
   CONTAINER
   ============================================================ */
.login-container {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 32px 32px 26px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.10);
    animation: fadeInUp 0.8s ease;
    max-height: 98vh;
    overflow-y: auto;
}

.login-container::-webkit-scrollbar {
    width: 4px;
}
.login-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}
.login-container::-webkit-scrollbar-track {
    background: transparent;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(99, 102, 241, 0.10));
    border-radius: var(--radius-lg);
    z-index: -1;
    filter: blur(4px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================
   HEADER
   ============================================================ */
.login-header {
    text-align: center;
    margin-bottom: 22px;
}

.login-header .icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border-radius: 16px;
    color: var(--white);
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
    animation: pulse 2.5s ease-in-out infinite;
}

/* 🔥 Garantir que o ícone (chapéu) ocupe todo o espaço */
.login-header .icon-wrapper i,
.login-header .icon-wrapper .fas,
.login-header .icon-wrapper .fa-graduation-cap {
    font-size: 32px;
    line-height: 1;
    display: inline-block;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(-2deg); }
}

.login-header h1 {
    font-size: 29px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.4px;
}

.login-header h1 span {
    font-size: inherit !important;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    text-shadow: 0 1px 0 rgba(37, 99, 235, 0.08);
}

.login-header p {
    color: var(--gray-500);
    font-size: 14px;
    margin-top: 4px;
}

/* ============================================================
   TABS
   ============================================================ */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================================
   FORMULÁRIO
   ============================================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group label i {
    color: var(--gray-400);
    margin-right: 6px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-800);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:focus {
    border-color: var(--gray-200);
    background: var(--gray-50);
    box-shadow: none;
}

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

select.form-control {
    appearance: auto;
    cursor: pointer;
}

select.form-control option {
    padding: 8px;
}

small {
    display: block;
    margin-top: 5px;
    color: var(--gray-500);
    font-size: 12px;
}

.hint-text {
    color: var(--gray-500);
    font-size: 12px;
    margin-top: 4px;
}

.required-badge {
    color: #ef4444;
    font-size: 0.9em;
}

/* ============================================================
   OPÇÕES
   ============================================================ */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.form-options .remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
}

.form-options .remember:hover {
    color: var(--gray-800);
}

.form-options .remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-options .forgot-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.form-options .forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================================
   BOTÃO LOGIN
   ============================================================ */
.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.20);
}

.btn-login:hover {
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.30);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   BOTÃO CADASTRO
   ============================================================ */
.btn-register {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.20);
}

.btn-register:hover {
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.30);
}

.btn-register:active {
    transform: scale(0.98);
}

.btn-register:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   DIVISOR REFINADO
   ============================================================ */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 18px 0;
    color: var(--gray-500);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 1.2px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--gray-400),
        transparent
    );
}

.divider span {
    padding: 0 2px;
    white-space: nowrap;
}

/* ============================================================
   WHATSAPP - BOTÃO SECUNDÁRIO DISCRETO
   ============================================================ */
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-500);
    font-size: 12.5px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    opacity: 0.85;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.whatsapp-link:hover {
    background: var(--gray-50);
    border-color: #25d366;
    color: #128c7e;
    opacity: 1;
}

.whatsapp-link:active {
    transform: scale(0.99);
}

.whatsapp-link i {
    font-size: 15px;
    color: #25d366;
    opacity: 0.9;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.whatsapp-link:hover i {
    color: #128c7e;
    opacity: 1;
}

/* ============================================================
   CADASTRO LINK
   ============================================================ */
.register-link {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--gray-600);
}

.register-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.register-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================================
   RODAPÉ - DISCRETO
   ============================================================ */
.footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-200);
    font-size: 11px;
    color: var(--gray-400);
    opacity: 0.7;
    letter-spacing: 0.2px;
    transition: opacity 0.3s ease;
}

.footer:hover {
    opacity: 1;
}

/* ============================================================
   ALERTAS
   ============================================================ */
.alert {
    display: none;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.alert-error {
    background: #fef2f2;
    border: 2px solid #fca5a5;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 2px solid #86efac;
    color: var(--success);
}

.alert-info {
    background: #eff6ff;
    border: 2px solid #93c5fd;
    color: #2563eb;
}

/* ============================================================
   SELEÇÃO DE ROLE (ALUNO / PROFESSOR)
   ============================================================ */
.role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.role-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    gap: 6px;
}

.role-option i {
    font-size: 28px;
    color: var(--gray-400);
}

.role-option span {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

.role-option:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
}

.role-option.active {
    border-color: var(--primary);
    background: var(--primary-50);
    box-shadow: var(--shadow-focus);
}

.role-option.active i {
    color: var(--primary);
}

.role-option.active span {
    color: var(--primary-dark);
}

/* ============================================================
   CAMPOS ESPECÍFICOS POR ROLE
   ============================================================ */
.role-fields {
    display: none;
}

.role-fields.active {
    display: block;
}

/* ============================================================
   ACESSIBILIDADE - RADIO BUTTONS
   ============================================================ */
.acessibilidade-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.acessibilidade-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
    color: var(--gray-700);
}

.acessibilidade-options input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.condicao-acessibilidade {
    display: none;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.condicao-acessibilidade.visible {
    display: block;
}

/* ============================================================
   RADIO - ESTILO PADRÃO
   ============================================================ */
input[type="radio"] {
    accent-color: var(--primary);
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 480px) {
    .login-container {
        padding: 28px 20px 24px;
        border-radius: 16px;
        max-height: 100vh;
    }

    .login-header h1 {
        font-size: 25px;
    }

    .login-header h1 span {
        font-size: inherit !important;
    }

    /* 🔥 Chapéuzinho MAIOR no mobile */
    .login-header .icon-wrapper {
        width: 76px;
        height: 76px;
        font-size: 36px;
        margin-bottom: 14px;
    }

    .login-header .icon-wrapper i,
    .login-header .icon-wrapper .fas,
    .login-header .icon-wrapper .fa-graduation-cap {
        font-size: 42px;
        line-height: 1;
        display: inline-block;
    }

    .form-control {
        font-size: 13px;
        padding: 10px 12px;
    }

    .btn-login, .btn-register {
        font-size: 14px;
        padding: 11px;
    }

    .form-options {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .whatsapp-link {
        font-size: 12.5px;
        padding: 8px 16px;
    }

    .role-selection {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .role-option {
        padding: 12px 8px;
    }

    .role-option i {
        font-size: 22px;
    }

    .role-option span {
        font-size: 12px;
    }

    .acessibilidade-options {
        gap: 12px;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 20px 14px 18px;
    }

    .login-header h1 {
        font-size: 21px;
    }

    .login-header h1 span {
        font-size: inherit !important;
    }

    /* 🔥 Chapéuzinho grande também no mobile pequeno */
    .login-header .icon-wrapper {
        width: 70px;
        height: 70px;
        font-size: 32px;
        margin-bottom: 12px;
    }

    .login-header .icon-wrapper i,
    .login-header .icon-wrapper .fas,
    .login-header .icon-wrapper .fa-graduation-cap {
        font-size: 38px;
        line-height: 1;
        display: inline-block;
    }

    .particle {
        display: none;
    }

    .role-selection {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   CAMPO DE SENHA COM BOTÃO OLHINHO (MOSTRAR/OCULTAR)
   ============================================================ */
.password-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px !important;
    box-sizing: border-box;
}

/* Botão do olhinho - DISCRETO, só aparece quando digita */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 5px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, opacity 0.25s ease, transform 0.25s ease;
    z-index: 5;
    border-radius: 50%;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;

    /* Escondido por padrão */
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Quando o campo tem texto: aparece */
.password-wrapper.tem-texto .toggle-password {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.toggle-password:hover {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.08);
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.9);
}

.toggle-password:focus {
    outline: none;
    color: #4f46e5;
}

/* Estado ativo (senha visível) */
.toggle-password.ativo {
    color: #4f46e5;
}

/* Remove o ícone de "revelar senha" nativo do Edge/IE */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* Ajuste em mobile */
@media (max-width: 480px) {
    .toggle-password {
        right: 10px;
        font-size: 0.9rem;
        padding: 4px 5px;
    }
    .password-wrapper input {
        padding-right: 40px !important;
    }
}

/* ============================================================
   LOGIN SOCIAL (GOOGLE / MICROSOFT)
   ============================================================ */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-social:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-social:active {
    transform: scale(0.99);
}

.btn-social:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-social svg {
    flex-shrink: 0;
}

.btn-google:hover {
    border-color: #4285f4;
}

.btn-microsoft:hover {
    border-color: #00a4ef;
}

/* ============================================================
   🔥 CORREÇÃO: EVITAR "TREMOR" DO CONTAINER AO DIGITAR
   ============================================================ */

/* 1. Reservar o espaço da scrollbar SEMPRE (evita layout shift) */
html {
    overflow-y: scroll; /* scrollbar sempre presente */
    scrollbar-gutter: stable; /* reserva o espaço, evitando pulo */
}

/* 2. Evitar shift horizontal quando o conteúdo do input cresce */
.login-container {
    /* Mantém a largura fixa mesmo com scrollbar aparecendo */
    scrollbar-gutter: stable both-edges;
    
    /* Remove a animação de entrada que pode causar repaint ao digitar */
    animation: fadeInUp 0.8s ease;
    animation-fill-mode: both;
    
    /* Força uma camada de composição (GPU) - evita repaint */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    
    /* Previne mudança de largura quando a scrollbar interna aparece */
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: 440px; /* Reforça o limite */
}

/* 3. Impedir que o input "empurre" o layout ao digitar */
.form-control,
.password-wrapper input {
    /* Fixa largura e evita que o texto ultrapasse */
    width: 100%;
    max-width: 100%;
    min-width: 0; /* 🔥 ESSENCIAL: impede crescimento em flex/grid */
    
    /* Evita o "salto" quando o texto fica grande */
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* Impede zoom automático em iOS ao focar (que causa reflow) */
    font-size: 16px;
}

/* Em desktop volta ao tamanho original */
@media (min-width: 769px) {
    .form-control,
    .password-wrapper input {
        font-size: 14px;
    }
}

/* 4. Fixar a altura do label (evita movimento vertical) */
.form-group label {
    display: block;
    height: 20px;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 5. Evitar que o autocomplete do Chrome "empurre" o layout */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    /* Remove a mudança brusca de cor/estilo */
    -webkit-text-fill-color: var(--gray-800);
    -webkit-box-shadow: 0 0 0px 1000px var(--gray-50) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* 6. Previne "tremor" do background animado durante digitação */
.background-animated,
.particles {
    /* Força composição em GPU e evita repaint no typing */
    will-change: transform;
    transform: translateZ(0);
    pointer-events: none;
}

/* 7. Evita que o container centralize de novo quando conteúdo muda */
body {
    /* Fixa a altura da viewport para evitar reflow */
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* 8. Desabilita transições que podem causar "lag visual" */
.login-container,
.login-container * {
    transition-property: color, background-color, border-color, box-shadow, opacity;
    transition-duration: 0.2s;
}

/* ⚠️ IMPORTANTE: remove transition de `all` do olhinho (senão treme) */
.toggle-password {
    transition: color 0.2s ease, opacity 0.25s ease, transform 0.25s ease !important;
}