/**
 * 5etools - Auth Gate Stylesheet
 * Estilos para bloqueio de tela e modal de autenticação por senha
 */

/* Bloqueio imediato do conteúdo quando a página está travada */
html.auth-locked body > *:not(#auth-gate-container) {
	display: none !important;
}

html.auth-locked body {
	overflow: hidden !important;
	background-color: #0d0f12 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Container do Auth Gate em tela cheia */
#auth-gate-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 2147483647; /* Máximo z-index possível */
	background: radial-gradient(circle at 50% 35%, #1c202a 0%, #0d0f14 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #e2e8f0;
	user-select: none;
}

/* Cartão / Modal de Login */
.auth-card {
	width: 100%;
	max-width: 440px;
	background: #171a21;
	border: 1px solid #2d3340;
	border-radius: 12px;
	padding: 32px 28px;
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
	text-align: center;
	position: relative;
	animation: authFadeIn 0.3s ease-out;
}

@keyframes authFadeIn {
	from {
		opacity: 0;
		transform: translateY(-12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Ícone de Escudo / Cadeado */
.auth-icon-wrap {
	width: 64px;
	height: 64px;
	margin: 0 auto 18px auto;
	background: linear-gradient(135deg, rgba(220, 53, 69, 0.15), rgba(186, 24, 27, 0.25));
	border: 1px solid rgba(220, 53, 69, 0.35);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #e53e3e;
}

.auth-icon-svg {
	width: 30px;
	height: 30px;
	fill: currentColor;
}

/* Títulos */
.auth-title {
	margin: 0 0 6px 0;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.auth-badge {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	background: rgba(220, 53, 69, 0.2);
	color: #fc8181;
	border: 1px solid rgba(220, 53, 69, 0.4);
	padding: 2px 8px;
	border-radius: 4px;
	letter-spacing: 1px;
}

.auth-desc {
	margin: 0 0 24px 0;
	font-size: 14px;
	line-height: 1.5;
	color: #94a3b8;
}

/* Formulário */
.auth-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	text-align: left;
}

.auth-field-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.auth-label {
	font-size: 13px;
	font-weight: 600;
	color: #cbd5e1;
}

.auth-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.auth-input {
	width: 100%;
	background: #0f1217;
	border: 1px solid #333c4d;
	border-radius: 8px;
	padding: 12px 44px 12px 14px;
	font-size: 15px;
	color: #ffffff;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.auth-input:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.auth-input-toggle {
	position: absolute;
	right: 10px;
	background: none;
	border: none;
	padding: 6px;
	cursor: pointer;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
}

.auth-input-toggle:hover {
	color: #94a3b8;
}

.auth-options {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	color: #94a3b8;
	margin-top: -4px;
}

.auth-remember-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
}

.auth-checkbox {
	width: 16px;
	height: 16px;
	accent-color: #3b82f6;
	cursor: pointer;
	margin: 0;
}

/* Botão de Enviar */
.auth-btn-submit {
	background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
	border: 1px solid #1e40af;
	color: #ffffff;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.auth-btn-submit:hover {
	background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

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

/* Mensagem de Erro */
.auth-error {
	display: none;
	padding: 10px 14px;
	border-radius: 6px;
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.35);
	color: #fca5a5;
	font-size: 13px;
	line-height: 1.4;
	text-align: center;
	animation: authShake 0.4s ease-in-out;
}

@keyframes authShake {
	0%, 100% { transform: translateX(0); }
	20%, 60% { transform: translateX(-6px); }
	40%, 80% { transform: translateX(6px); }
}

/* Rodapé */
.auth-footer {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid #222733;
	font-size: 12px;
	color: #64748b;
	line-height: 1.5;
}
