:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #00995D 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 550px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a252f 100%);
    color: white;
    text-align: center;
    /* height: 120px; */
}

.login-header .logo {
    font-size: 42px;
    color: var(--primary-color);
}

.login-header .logo i {
    font-size: 40px;
}

.login-header h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-header p {
    font-size: 13px;
    opacity: 0.8;
    margin: 0;
}

.login-body {
    padding: 25px;
}

.input-group {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
    transition: border-color 0.3s;
}

.input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
    border: none;
    color: #6c757d;
    width: 45px;
    justify-content: center;
    padding: 0.5rem;
}

.input-group .form-control {
    border: none;
    padding-left: 0;
    padding: 0.75rem;
}

.input-group .form-control:focus {
    box-shadow: none;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2980b9 100%);
    border: none;
    color: white;
    padding: 10px 16px;
    font-weight: 600;
    width: 100%;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 15px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1c5a7a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.btn-login:disabled {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #1a5276;
    text-decoration: underline;
}

.login-footer {
    padding: 12px 25px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #666;
    text-align: center;
    background: #f9f9f9;
}

.version-info {
    font-size: 10px;
    color: #999;
    margin-top: 3px;
}

.alert {
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-danger {
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    border-left: 4px solid var(--warning-color);
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
    gap: 8px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 13px;
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.step-text {
    font-size: 11px;
    color: #6c757d;
    text-align: center;
}

.step.active .step-text {
    color: var(--primary-color);
    font-weight: 500;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e9ecef;
    margin-top: 16px;
}

.user-info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.user-info-card h6 {
    color: var(--secondary-color);
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
}

.user-info-item {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
}

.user-info-label {
    font-weight: 600;
    min-width: 120px;
    color: #495057;
    margin-bottom: 2px;
    font-size: 15px;
}

.user-info-value {
    color: #6c757d;
    flex: 1;
    min-width: 0;
    word-break: break-word;
    font-size: 15px;
}

/* Estilo específico para email */
.email-display {
    background-color: #e8f4fc;
    border: 1px solid #cce5ff;
    border-radius: 5px;
    padding: 10px;
    margin-top: 5px;
    word-break: break-all;
    word-wrap: break-word;
    font-family: monospace;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 500;
    text-align: center;
}

/* Botões de voltar/entrar mais compactos */
.btn-action {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    min-width: 100px;
}

.btn-outline-secondary {
    border: 1px solid #dee2e6;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* Formulários mais compactos */
.form-label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #495057;
    font-size: 14px;
}

.form-control {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Ajustes para telas menores */
@media (max-width: 768px) {
    .login-container {
        max-width: 95%;
    }
    
    .login-body {
        padding: 20px;
    }
    
    .step {
        width: 65px;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .step-text {
        font-size: 10px;
    }
    
    .user-info-label {
        min-width: 110px;
    }
    
    .btn-action {
        min-width: 90px;
        padding: 7px 14px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .login-header {
        padding: 20px 15px;
    }
    
    .login-header .logo {
        font-size: 36px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .login-body {
        padding: 18px;
    }
    
    .step {
        width: 55px;
    }
    
    .user-info-item {
        flex-direction: column;
    }
    
    .user-info-label {
        min-width: auto;
        margin-bottom: 4px;
    }
    
    .btn-action {
        min-width: 80px;
        padding: 6px 12px;
    }
}

/* Espaçamentos otimizados */
.mb-3 {
    margin-bottom: 16px !important;
}

.mb-4 {
    margin-bottom: 20px !important;
}

.mt-4 {
    margin-top: 20px !important;
}

/* Ajuste para os botões de ação do email */
.btn-email-action {
    padding: 10px 16px;
    font-size: 14px;
    margin-bottom: 8px;
}

/* Textos menores */
small.text-muted {
    font-size: 12px;
}

/* Card de informações mais compacto */
.card {
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.card-body {
    padding: 15px;
}

/* Ícones menores */
.fas, .bi {
    font-size: 14px;
}

/* Ajuste para o passo "gerar_senha" */
.fa-check-circle.fa-4x {
    font-size: 3rem;
    margin-bottom: 15px;
}

 #loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999999; /* Coloca o overlay acima de tudo */
    font-family: Arial, sans-serif;
}
/* Estilo do spinner */
.spinner {
    border: 6px solid rgba(255, 255, 255, 0.3); /* Fundo do spinner */
    border-top: 6px solid #fff; /* Cor da borda superior */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

/* Animação do spinner */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}