@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
	--amplla-navy: #272d46;
	--amplla-teal: #2695a0;
	--amplla-mint: #62cdb8;
	--amplla-soft: #eef8f6;
}

.amplla-lookup,
.amplla-validation {
	max-width: 1180px;
	margin: 30px auto;
	font-family: Arial, sans-serif;
	color: var(--amplla-navy);
}

.amplla-search-form { display: flex; gap: 10px; margin: 18px 0 26px; }
.amplla-search-form input { min-width: 0; flex: 1; padding: 13px 15px; border: 1px solid #b7bec8; border-radius: 6px; font-size: 16px; }
.amplla-search-form button,
.amplla-button,
.amplla-print-actions button { border: 0; border-radius: 6px; background: var(--amplla-teal); color: #fff; padding: 12px 18px; text-decoration: none; cursor: pointer; font-weight: 700; }
.amplla-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.amplla-result-card { border: 1px solid #dce2e8; border-radius: 9px; padding: 20px; background: #fff; }
.amplla-result-card h3 { margin: 8px 0; }
.amplla-valid-badge,
.amplla-status-ok { color: #17643c; background: #e8f7ee; border-radius: 5px; padding: 7px 10px; }
.amplla-alert,
.amplla-invalid,
.amplla-replaced { padding: 15px; border-left: 4px solid #c68a22; background: #fff8e8; }
.amplla-invalid { border-color: #b42318; background: #fff1f0; }
.amplla-status-ok { margin: 0 0 18px; }
.amplla-print-actions { text-align: right; margin: 12px 0; }
.amplla-print-root { display: none; }

.amplla-certificate {
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	width: 100%;
	aspect-ratio: 297 / 210;
	min-height: 690px;
	background: #fff;
	border: 1px solid #d9dde2;
	padding: 0;
	box-shadow: 0 5px 25px rgba(39, 45, 70, .12);
	font-family: Arial, sans-serif;
	color: var(--amplla-navy);
}

.amplla-certificate-banner {
	width: 100%;
	height: auto;
	max-height: 27%;
	object-fit: cover;
	object-position: center;
	display: block;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

.amplla-certificate-content {
	box-sizing: border-box;
	padding: 2.8% 7% 3.4%;
}
.amplla-certificate-header { display: block; }
.amplla-certificate h1 {
	margin: 0;
	text-align: left;
	font-family: 'Montserrat', Arial, sans-serif;
	font-size: clamp(30px, 3.7vw, 52px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.025em;
	color: var(--amplla-navy);
}
.amplla-title-line { width: 58%; height: 3px; margin: 14px 0 0; background: var(--amplla-mint); }
.amplla-date { margin: 2.5% 0 2.8%; text-align: right; font-size: clamp(12px, 1.35vw, 18px); }
.amplla-body { font-family: Georgia, serif; font-size: clamp(15px, 1.55vw, 22px); line-height: 1.5; text-align: justify; color: #202537; }
.amplla-certificate-bottom { display: grid; grid-template-columns: 1.25fr .75fr; align-items: end; gap: 7%; margin-top: 3%; }
.amplla-authentication { display: flex; align-items: center; gap: 14px; font-size: clamp(9px, .9vw, 12px); overflow-wrap: anywhere; }
.amplla-authentication p { margin: 0; }
.amplla-qr { width: 78px; height: 78px; border: 1px solid #d7dce0; }
.amplla-signature { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: clamp(10px, 1vw, 14px); }
.amplla-signature img { height: 46px; max-width: 150px; object-fit: contain; margin-bottom: -7px; }
.amplla-signature-line { width: 100%; height: 1px; margin-bottom: 5px; background: var(--amplla-navy); }
.amplla-signature span { display: block; margin-top: 2px; }
.amplla-certificate footer { margin-top: 2.8%; text-align: center; font-size: clamp(10px, 1.05vw, 15px); color: #45605d; }

.amplla-certificate.amplla-compact .amplla-certificate-content { padding-top: 2%; padding-bottom: 2.5%; }
.amplla-certificate.amplla-compact h1 { line-height: 1; }
.amplla-certificate.amplla-compact .amplla-title-line { margin-top: 9px; }
.amplla-certificate.amplla-compact .amplla-date { margin: 1.7% 0 2%; }
.amplla-certificate.amplla-compact .amplla-certificate-bottom { margin-top: 2%; }
.amplla-certificate.amplla-compact footer { margin-top: 1.8%; }
.amplla-certificate.amplla-ultra-compact .amplla-body { line-height: 1.32; }
.amplla-certificate.amplla-ultra-compact .amplla-qr { width: 65px; height: 65px; }
.amplla-certificate.amplla-ultra-compact .amplla-signature img { height: 38px; }

@media (max-width: 760px) {
	.amplla-certificate { aspect-ratio: auto; min-height: 0; }
	.amplla-certificate-banner { max-height: 150px; }
	.amplla-certificate-content { padding: 28px; }
	.amplla-certificate-bottom { grid-template-columns: 1fr; }
	.amplla-signature { max-width: 280px; margin: 20px auto 0; }
	.amplla-search-form { flex-direction: column; }
}

@media print {
	@page { size: A4 landscape; margin: 0; }
	html,
	body { width: 297mm !important; height: 210mm !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; background: #fff !important; }
	body.amplla-print-mode > *:not(.amplla-print-root) { display: none !important; }
	.amplla-print-root { display: block !important; position: absolute !important; inset: 0 !important; width: 297mm !important; height: 210mm !important; overflow: hidden !important; }
	.amplla-print-root .amplla-certificate {
		position: absolute !important;
		inset: 0 !important;
		width: 297mm !important;
		height: 210mm !important;
		min-height: 210mm !important;
		max-height: 210mm !important;
		margin: 0 !important;
		padding: 0;
		border: 0;
		box-shadow: none;
		break-inside: avoid;
		page-break-inside: avoid;
		page-break-after: avoid;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
	.amplla-print-root .amplla-certificate-content { padding: 7mm 20mm 9mm; }
	.amplla-print-actions,
	.amplla-status-ok { display: none !important; }
}
