html,
body {
	min-height: 100%;
}

body {
	font-family: Vazirmatn, Tahoma, sans-serif;
	background: #f8fafc;
	color: #0f172a;
}

input,
button,
select,
textarea {
	font: inherit;
}

a {
	color: inherit;
	text-decoration: none;
}

.print-root {
	min-height: 100vh;
	padding: 24px;
	background:
		radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 36%),
		radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.08), transparent 28%),
		#f8fafc;
}

.print-header {
	max-width: 1120px;
	margin: 0 auto 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.print-back,
.print-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	padding: 10px 16px;
	font-weight: 700;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.print-back {
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid #dbe3ef;
	color: #0f172a;
}

.print-btn {
	border: 0;
	background: linear-gradient(135deg, #2563eb, #0f766e);
	color: #fff;
	box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.print-back:hover,
.print-btn:hover {
	transform: translateY(-1px);
}

.print-doc {
	max-width: 1120px;
	margin: 0 auto;
	padding: 28px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid #e2e8f0;
	border-radius: 24px;
	box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.print-title {
	margin-bottom: 24px;
}

.print-title h1 {
	margin: 0 0 8px;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #020617;
}

.print-title .meta {
	margin: 0;
	color: #64748b;
	font-size: 14px;
}

.labels {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.label-card {
	position: relative;
	min-height: 180px;
	padding: 20px 18px 18px;
	border: 1px solid #cbd5e1;
	border-radius: 18px;
	background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
	overflow: hidden;
}

.label-card::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), transparent 42%);
	pointer-events: none;
}

.label-no {
	position: absolute;
	top: 14px;
	left: 14px;
	width: 30px;
	height: 30px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	background: #1d4ed8;
	color: #fff;
	font-weight: 800;
	font-size: 13px;
}

.label-text {
	position: relative;
	z-index: 1;
	margin: 0;
	padding-top: 20px;
	white-space: pre-wrap;
	word-break: break-word;
	font-family: Vazirmatn, Tahoma, sans-serif;
	font-size: 15px;
	line-height: 1.9;
	color: #0f172a;
}

@page {
	size: 100mm 50mm;
	margin: 0;
}

@media print {
	html,
	body {
		width: 100mm;
		margin: 0;
		padding: 0;
		background: #fff;
	}

	.no-print {
		display: none !important;
	}

	.print-root {
		padding: 0;
		background: #fff;
	}

	.print-doc {
		max-width: none;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		background: #fff;
	}

	.print-title,
	.label-no {
		display: none !important;
	}

	.labels {
		display: block;
	}

	.label-card {
		box-sizing: border-box;
		width: 100mm;
		height: 50mm;
		padding: 2mm 3mm;
		border: 0;
		border-radius: 0;
		background: #fff;
		overflow: hidden;
		display: flex;
		align-items: center;
		justify-content: center;
		break-inside: avoid;
		page-break-inside: avoid;
		break-after: page;
		page-break-after: always;
	}

	.label-card:last-child {
		break-after: auto;
		page-break-after: auto;
	}

	.label-card::before {
		display: none;
	}

	.label-text {
		padding-top: 0;
		width: 100%;
		font-size: 9pt;
		line-height: 1.6;
	}
}