@keyframes rg-shimmer {
	0% { background-position: -120% 0; }
	100% { background-position: 120% 0; }
}

.rg-skel {
	background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
	background-size: 400% 100%;
	animation: rg-shimmer 1.4s ease infinite;
	border-radius: 6px;
}

.rg-grid {
	display: grid;
	gap: 10px;
	margin-bottom: 15px;
}

.rg-card {
	--rg-cor: #2196F3;
	--rg-cor-fundo: rgba(33,150,243,0.12);
	position: relative;
	background: #fff;
	border-radius: 14px;
	padding: 12px;
	border: 1px solid #eee;
	border-left: 4px solid var(--rg-cor);
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	min-width: 0;
}

.rg-card-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 1;
}

.rg-card-clicavel {
	cursor: pointer;
}

.rg-card-clicavel:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.rg-card-icone {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--rg-cor-fundo);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 8px;
}

.rg-card-icone .material-icons {
	font-size: 19px;
	color: var(--rg-cor);
}

.rg-card-label {
	font-size: 10px;
	font-weight: 700;
	color: #8a8f98;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	line-height: 1.3;
	margin-bottom: 3px;
}

.rg-card-valor {
	font-size: 24px;
	font-weight: 800;
	color: #263238;
	margin-bottom: 4px;
}

.rg-card-detalhes {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-top: auto;
	padding-top: 8px;
	border-top: 1px dashed #eee;
}

.rg-card-detalhe {
	display: flex;
	align-items: center;
	font-size: 10.5px;
	color: #666;
	gap: 5px;
}

.rg-card-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	flex-shrink: 0;
}

.rg-card-detalhe-label {
	flex: 1;
}

.rg-card-detalhe-valor {
	font-weight: 700;
}

.rg-card-rodape {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #f0f0f0;
	font-size: 10.5px;
	color: #777;
	line-height: 1.6;
}

@keyframes rg-pulse {
	0%, 100% { box-shadow: 0 2px 10px rgba(244,67,54,0.15); }
	50% { box-shadow: 0 8px 22px rgba(244,67,54,0.4); }
}

.rg-card-alerta {
	animation: rg-pulse 2s ease infinite;
}

.rg-skeleton-card {
	border-left-color: #eee;
}

.rg-skeleton-icone {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	margin-bottom: 8px;
}

.rg-skeleton-linha {
	width: 70%;
	height: 8px;
	margin-bottom: 10px;
}

.rg-skeleton-valor {
	width: 45%;
	height: 18px;
}

.rg-gauges {
	display: grid;
	gap: 12px;
}

.rg-gauge-card {
	background: #fff;
	border: 1px solid #f0f0f0;
	border-radius: 14px;
	padding: 14px;
	text-align: center;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	display: flex;
	flex-direction: column;
	align-items: center;
}

.rg-gauge-titulo {
	color: #333;
	margin: 0 0 10px 0;
	font-weight: 700;
	font-size: 12.5px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.rg-gauge-titulo .material-icons {
	font-size: 16px;
}

.rg-gauge-svg {
	width: 100%;
	max-width: 190px;
	height: auto;
}

.rg-gauge-valor {
	font-size: 28px;
	font-weight: 800;
	fill: #263238;
}

.rg-gauge-rotulo {
	font-size: 9px;
	fill: #888;
}

.rg-gauge-detalhes {
	margin-top: 8px;
	font-size: 11px;
	color: #666;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.rg-gauge-explicacao {
	/* empurra a explicação pro fim do card (flex column) — assim os 3 gauges
	   ficam com a caixa "Como esse percentual é calculado" alinhada no mesmo
	   nível embaixo, mesmo quando um tem menos conteúdo acima (ex: Conformidade).
	   align-self:stretch pra não encolher com o align-items:center do card. */
	align-self: stretch;
	margin-top: auto;
	padding: 10px 12px;
	background: rgba(0,0,0,0.03);
	border-radius: 8px;
	text-align: left;
	font-size: 10.5px;
	color: #666;
	line-height: 1.5;
}

.rg-gauge-explicacao strong {
	color: #333;
	margin-right: 4px;
}

.rg-gauge-explicacao strong .material-icons {
	font-size: 13px;
	vertical-align: middle;
	margin-right: 3px;
}

.rg-gauge-explicacao-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
}

.rg-gauge-explicacao-seta {
	font-size: 16px;
	color: #888;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.rg-gauge-explicacao-corpo {
	margin-top: 6px;
}

@media (max-width: 480px) {
	.rg-card-valor {
		font-size: 20px;
	}
}
