/* ============================================= */
/* PRINT.CSS - COMPLETE & FIXED FOR LOGO + WORD  */
/* ============================================= */

/* ── Document Containers ── */
.doc-landscape,
.doc-outline {
	background: white;
	font-family: "Times New Roman", Times, serif;
	width: 100%;
	max-width: 1080px;
	min-height: 720px;
	margin: 0 auto 28px;
	padding: 0.55in 0.65in 0.55in 0.65in;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 8px 30px rgba(0,0,0,0.08);
	border: 1px solid #d1d5db;
	border-radius: 3px;
	page-break-after: always;
	position: relative;
	overflow-x: auto;
	box-sizing: border-box;
}

.doc-portrait {
	background: white;
	font-family: "Times New Roman", Times, serif;
	width: 100%;
	max-width: 760px;
	min-height: 1050px;
	margin: 0 auto 28px;
	padding: 0.65in 0.7in 0.65in 0.7in;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 8px 30px rgba(0,0,0,0.08);
	border: 1px solid #d1d5db;
	border-radius: 3px;
	page-break-after: always;
	position: relative;
	box-sizing: border-box;
}

/* ── Professional Header - Logo on Right ── */
.doc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 3px double #0f172a;
}

.doc-header-left {
	flex: 1;
	text-align: center;
}

.doc-header-right {
	flex-shrink: 0;
	width: 100px;
	height: 78px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.doc-header-right img {
	max-width: 100px;
	max-height: 78px;
	object-fit: contain;
}

.doc-institution {
	font-size: 17px;
	font-weight: 900;
	color: #0f172a;
	text-transform: uppercase;
	letter-spacing: 1.1px;
	line-height: 1.25;
	margin-bottom: 7px;
}

.doc-title {
	display: inline-block;
	font-size: 12.8px;
	font-weight: 700;
	padding: 7px 26px;
	border: 2.5px solid #0f172a;
	border-radius: 30px;
	color: #0f172a;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	background: white;
	white-space: nowrap;
}

/* ── Tables - Strong borders for all documents ── */
table {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0;
	font-size: 10pt;
	table-layout: fixed;
	word-wrap: break-word;
	overflow: hidden;
	border: 2px solid #0f172a;
}

th {
	background-color: #e2e8f0;
	color: #1e293b;
	border: 1px solid #0f172a;
	padding: 8px 6px;
	font-weight: 700;
	text-align: center;
	font-size: 9.5pt;
	letter-spacing: 0.3px;
	vertical-align: middle;
}

td {
	border: 1px solid #0f172a;
	padding: 7px 6px;
	vertical-align: top;
	line-height: 1.45;
	font-size: 10pt;
	word-break: break-word;
	overflow-wrap: break-word;
}

/* Alternating row shading */
tbody tr:nth-child(even) td {
	background-color: #f8fafc;
}
tbody tr:hover td {
	background-color: #fffbeb;
}

/* Section / group-header rows */
.doc-landscape tr.section-header td,
.doc-outline tr.section-header td,
.doc-landscape tr.row-header td,
.doc-outline tr.row-header td,
tr.section-header td,
tr.row-header td {
	background-color: #cbd5e1 !important;
	color: #0f172a !important;
	font-weight: 700 !important;
	font-size: 9.5pt !important;
	letter-spacing: 0.2px !important;
	border-color: #0f172a !important;
}

/* First-column accent */
.doc-landscape td:first-child,
.doc-outline td:first-child,
td:first-child {
	font-weight: 700 !important;
	color: #1e3a8a !important;
	text-align: center !important;
	background-color: inherit;
}

/* Second-column accent */
.doc-landscape td:nth-child(2),
.doc-outline td:nth-child(2) {
	font-weight: 700 !important;
	color: #1e3a8a !important;
	text-align: center !important;
}

/* Minimum row height */
.doc-landscape tbody tr,
.doc-outline tbody tr {
	min-height: 28px;
}

/* Meta info table */
.doc-meta {
	width: 100%;
	margin: 10px 0 16px;
	border: 2px solid #0f172a;
}

.doc-meta td {
	padding: 6px 10px;
	border: 1px solid #0f172a !important;
	font-size: 9.8pt;
	line-height: 1.4;
}

.doc-meta .label {
	background: #f1f5f9 !important;
	font-weight: 700;
	width: 140px;
	color: #374151;
}

/* Footer & Signature */
.document-footer {
	margin-top: 28px;
	padding-top: 12px;
	border-top: 2px solid #0f172a;
}

.signature-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-top: 14px;
}

.signature-item {
	text-align: center;
	padding: 8px 6px 10px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
}

.signature-line {
	border-top: 1px solid #374151;
	margin-top: 26px;
	padding-top: 6px;
	font-size: 9.5pt;
	font-weight: 600;
	color: #1e293b;
}

.signature-label {
	font-size: 8.5pt;
	font-weight: 700;
	margin-top: 2px;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.6px;
}

/* Mobile table scroll wrapper */
.table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 15px 0;
}
.table-scroll table {
	margin: 0;
	min-width: 600px;
}

/* ── Named @page rules ── */
@page landscape-page {
	size: A4 landscape;
	margin: 0.45in 0.5in;
}
@page portrait-page {
	size: A4 portrait;
	margin: 0.5in 0.55in;
}
@page {
	size: A4 portrait;
	margin: 0.5in;
}

.doc-landscape,
.doc-outline {
	page: landscape-page;
}
.doc-portrait {
	page: portrait-page;
}

/* ── Print & Word Export Optimizations ── */
@media print {
	body {
		background: none !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		color-adjust: exact;
	}

	.doc-landscape,
	.doc-outline,
	.doc-portrait {
		box-shadow: none !important;
		border: none !important;
		border-radius: 0 !important;
		max-width: 100% !important;
		width: 100% !important;
		min-height: 0 !important;
		margin: 0 !important;
		padding: 0.45in 0.5in !important;
	}

	.doc-header {
		margin-bottom: 18px;
	}
	.doc-title {
		border: 2.5px solid #0f172a !important;
		font-size: 11pt;
		padding: 6px 22px;
	}
	.doc-institution {
		font-size: 15pt;
	}

	/* Strong borders for Word */
	table {
		border: 2px solid #0f172a !important;
	}
	th, td {
		border: 1px solid #0f172a !important;
	}

	/* Preserve alternating rows */
	tbody tr:nth-child(even) td {
		background-color: #f8fafc !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.doc-meta .label {
		background: #f1f5f9 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	/* Page break control */
	.doc-landscape + .doc-landscape,
	.doc-outline + .doc-outline,
	.doc-portrait + .doc-portrait {
		page-break-before: always;
	}

	table {
		page-break-inside: auto;
		font-size: 9pt;
	}
	tr {
		page-break-inside: avoid;
	}
	td, th {
		font-size: 9pt;
		padding: 5px 5px;
	}
	.table-scroll {
		overflow: visible !important;
	}
	.document-footer {
		page-break-inside: avoid;
	}
	.signature-item {
		background: #f9fafb !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}