* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
	background-color: #121212;
	color: #ffffff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
}

h1 {
	margin-bottom: 20px;
	font-size: 1.8rem;
	font-weight: 500;
}

/* Container da Câmera */
.camera-container {
	position: relative;
	width: 480px;
	height: 480px;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
	border: 6px solid #555;
	transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scaleX(-1); /* Espelha a imagem para parecer um espelho */
}

/* Canvas do MediaPipe sobreposto (opcional para desenhar os pontos) */
.mesh-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleX(-1);
    pointer-events: none;
}

/* Guia visual (moldura de alinhamento) */
.overlay-guide {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 260px;
	height: 340px;
	border: 2px dashed rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	pointer-events: none;
}

/* Caixas de Mensagem / Feedback */
.status-card {
	margin-top: 30px;
	padding: 15px 30px;
	border-radius: 12px;
	background-color: #1e1e1e;
	text-align: center;
	min-width: 320px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
	transition: all 0.3s ease;
}

.status-card h2 {
	font-size: 1.4rem;
	margin-bottom: 5px;
}

.status-card p {
	font-size: 0.95rem;
	color: #aaa;
}

/* --- Estados de Reconhecimento --- */

/* Escaneando: Amarelo/Cinza (Aguardando enquadramento/piscada) */
.state-scanning {
	border-color: #ffca28; 
    box-shadow: 0 0 25px rgba(255, 202, 40, 0.5);
}

/* Liveness/Processando: Azul */
.state-liveness {
	border-color: #0088ff; 
    box-shadow: 0 0 25px rgba(0, 136, 255, 0.5);
}
.state-liveness .status-card {
    background-color: #0a1f33;
    color: #0088ff;
}

/* Sucesso: Verde */
.state-success {
	border-color: #00e676 !important; 
    box-shadow: 0 0 25px rgba(0, 230, 118, 0.5);
}
.state-success .status-card {
	background-color: #1b382b;
	color: #00e676;
}

/* Erro: Vermelho */
.state-error {
	border-color: #ff5252;
    box-shadow: 0 0 25px rgba(255, 82, 82, 0.5);
}
.state-error .status-card {
    background-color: #3b1b1b;
	color: #ff5252;
}

/* ---------------------------------------------------------------------------
   Modal de Login
--------------------------------------------------------------------------- */

.hidden {
	display: none !important;
}

.login-overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.login-card {
	background: rgba(30, 30, 30, 0.95);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 40px 36px;
	width: 100%;
	max-width: 380px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.login-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: #ffffff;
}

.login-subtitle {
	font-size: 0.875rem;
	color: #888;
	margin-bottom: 28px;
	line-height: 1.4;
}

.login-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}

.login-field label {
	font-size: 0.8rem;
	color: #aaa;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.login-field input {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	padding: 10px 14px;
	color: #fff;
	font-size: 0.95rem;
	outline: none;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.login-field input:focus {
	border-color: #0088ff;
	background: rgba(0, 136, 255, 0.08);
}

.login-error {
	color: #ff5252;
	font-size: 0.85rem;
	min-height: 1.2em;
	margin-bottom: 12px;
}

.login-btn {
	width: 100%;
	padding: 12px;
	border: none;
	border-radius: 8px;
	background: #0088ff;
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.login-btn:hover:not(:disabled) {
	background: #006fd6;
}

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

/* ---------------------------------------------------------------------------
   Menu Lateral Retrátil (Sidebar)
--------------------------------------------------------------------------- */

.sidebar-toggle {
	position: fixed;
	top: 20px;
	left: 20px;
	z-index: 90;
	background: rgba(30, 30, 30, 0.85);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #ffffff;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle:hover {
	background: rgba(0, 136, 255, 0.2);
	border-color: #0088ff;
	transform: scale(1.05);
}

.sidebar-backdrop {
	position: fixed;
	inset: 0;
	z-index: 94;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
	backdrop-filter: blur(3px);
}

.sidebar-backdrop.active {
	opacity: 1;
	pointer-events: auto;
}

.sidebar {
	position: fixed;
	top: 0;
	left: 0;
	width: 300px;
	height: 100vh;
	background: rgba(22, 22, 26, 0.95);
	border-right: 1px solid rgba(255, 255, 255, 0.1);
	z-index: 95;
	transform: translateX(-100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.sidebar.open {
	transform: translateX(0);
}

.sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header h2 {
	font-size: 1.25rem;
	font-weight: 600;
	color: #fff;
}

.sidebar-close {
	background: none;
	border: none;
	color: #aaa;
	font-size: 1.8rem;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s ease;
}

.sidebar-close:hover {
	color: #fff;
}

.sidebar-content {
	padding: 24px 20px;
	flex: 1;
	overflow-y: auto;
}

.modalidade-section h3 {
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #888;
	margin-bottom: 16px;
}

.radio-group {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.radio-label {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
	user-select: none;
}

.radio-label:hover {
	background: rgba(0, 136, 255, 0.08);
	border-color: rgba(0, 136, 255, 0.3);
}

.radio-label input[type="radio"] {
	display: none;
}

.custom-radio {
	width: 20px;
	height: 20px;
	border: 2px solid #555;
	border-radius: 50%;
	position: relative;
	transition: border-color 0.2s ease;
}

.custom-radio::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0);
	width: 10px;
	height: 10px;
	background-color: #0088ff;
	border-radius: 50%;
	transition: transform 0.2s ease;
}

.radio-label input[type="radio"]:checked + .custom-radio {
	border-color: #0088ff;
}

.radio-label input[type="radio"]:checked + .custom-radio::after {
	transform: translate(-50%, -50%) scale(1);
}

.radio-label input[type="radio"]:checked ~ .radio-text {
	color: #ffffff;
	font-weight: 600;
}

.radio-text {
	font-size: 1rem;
	color: #ccc;
	transition: color 0.2s ease;
}