:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gray: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--bg-gray);
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Logo e Título */
.brand-logo {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.auth-title {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Card */
.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    text-align: left;
}

/* Alerts */
.auth-alert {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.auth-alert-item {
    color: #991b1b;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Inputs */
.auth-input-group {
    margin-bottom: 1.25rem;
}

.auth-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.input-relative {
    position: relative;
}

.auth-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.auth-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: #f9fafb;
    transition: all 0.2s;
    outline: none;
}

.auth-input:focus {
    background-color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Botão */
.auth-btn-submit {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.875rem;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.auth-btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Links */
.auth-forgot-link {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
}

.auth-forgot-link:hover { text-decoration: underline; }

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}
.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}
.auth-divider span {
    background: white;
    padding: 0 10px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.btn-create-account {
    display: block;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s;
}

.btn-create-account:hover {
    background: #f1f5f9;
}

.auth-copyright {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Estilo extra para mensagens de sucesso na recuperação */
.auth-alert-success {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: #166534;
}

.me-1 { margin-right: 0.25rem; }

/* Suporte ao Grid de 2 colunas para Registro */
.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Responsividade: Volta para 1 coluna em telas menores que 500px */
@media (max-width: 500px) {
    .auth-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Utilitário de espaçamento que usamos no link de voltar */
.me-1 { margin-right: 0.25rem; }

/* =========================================
   LOADER GLOBAL (HELPDESK THEME)
   ========================================= */
#helpv-global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.85); /* Fundo branco semi-transparente */
    backdrop-filter: blur(4px); /* Efeito de vidro borrado */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999; /* Fica por cima de tudo */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Classe que o Javascript vai adicionar para mostrar o loader */
#helpv-global-loader.active {
    opacity: 1;
    visibility: visible;
}

#helpv-global-loader .loader-content {
    text-align: center;
    color: #0d6efd; /* Azul padrão do Bootstrap/Sistema */
}

#helpv-global-loader .spinner-icon {
    font-size: 3.5rem;
    display: inline-block;
    animation: spinHelpdesk 1.5s linear infinite; /* Animação de giro */
}

#helpv-global-loader p {
    margin-top: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #4b5563;
    font-family: inherit;
}

/* A mágica do giro */
@keyframes spinHelpdesk {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}