.atv-cert-wrap {
	--gold: #b8912f;
	--navy: #1c2b4a;
	max-width: 1000px;
	margin: 30px auto;
	font-family: Tahoma, "Vazirmatn", "Segoe UI", sans-serif;
}

.atv-cert-toolbar {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-bottom: 16px;
}
.atv-cert-toolbar button {
	padding: 10px 20px;
	border-radius: 8px;
	border: 1px solid var(--navy);
	background: var(--navy);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.atv-cert-status-banner {
	text-align: center;
	padding: 10px;
	margin-bottom: 14px;
	border-radius: 8px;
	font-weight: 700;
}
.atv-cert-status-banner.expired { background: #fff3cd; color: #8a6d00; }
.atv-cert-status-banner.revoked { background: #fbe7e9; color: #b32d2e; }

.atv-cert-sheet {
	position: relative;
	background: #fdfbf5;
	border: 3px solid var(--gold);
	outline: 1px solid var(--navy);
	outline-offset: -8px;
	padding: 46px 60px;
	aspect-ratio: 1.414 / 1; /* A4 landscape proportions */
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.atv-cert-corner {
	position: absolute;
	width: 60px;
	height: 60px;
	border: 3px solid var(--gold);
}
.atv-cert-corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.atv-cert-corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.atv-cert-corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.atv-cert-corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

.atv-cert-center-name {
	font-size: 15px;
	letter-spacing: 2px;
	color: var(--navy);
	text-transform: uppercase;
	margin-bottom: 4px;
}
.atv-cert-title {
	font-size: 34px;
	font-weight: 800;
	color: var(--navy);
	margin: 10px 0 2px;
}
.atv-cert-subtitle {
	font-size: 15px;
	color: var(--gold);
	letter-spacing: 3px;
	text-transform: uppercase;
	margin-bottom: 22px;
}
.atv-cert-divider {
	width: 120px;
	height: 3px;
	background: var(--gold);
	margin: 6px auto 26px;
}

.atv-cert-lead {
	font-size: 15px;
	color: #444;
	margin-bottom: 6px;
}
.atv-cert-name {
	font-size: 32px;
	font-weight: 700;
	color: var(--navy);
	margin: 6px 0 18px;
	border-bottom: 2px solid var(--gold);
	display: inline-block;
	padding-bottom: 6px;
}
.atv-cert-body-text {
	font-size: 15px;
	color: #333;
	max-width: 640px;
	line-height: 2;
	margin-bottom: 22px;
}
.atv-cert-body-text strong {
	color: var(--navy);
}

.atv-cert-photo {
	width: 90px;
	height: 110px;
	object-fit: cover;
	border: 2px solid var(--gold);
	position: absolute;
	top: 46px;
	inset-inline-start: 60px;
}

.atv-cert-meta-grid {
	display: grid;
	grid-template-columns: repeat(3, auto);
	gap: 4px 40px;
	font-size: 13px;
	color: #555;
	margin-bottom: 26px;
}
.atv-cert-meta-grid b {
	color: var(--navy);
}

.atv-cert-footer {
	margin-top: auto;
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px;
}
.atv-cert-footer-block {
	text-align: center;
	min-width: 150px;
}
.atv-cert-signature-img {
	max-height: 50px;
	display: block;
	margin: 0 auto 4px;
}
.atv-cert-line {
	border-top: 1px solid #999;
	margin-top: 30px;
	padding-top: 6px;
	font-size: 12px;
	color: #555;
}
.atv-cert-seal-img {
	max-height: 90px;
	opacity: 0.9;
}
.atv-cert-qr-block {
	text-align: center;
	font-size: 10px;
	color: #666;
}
.atv-cert-qr-block img {
	width: 90px;
	height: 90px;
	display: block;
	margin-bottom: 4px;
}
.atv-cert-number {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 11px;
	letter-spacing: 1px;
	color: #888;
}

.atv-lic-certificate-error {
	max-width: 520px;
	margin: 40px auto;
	padding: 20px;
	text-align: center;
	background: #fdecec;
	border: 1px solid #f2b8b8;
	border-radius: 10px;
	color: #b32d2e;
}

.atv-lic-cert-lookup {
	max-width: 460px;
	margin: 40px auto;
	padding: 26px;
	background: #fdfbf5;
	border: 1px solid #e3ddc8;
	border-radius: 12px;
	font-family: Tahoma, "Vazirmatn", "Segoe UI", sans-serif;
}
.atv-lic-cert-lookup h3 {
	margin: 0 0 8px;
	color: #1c2b4a;
}
.atv-lic-cert-lookup-hint {
	color: #666;
	font-size: 13px;
	margin: 0 0 16px;
}
.atv-lic-cert-lookup-error {
	color: #b32d2e;
	background: #fdecec;
	border: 1px solid #f2b8b8;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	margin-bottom: 14px;
}
.atv-lic-cert-lookup-form label {
	display: block;
	font-weight: 600;
	margin: 12px 0 6px;
	font-size: 13px;
	color: #333;
}
.atv-lic-cert-lookup-form input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid #d6d6d6;
	border-radius: 8px;
	font-size: 15px;
}
.atv-lic-cert-lookup-form button {
	margin-top: 18px;
	width: 100%;
	padding: 11px;
	border: none;
	border-radius: 8px;
	background: #b8912f;
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
}
.atv-lic-cert-lookup-form button:hover {
	background: #9a7726;
}

@media print {
	@page {
		size: A4 landscape;
		margin: 0;
	}
	body * {
		visibility: hidden;
	}
	.atv-cert-wrap, .atv-cert-wrap * {
		visibility: visible;
	}
	.atv-cert-toolbar, .atv-cert-status-banner {
		display: none !important;
	}
	.atv-cert-wrap {
		margin: 0;
		max-width: none;
		position: absolute;
		top: 0; left: 0; right: 0;
	}
	.atv-cert-sheet {
		box-shadow: none;
		aspect-ratio: auto;
		width: 100%;
		height: 100vh;
	}
}
