/* ============================================== */
/* === FLUXEDGE - VARIÁVEIS & MODO ESCURO     === */
/* ============================================== */
/* ============================================== */
/* === FLUXEDGE - VARIÁVEIS & MODO ESCURO     === */
/* ============================================== */
:root {
    --flux-azul-primario: #2563EB;
    --flux-azul-hover: #1D4ED8;
    --flux-fundo: #F8FAFC;
    --flux-card-bg: #FFFFFF;
    --flux-texto-forte: #0F172A;
    --flux-texto-suave: #64748B;
    --flux-borda: #E2E8F0;
    --flux-input-bg: #F1F5F9;
}

/* O Segredo do Dark Mode (Nível Root) */
:root[data-theme="dark"] {
    --flux-fundo: #0F172A !important;
    --flux-card-bg: #1E293B !important;
    --flux-texto-forte: #F8FAFC !important;
    --flux-texto-suave: #94A3B8 !important;
    --flux-borda: #334155 !important;
    --flux-input-bg: #0F172A !important;
}

/* Transição suave para o logo */
.flux-logo { transition: filter 0.4s ease; }

/* Inverte o logo (fica branco) APENAS no Modo Escuro */
:root[data-theme="dark"] .flux-logo {
    filter: brightness(0) invert(1);
}

/* Transição suave para todas as cores */
body, .flux-wizard-container, .flux-input-wrapper input, .flux-input-readonly {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* Garante que a transição de cor seja suave em todos os elementos */
.flux-wizard-container, 
.flux-input-wrapper input, 
.flux-input-readonly, 
.wizard-step {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* ============================================== */
/* === CABEÇALHO FIXO & SCROLL ELEGANTE       === */
/* ============================================== */
.flux-wizard-container {
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Segura o tamanho do card */
}

.flux-wizard-header {
    flex-shrink: 0; /* Impede o cabeçalho de encolher */
    z-index: 10;
}

.flux-wizard-form {
    overflow-y: auto; /* Cria a barra de rolagem só no formulário */
    padding-right: 20px; /* Dá espaço para a barra */
}

/* Scrollbar Customizada (Estilo Mac/Premium) */
.flux-wizard-form::-webkit-scrollbar { width: 6px; }
.flux-wizard-form::-webkit-scrollbar-track { background: transparent; }
.flux-wizard-form::-webkit-scrollbar-thumb { background: var(--flux-borda); border-radius: 10px; }
.flux-wizard-form::-webkit-scrollbar-thumb:hover { background: var(--flux-texto-suave); }

/* ============================================== */
/* === BOTÃO DE TEMA E RODAPÉ                 === */
/* ============================================== */
.flux-theme-toggle {
    position: fixed;
    top: 20px; right: 20px;
    background: var(--flux-card-bg);
    border: 1px solid var(--flux-borda);
    color: var(--flux-texto-forte);
    width: 45px; height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 9999;
}
.flux-theme-toggle:hover { transform: scale(1.1); }

.flux-footer-fixo {
    position: fixed;
    bottom: 15px; width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--flux-texto-suave);
    font-family: 'Inter', sans-serif;
}
.flux-footer-fixo a { color: var(--flux-azul-primario); text-decoration: none; font-weight: 600; }

/* =============== */

.flux-login-body {
    font-family: 'Inter', sans-serif;
    background-color: var(--flux-fundo);
    color: var(--flux-texto-forte);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Fundo premium com leve brilho azul nas pontas */
    background-image: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.05), transparent 40%);
}

.flux-login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    box-sizing: border-box;
}

.flux-login-card {
    background-color: var(--flux-card-bg);
    border: 1px solid var(--flux-borda);
    border-radius: 12px;
    padding: 40px 35px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
}

.flux-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.flux-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.flux-subtitle {
    color: var(--flux-texto-suave);
    font-size: 0.9rem;
    margin: 0;
}

/* Alertas */
.flux-alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.flux-alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.flux-alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Formulário e Inputs */
.flux-form-group {
    margin-bottom: 20px;
}

.flux-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--flux-texto-forte);
}

.flux-input-icon {
    position: absolute;
    left: 15px;
    color: var(--flux-texto-suave);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.flux-input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 42px;
    background-color: var(--flux-input-bg);
    border: 1px solid var(--flux-borda);
    color: var(--flux-texto-forte);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.flux-input-wrapper input:focus {
    outline: none;
    border-color: var(--flux-azul-primario);
    background-color: var(--flux-card-bg);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.flux-input-wrapper input:focus + .flux-input-icon,
.flux-input-wrapper input:focus ~ .flux-input-icon {
    color: var(--flux-azul-primario);
}

.flux-forgot-link {
    font-size: 0.8rem;
    color: var(--flux-azul-primario);
    text-decoration: none;
    font-weight: 500;
}

.flux-forgot-link:hover {
    text-decoration: underline;
}

/* Botão */
.flux-btn-primary {
    width: 100%;
    padding: 14px;
    background-color: var(--flux-azul-primario);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.flux-btn-primary:hover {
    background-color: var(--flux-azul-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

/* Rodapé de Registro */
.flux-login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.85rem;
    color: var(--flux-texto-suave);
    line-height: 1.6;
}

.flux-login-footer a {
    color: var(--flux-azul-primario);
    font-weight: 600;
    text-decoration: none;
}

.flux-login-footer a:hover {
    text-decoration: underline;
}

/* ============================================== */
/* === ENVELOPES E ÍCONES DOS INPUTS          === */
/* ============================================== */
.flux-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%; /* Força a caixa a ter o tamanho exato do input */
}

.flux-eye-icon {
    position: absolute;
    right: 15px; 
    top: 50%; /* Joga pro meio */
    transform: translateY(-50%); /* Centraliza matematicamente na vertical */
    color: var(--flux-texto-suave);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s ease;
    z-index: 10;
}

.flux-eye-icon:hover {
    color: var(--flux-azul-primario);
}

.flux-input-wrapper input[type="password"],
.flux-input-wrapper input.password-visible {
    padding-right: 45px !important; /* Dá espaço para o texto não invadir o olho */
}

/* ============================================== */
/* === ÍCONES DA SENHA (OLHINHO E GERADOR)    === */
/* ============================================== */
.flux-eye-icon {
    position: absolute;
    right: 15px; 
    top: 50%;
    transform: translateY(-50%);
    color: var(--flux-texto-suave);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s ease;
    z-index: 10;
}

.flux-magic-icon {
    position: absolute;
    right: 45px; 
    top: 50%;
    transform: translateY(-50%);
    color: var(--flux-texto-suave);
    cursor: pointer;
    font-size: 1.2rem;
    border-bottom: 2px solid transparent; /* Reserva o espaço da linha */
    transition: all 0.2s ease;
}

.flux-magic-icon:hover {
    color: var(--flux-azul-primario);
}

.flux-eye-icon:hover, .flux-magic-icon:hover {
    color: var(--flux-azul-primario);
}

/* Espaço extra para caber os 2 ícones na direita! */
.flux-input-wrapper input[type="password"],
.flux-input-wrapper input.password-visible {
    padding-right: 75px !important; 
}