/* Relatório PDF / impressão — padrão editorial (fundo branco, respiro, logo no relatório todo) */

@page {
	size: A4;
	margin: 18mm 14mm 16mm 14mm;
}

body.print-mode {
	background: #fff !important;
	color: #111827;
}

body.print-mode .app-sidebar,
body.print-mode #kt_app_header,
body.print-mode .app-toolbar,
body.print-mode #kt_app_footer,
body.print-mode #kt_app_toolbar,
body.print-mode [gerarPDFRelatorio],
body.print-mode #drillDownBar,
body.print-mode .modal,
body.print-mode #modalCompetidores {
	display: none !important;
}

body.print-mode #kt_app_main {
	margin: 0 !important;
	padding: 0 !important;
}

body.print-mode #kt_app_content_container {
	max-width: none;
}

.print-running-header,
.print-running-footer {
	display: none;
}

body.print-mode .print-running-header {
	display: flex;
	align-items: center;
	gap: 10px;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 12mm;
	padding: 0 14mm;
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	z-index: 1;
	font-size: 9px;
	color: #6b7280;
	letter-spacing: 0.02em;
}

.print-running-logo {
	height: 7mm;
	width: auto;
	max-width: 42mm;
	object-fit: contain;
}

.print-running-title {
	font-weight: 600;
	color: #111827;
	flex: 1;
}

.print-running-periodo {
	margin-left: auto;
	white-space: nowrap;
}

body.print-mode .print-running-footer {
	display: flex;
	justify-content: space-between;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	height: 10mm;
	padding: 0 14mm;
	background: #fff;
	border-top: 1px solid #e5e7eb;
	z-index: 1;
	font-size: 8px;
	color: #9ca3af;
	align-items: center;
}

.print-cover {
	position: relative;
	z-index: 2;
	background: #fff;
	color: #111827;
	min-height: 262mm;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 18mm 12mm 22mm;
	page-break-after: always;
	break-after: page;
}

.print-cover-inner {
	width: 100%;
	max-width: 170mm;
}

.print-cover-logo {
	display: block;
	height: auto;
	max-height: 22mm;
	max-width: 70mm;
	margin: 0 auto 14mm;
	object-fit: contain;
}

.print-cover-kicker {
	margin: 0 0 8px;
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #6b7280;
	font-weight: 500;
}

.print-cover h1 {
	margin: 0;
	font-size: 34px;
	font-weight: 600;
	letter-spacing: -0.03em;
	color: #111827;
	line-height: 1.2;
}

.print-cover-rule {
	width: 36px;
	border: 0;
	border-top: 1px solid #111827;
	margin: 18px auto;
}

.print-cover-cliente {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 500;
	color: #111827;
}

.print-cover-periodo {
	margin: 0;
	font-size: 13px;
	color: #4b5563;
}

.print-cover-foot {
	position: absolute;
	bottom: 8mm;
	left: 0;
	right: 0;
	margin: 0;
	font-size: 9px;
	color: #9ca3af;
	text-align: center;
}

body.print-mode #relatoriosPDF .card {
	background: #fff !important;
	box-shadow: none !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 6px;
	break-inside: avoid;
	page-break-inside: avoid;
}

body.print-mode #relatoriosPDF .bg-light,
body.print-mode #relatoriosPDF .card.bg-light {
	background: #fff !important;
}

body.print-mode #relatoriosPDF .fs-2hx.text-primary,
body.print-mode #relatoriosPDF .fs-3.text-primary {
	color: #111827 !important;
	font-size: 15px !important;
	letter-spacing: -0.02em;
	width: 100%;
	padding-bottom: 6px;
	margin-bottom: 10px;
	border-bottom: 1px solid #e5e7eb;
}

body.print-mode #relatoriosPDF [initRelatorio] {
	min-height: 180px;
}

body.print-mode #relatoriosPDF .text-danger.fs-2hx,
body.print-mode #relatoriosPDF h1.text-danger {
	color: #111827 !important;
}

@media print {
	body {
		background: #fff !important;
		color: #111827;
	}

	.no-print,
	[gerarPDFRelatorio],
	#drillDownBar,
	#modalCompetidores,
	.app-sidebar,
	#kt_app_header,
	.app-toolbar,
	#kt_app_footer,
	#kt_app_toolbar {
		display: none !important;
	}

	.print-running-header {
		display: flex;
		align-items: center;
		gap: 10px;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		height: 12mm;
		padding: 0 14mm;
		background: #fff;
		border-bottom: 1px solid #e5e7eb;
		font-size: 9px;
		color: #6b7280;
	}

	.print-running-footer {
		display: flex;
		justify-content: space-between;
		align-items: center;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		height: 10mm;
		padding: 0 14mm;
		background: #fff;
		border-top: 1px solid #e5e7eb;
		font-size: 8px;
		color: #9ca3af;
	}

	#relatoriosPDF .card {
		background: #fff !important;
		box-shadow: none !important;
		border: 1px solid #e5e7eb !important;
		break-inside: avoid;
		page-break-inside: avoid;
	}

	#relatoriosPDF .fs-2hx.text-primary,
	#relatoriosPDF .fs-3.text-primary {
		color: #111827 !important;
		font-size: 15px !important;
		border-bottom: 1px solid #e5e7eb;
		padding-bottom: 6px;
	}
}
