/* ==========================================
   ESTILOS PARA RELATÓRIOS UNIFICADOS
   ========================================== */

/* Cards de seleção de equipamentos - Estilo da Home */
.checkbox-card-ru {
	cursor: pointer;
	display: block;
	margin-bottom: 0;
}

.checkbox-card-ru input[type="checkbox"] {
	display: none;
}

.checkbox-card-ru input[type="checkbox"]:checked + .equipment-card-module {
	box-shadow: 0 0 0 4px #b13536 !important;
	transform: scale(1.05);
	border: 3px solid #b13536;
}

.equipment-card-module {
	background: white;
	border-radius: 8px;
	padding: 15px;
	text-align: center;
	transition: all 0.3s ease;
	cursor: pointer;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	border: 2px solid transparent;
	min-height: 120px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 100%;
}

.equipment-card-module:hover {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.equipment-image {
	margin-bottom: 10px;
}

.equipment-image img {
	width: 48px;
	height: 48px;
	object-fit: contain;
}

.equipment-name {
	font-size: 12px;
	font-weight: 600;
	color: #333;
	text-align: center;
	line-height: 1.2;
	word-wrap: break-word;
}

/* Grid de equipamentos - Responsivo */
#lista_equipamentos_ru {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 15px;
}

/* Tablets e telas médias */
@media (max-width: 1200px) {
	#lista_equipamentos_ru {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Tablets pequenos */
@media (max-width: 768px) {
	#lista_equipamentos_ru {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Celulares */
@media (max-width: 480px) {
	#lista_equipamentos_ru {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.equipment-card-module {
		min-height: 100px;
		padding: 10px;
	}
	
	.equipment-image img {
		width: 36px;
		height: 36px;
	}
	
	.equipment-name {
		font-size: 11px;
	}
}

/* Botões de tipo de relatório */
.tipo-relatorio-btn {
	transition: all 0.3s ease;
}

.tipo-relatorio-btn.active {
	background: #b13536 !important;
	box-shadow: 0 0 0 3px #b13536;
}

.tipo-relatorio-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Cards principais */
.card {
	border-radius: 10px !important;
	overflow: hidden;
}

.card .header.bg-red {
	background: #b13536 !important;
	color: white !important;
	padding: 20px;
	border-bottom: none;
    border-radius: 10px;
    margin: 0px;
    margin-top: 3px;
}

.card .header.bg-red h2 {
	color: white !important;
	margin: 0;
}

.card .header.bg-red small {
	color: rgba(255,255,255,0.9);
	display: block;
	margin-top: 5px;
}

/* Separador de equipamentos no relatório consolidado */
.separador-equipamento {
	break-inside: avoid;
	page-break-inside: avoid;
	margin: 30px 0 20px 0;
	padding: 15px;
	border-radius: 5px;
	background: #b13536;
}

.separador-equipamento h3 {
	margin: 0;
	color: white;
}

/* Corpo do relatório */
.relatorio-equipamento {
	break-inside: avoid;
	page-break-inside: avoid;
	margin-bottom: 30px;
}

.corpo-relatorio {
	padding: 20px;
	background: #fff;
}

/* Header do relatório */
.header-relatorio {
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #b13536;
}

/* Legendas - devem aparecer no final de cada página */
.footerlegenda {
	page-break-inside: avoid !important;
	margin-top: 10px !important;
	margin-bottom: 10px !important;
}

@media print {
	.footerlegenda {
		page-break-before: avoid !important;
	}
}

/* Animações suaves */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.card {
	animation: slideIn 0.3s ease;
}

/* Responsividade */
@media (max-width: 768px) {
	.checkbox-card .card .body {
		padding: 15px !important;
	}
	
	.checkbox-card .card .body i {
		font-size: 36px !important;
	}
	
	.checkbox-card .card .body h5 {
		font-size: 14px !important;
	}
	
	.tipo-relatorio-btn {
		font-size: 14px !important;
		padding: 15px !important;
	}
}

/* Melhorias visuais */
.form-group {
	margin-bottom: 20px;
}

.form-line {
	position: relative;
}

.form-line b {
	display: block;
	margin-bottom: 5px;
	color: #333;
	font-weight: 600;
}

/* Estilos para o resumo de geração */
#resumo_geracao {
	font-size: 14px;
}

#resumo_geracao strong {
	color: #b13536;
}

/* Alertas personalizados */
.alert-info,
.alert-warning,
.alert-danger {
	border-radius: 8px;
	padding: 15px;
	margin: 10px 0;
}

.alert-info {
	background: #E3F2FD;
	color: #1976D2;
	border-left: 4px solid #1976D2;
}

.alert-warning {
	background: #FFF3E0;
	color: #F57C00;
	border-left: 4px solid #F57C00;
}

.alert-danger {
	background: #FFEBEE;
	color: #b13536;
	border-left: 4px solid #b13536;
}

/* Estilos para resultado consolidado */
#resultado_relatorio_unificado_ru {
	padding: 20px;
	background: white;
}

/* Separador de equipamento melhorado */
.separador-equipamento {
	background: #b13536;
	padding: 15px 20px;
	margin: 30px 0 20px 0;
	border-left: 5px solid #8a2829;
	border-radius: 5px;
	display: flex;
	align-items: center;
}

.separador-equipamento h3 {
	margin: 0;
	color: white;
	display: flex;
	align-items: center;
	font-size: 22px;
	font-weight: 600;
}

.separador-equipamento img {
	width: 32px;
	height: 32px;
	margin-right: 12px;
	vertical-align: middle;
}

/* Conteúdo do relatório individual */
.conteudo-relatorio-individual {
	margin: 20px 0;
	padding: 20px;
	background: white;
	border-radius: 8px;
}

/* Botões de ação consolidado */
.acoes-consolidado {
	position: sticky;
	top: 0;
	background: white;
	padding: 20px;
	border-bottom: 2px solid #e0e0e0;
	z-index: 100;
	margin-bottom: 20px;
}

/* Impressão - esconde separadores coloridos, mostra títulos simples */
@media print {
	/* Esconde TODOS os elementos de interface e navegação */
	.acoes-consolidado,
	.btnprint,
	.btn,
	button,
	.loading-relatorio,
	#loader,
	#loaderprint,
	.navbar,
	#leftsidebar,
	.page-loader-wrapper {
		display: none !important;
		visibility: hidden !important;
		position: absolute !important;
		left: -9999px !important;
	}
	
	/* ESCONDE COMPLETAMENTE o separador de equipamento na impressão */
	.separador-equipamento {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		border: none !important;
		position: absolute !important;
		left: -9999px !important;
	}
	
	/* Corpo do relatório - REMOVE TODOS OS ESPAÇOS */
	body {
		background: white !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	
	#resultado_relatorio_unificado_ru {
		padding: 0 !important;
		margin: 0 !important;
	}
	
	#content-master {
		margin: 0 !important;
		padding: 0 !important;
	}
	
	/* Garante que tabelas não quebrem no meio */
	.tablerelatorio,
	.toprelatorio,
	.toprelatorio2 {
		page-break-inside: avoid !important;
	}
	
	/* Primeiro elemento dentro do primeiro conteúdo também sem margem */
	.conteudo-relatorio-individual:first-child > *:first-child {
		margin-top: 0 !important;
		padding-top: 0 !important;
	}
	
	/* Garante que divs vazias não ocupem espaço */
	div:empty {
		display: none !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
	}


	/* ==========================================
	ESPAÇAMENTO ENTRE RELATÓRIOS
	========================================== */

	/* A partir do segundo relatório, adiciona espaçamento no topo */
	.conteudo-relatorio-individual ~ .conteudo-relatorio-individual .toprelatorio:first-child {
		margin-top: 40px !important;
	}

	/* Garante que o primeiro .toprelatorio não tenha margem extra */
	#resultado_relatorio_unificado_ru .conteudo-relatorio-individual:first-child .toprelatorio:first-child {
		margin-top: 0 !important;
	}

	
}

.footerlegenda {
	margin-top: 0px !important;
}

.toprelatorio th div {
	transform: none!important;
	float: left;
}

.toprelatorio th {
	text-align:left!important;
}

/* Loading state */
.loading-relatorio {
	text-align: center;
	padding: 40px;
}

.loading-relatorio h4 {
	color: #b13536;
	margin-bottom: 20px;
}

/* Preloader customizado */
.preloader.pl-size-xl {
	width: 80px;
	height: 80px;
	margin: 0 auto;
}

.preloader .spinner-layer {
	border-color: #b13536;
}

