.cpf-totem {
	--cpf-azul: #2563eb;
	--cpf-azul-escuro: #1e40af;
	--cpf-verde: #16a34a;
	--cpf-vermelho: #dc2626;
	--cpf-cinza: #64748b;
	--cpf-fundo: #f8fafc;
	--cpf-borda: #e2e8f0;

	max-width: 640px;
	width: 100%;
	margin: 0 auto;
	padding: 24px 16px 48px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}

.cpf-totem * {
	box-sizing: border-box;
}

.cpf-tela {
	display: none;
	width: 100%;
}

.cpf-tela.cpf-ativa {
	display: block;
}

.cpf-titulo {
	text-align: center;
	font-size: 1.6rem;
	margin: 0 0 4px;
	color: #0f172a;
}

.cpf-subtitulo {
	text-align: center;
	color: var(--cpf-cinza);
	margin: 0 0 24px;
	font-size: 1rem;
}

.cpf-vazio {
	text-align: center;
	color: var(--cpf-cinza);
	padding: 40px 0;
}

/* Grid de funcionários */
.cpf-grid-funcionarios {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

@media (min-width: 480px) {
	.cpf-grid-funcionarios {
		grid-template-columns: repeat(3, 1fr);
	}
}

.cpf-cartao-funcionario {
	background: #fff;
	border: 2px solid var(--cpf-borda);
	border-radius: 16px;
	padding: 18px 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	transition: all .15s ease;
	min-height: 120px;
	justify-content: center;
}

.cpf-cartao-funcionario:active {
	transform: scale(0.96);
	border-color: var(--cpf-azul);
	background: #eff6ff;
}

.cpf-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--cpf-azul);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.3rem;
	font-weight: 600;
	overflow: hidden;
}

.cpf-avatar-foto {
	background: var(--cpf-fundo);
}

.cpf-avatar-foto img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cpf-nome {
	font-weight: 600;
	text-align: center;
	color: #0f172a;
	font-size: 0.95rem;
}

.cpf-cargo {
	font-size: 0.78rem;
	color: var(--cpf-cinza);
}

/* Modal de PIN (flutua por cima da lista de funcionários) */
.cpf-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;
}

.cpf-modal-overlay.cpf-aberto {
	display: flex;
}

.cpf-modal-caixa {
	position: relative;
	background: #fff;
	border-radius: 20px;
	padding: 32px 22px 26px;
	max-width: 360px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.cpf-modal-fechar {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 1.2rem;
	color: var(--cpf-cinza);
	cursor: pointer;
	line-height: 1;
	padding: 6px;
}

/* Tela de PIN */
.cpf-pin-pontos {
	display: flex;
	justify-content: center;
	gap: 18px;
	margin: 28px 0 12px;
}

.cpf-pin-pontos.cpf-shake {
	animation: cpf-shake .4s;
}

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

.cpf-pin-ponto {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid var(--cpf-borda);
	background: #fff;
	transition: all .15s ease;
}

.cpf-pin-ponto.cpf-pin-preenchido {
	background: var(--cpf-azul);
	border-color: var(--cpf-azul);
}

.cpf-pin-erro {
	display: none;
	text-align: center;
	color: var(--cpf-vermelho);
	font-weight: 600;
	margin-bottom: 16px;
	min-height: 20px;
}

.cpf-teclado {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	max-width: 320px;
	margin: 0 auto;
}

.cpf-tecla {
	background: #eef2f7;
	border: 2px solid #cbd5e1;
	border-radius: 14px;
	padding: 18px 0;
	font-size: 1.5rem;
	font-weight: 700;
	color: #0f172a;
	cursor: pointer;
	transition: all .1s ease;
}

.cpf-tecla:active {
	transform: scale(0.94);
	background: #dbeafe;
	border-color: var(--cpf-azul);
}

.cpf-tecla-vazia {
	background: transparent;
	border: none;
	cursor: default;
}

.cpf-tecla-apagar {
	font-size: 1.3rem;
	background: #fee2e2;
	border-color: #fca5a5;
	color: #991b1b;
}

.cpf-tecla-ok {
	font-size: 1.1rem;
	background: var(--cpf-verde);
	border-color: #15803d;
	color: #fff;
}

.cpf-tecla-ok:active:not(:disabled) {
	background: #15803d;
}

.cpf-tecla-ok:disabled {
	background: #e2e8f0;
	border-color: #cbd5e1;
	color: #94a3b8;
	cursor: not-allowed;
	transform: none;
}

/* Tela de marcação */
.cpf-voltar {
	background: none;
	border: none;
	color: var(--cpf-azul);
	font-size: 1rem;
	padding: 8px 0;
	cursor: pointer;
	margin-bottom: 8px;
}

.cpf-relogio {
	text-align: center;
	font-size: 2.4rem;
	font-weight: 700;
	color: var(--cpf-azul-escuro);
	margin: 4px 0 20px;
	font-variant-numeric: tabular-nums;
}

.cpf-status-dia {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 20px;
	min-height: 24px;
}

.cpf-tag-feito {
	background: #dcfce7;
	color: #166534;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
}

.cpf-botoes-ponto {
	width: 100%;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.cpf-btn-ponto {
	background: #fff;
	border: 2px solid var(--cpf-borda);
	border-radius: 16px;
	padding: 22px 10px;
	font-size: 1.05rem;
	font-weight: 600;
	color: #0f172a;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	transition: all .15s ease;
}

.cpf-btn-ponto .cpf-icone {
	font-size: 1.6rem;
}

.cpf-btn-ponto:active:not(:disabled) {
	transform: scale(0.96);
	border-color: var(--cpf-azul);
}

.cpf-btn-ponto:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.cpf-mensagem {
	display: none;
	margin-top: 20px;
	text-align: center;
	padding: 12px;
	border-radius: 10px;
	font-weight: 500;
}

.cpf-msg-ok {
	background: #eff6ff;
	color: var(--cpf-azul-escuro);
}

.cpf-msg-erro {
	background: #fef2f2;
	color: var(--cpf-vermelho);
}

/* Confirmação */
.cpf-tela-confirmacao {
	text-align: center;
	padding: 60px 0;
}

.cpf-check {
	width: 84px;
	height: 84px;
	border-radius: 50%;
	background: var(--cpf-verde);
	color: #fff;
	font-size: 2.4rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
}
