/* استایل header مدرن و شکیل */
.page-header-modern {
	background: var(--aurora-gradient, linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(147, 51, 234, 0.12)));
	border-radius: var(--aurora-radius-sm, 10px);
	padding: 0.6rem 1rem;
	margin: 0.35rem 0 0.65rem;
	border: 1px solid rgba(37, 99, 235, 0.18);
	box-shadow: var(--aurora-shadow-card, 0 18px 48px -22px rgba(30, 64, 175, 0.18));
	backdrop-filter: blur(10px);
	direction: rtl;
	position: relative;
	overflow: visible !important;
	color: var(--aurora-text, #1f2937);
	z-index: 100;
}

.page-header-modern::before {
	content: '';
	position: absolute;
	top: -18px;
	right: -18px;
	width: 64px;
	height: 64px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, transparent 70%);
	border-radius: 50%;
	pointer-events: none;
	opacity: 0.9;
}

.page-header-modern::after {
	content: '';
	position: absolute;
	bottom: -20px;
	left: -24px;
	width: 72px;
	height: 72px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 70%);
	border-radius: 50%;
	pointer-events: none;
	opacity: 0.8;
}

.page-header-container {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	flex-wrap: wrap;
	position: relative;
	z-index: 101;
	isolation: isolate;
}

.page-header-dashboard-link {
	display: inline-flex;
	align-items: center;
	gap: 0.1875rem;
	color: #2c3e50;
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 500;
	font-family: 'IRANSans', Tahoma, sans-serif;
	padding: 0.25rem 0.5rem;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.6);
	backdrop-filter: blur(4px);
	transition: all 0.2s ease;
	white-space: nowrap;
	border: 1px solid rgba(255, 255, 255, 0.8);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.page-header-dashboard-link:hover {
	background: rgba(255, 255, 255, 0.85);
	transform: translateY(-1px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	color: #1a252f;
	text-decoration: none;
}

.page-header-dashboard-link:active {
	transform: translateY(0) scale(0.98);
}

.dashboard-icon {
	font-size: 0.8125rem;
	line-height: 1;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
	transition: transform 0.2s ease;
}

.page-header-dashboard-link:hover .dashboard-icon {
	transform: scale(1.02);
}

.dashboard-text {
	font-weight: 500;
	letter-spacing: 0.15px;
}

.page-header-separator {
	width: 1px;
	height: 14px;
	background: linear-gradient(to bottom, 
		transparent 0%, 
		rgba(44, 62, 80, 0.3) 20%, 
		rgba(44, 62, 80, 0.3) 80%, 
		transparent 100%);
	border-radius: 1px;
	flex-shrink: 0;
}

.page-header-breadcrumb-link {
	display: inline-flex;
	align-items: center;
	color: #2c3e50;
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 500;
	font-family: 'IRANSans', Tahoma, sans-serif;
	padding: 0.25rem 0.5rem;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.6);
	backdrop-filter: blur(4px);
	transition: all 0.2s ease;
	white-space: nowrap;
	border: 1px solid rgba(255, 255, 255, 0.8);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.page-header-breadcrumb-link:hover {
	background: rgba(255, 255, 255, 0.85);
	transform: translateY(-1px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	color: #1a252f;
	text-decoration: none;
}

.page-header-breadcrumb-link:active {
	transform: translateY(0) scale(0.98);
}

/* استایل برای آیکن‌های عملیات (افزودن، ویرایش، حذف، ویرایش گروهی) */
.action-icon-button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	flex-direction: row !important;
	gap: 0.375rem !important;
	min-width: 36px;
	height: 36px;
	padding: 0 0.625rem;
	margin: 0 0.25rem;
	border: 1.5px solid rgba(37, 99, 235, 0.25);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(4px);
	transition: all 0.2s ease;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	font-size: 0.75rem;
	font-weight: 500;
	font-family: 'IRANSans', Tahoma, sans-serif;
	color: #2c3e50;
	white-space: nowrap;
	direction: rtl !important;
	text-align: right !important;
}

.action-icon-button .action-text {
	order: 2;
}

.action-icon-button svg {
	order: 1;
	flex-shrink: 0;
}

.action-icon-button:hover {
	background: rgba(255, 255, 255, 0.95);
	border-color: rgba(37, 99, 235, 0.4);
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
	text-decoration: none;
}

.action-icon-button:active {
	transform: translateY(0) scale(0.96);
}

.action-icon-button svg {
	width: 18px;
	height: 18px;
	stroke-width: 2;
	color: #2563eb;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.action-icon-button:hover svg {
	color: #1d4ed8;
	transform: scale(1.05);
}

.action-icon-button .action-text {
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1;
}

/* استایل برای دکمه افزودن (سبز) */
.action-icon-button.add {
	border-color: rgba(34, 197, 94, 0.3);
	background: rgba(240, 253, 244, 0.9);
	color: #16a34a;
}

.action-icon-button.add svg {
	color: #22c55e;
}

.action-icon-button.add:hover {
	border-color: rgba(34, 197, 94, 0.5);
	background: rgba(240, 253, 244, 1);
	color: #15803d;
}

.action-icon-button.add:hover svg {
	color: #16a34a;
}

/* استایل برای دکمه ویرایش (آبی) */
.action-icon-button.edit {
	border-color: rgba(59, 130, 246, 0.3);
	background: rgba(239, 246, 255, 0.9);
	color: #2563eb;
}

.action-icon-button.edit svg {
	color: #3b82f6;
}

.action-icon-button.edit:hover {
	border-color: rgba(59, 130, 246, 0.5);
	background: rgba(239, 246, 255, 1);
	color: #1d4ed8;
}

.action-icon-button.edit:hover svg {
	color: #2563eb;
}

/* استایل برای دکمه حذف (قرمز) */
.action-icon-button.delete {
	border-color: rgba(239, 68, 68, 0.3);
	background: rgba(254, 242, 242, 0.9);
	color: #dc2626;
}

.action-icon-button.delete svg {
	color: #ef4444;
}

.action-icon-button.delete:hover {
	border-color: rgba(239, 68, 68, 0.5);
	background: rgba(254, 242, 242, 1);
	color: #b91c1c;
}

.action-icon-button.delete:hover svg {
	color: #dc2626;
}

/* استایل برای دکمه ویرایش گروهی (بنفش) */
.action-icon-button.update {
	border-color: rgba(168, 85, 247, 0.3);
	background: rgba(250, 245, 255, 0.9);
	color: #9333ea;
}

.action-icon-button.update svg {
	color: #a855f7;
}

.action-icon-button.update:hover {
	border-color: rgba(168, 85, 247, 0.5);
	background: rgba(250, 245, 255, 1);
	color: #7e22ce;
}

.action-icon-button.update:hover svg {
	color: #9333ea;
}

/* استایل برای دکمه بازگشت (خاکستری) */
.action-icon-button.back {
	border-color: rgba(107, 114, 128, 0.3);
	background: rgba(249, 250, 251, 0.9);
	color: #4b5563;
}

.action-icon-button.back svg {
	color: #6b7280;
	/* فلش به سمت راست (برعکس شده) */
	transform: scaleX(-1) !important;
}

.action-icon-button.back:hover {
	border-color: rgba(107, 114, 128, 0.5);
	background: rgba(249, 250, 251, 1);
	color: #374151;
}

.action-icon-button.back:hover svg {
	color: #4b5563;
	transform: scaleX(-1) scale(1.05) !important; /* برعکس کردن و بزرگ کردن در hover */
}

/* اطمینان از معکوس شدن آیکن بازگشت در همه حالات */
a.action-icon-button.back svg,
.action-icon-button.back > svg,
.action-icon-button.back svg[viewBox="0 0 24 24"] {
	transform: scaleX(-1) !important;
}

a.action-icon-button.back:hover svg,
.action-icon-button.back:hover > svg,
.action-icon-button.back:hover svg[viewBox="0 0 24 24"] {
	transform: scaleX(-1) scale(1.05) !important;
}

/* استایل برای دکمه چاپ (آبی تیره) */
.action-icon-button.print {
	border-color: rgba(59, 130, 246, 0.3);
	background: rgba(239, 246, 255, 0.9);
	color: #2563eb;
}

.action-icon-button.print svg {
	color: #3b82f6;
}

.action-icon-button.print:hover {
	border-color: rgba(59, 130, 246, 0.5);
	background: rgba(239, 246, 255, 1);
	color: #1d4ed8;
}

.action-icon-button.print:hover svg {
	color: #2563eb;
}

/* استایل برای دکمه Excel (سبز) */
.action-icon-button.excel {
	border-color: rgba(34, 197, 94, 0.3);
	background: rgba(240, 253, 244, 0.9);
	color: #16a34a;
}

.action-icon-button.excel svg {
	color: #22c55e;
}

.action-icon-button.excel:hover {
	border-color: rgba(34, 197, 94, 0.5);
	background: rgba(240, 253, 244, 1);
	color: #15803d;
}

.action-icon-button.excel:hover svg {
	color: #16a34a;
}

/* استایل برای دکمه Word (آبی) */
.action-icon-button.word {
	border-color: rgba(59, 130, 246, 0.3);
	background: rgba(239, 246, 255, 0.9);
	color: #2563eb;
}

.action-icon-button.word svg {
	color: #3b82f6;
}

.action-icon-button.word:hover {
	border-color: rgba(59, 130, 246, 0.5);
	background: rgba(239, 246, 255, 1);
	color: #1d4ed8;
}

.action-icon-button.word:hover svg {
	color: #2563eb;
}

/* استایل برای دکمه کپی (نارنجی) */
.action-icon-button.copy {
	border-color: rgba(249, 115, 22, 0.3);
	background: rgba(255, 247, 237, 0.9);
	color: #ea580c;
}

.action-icon-button.copy svg {
	color: #f97316;
}

.action-icon-button.copy:hover {
	border-color: rgba(249, 115, 22, 0.5);
	background: rgba(255, 247, 237, 1);
	color: #c2410c;
}

.action-icon-button.copy:hover svg {
	color: #ea580c;
}

/* استایل برای دکمه جزئیات (آبی) */
.action-icon-button.detail {
	border-color: rgba(59, 130, 246, 0.3);
	background: rgba(239, 246, 255, 0.9);
	color: #2563eb;
}

.action-icon-button.detail svg {
	color: #3b82f6;
}

.action-icon-button.detail:hover {
	border-color: rgba(59, 130, 246, 0.5);
	background: rgba(239, 246, 255, 1);
	color: #1d4ed8;
}

.action-icon-button.detail:hover svg {
	color: #2563eb;
}

/* استایل برای دکمه مشاهده آمار تردد (بنفش روشن) */
.action-icon-button[href*="rollcall_list"] {
	border-color: rgba(139, 92, 246, 0.3) !important;
	background: rgba(245, 243, 255, 0.95) !important;
	color: #7c3aed !important;
}

.action-icon-button[href*="rollcall_list"] svg {
	color: #8b5cf6 !important;
}

.action-icon-button[href*="rollcall_list"]:hover {
	border-color: rgba(139, 92, 246, 0.5) !important;
	background: rgba(245, 243, 255, 1) !important;
	color: #6d28d9 !important;
}

.action-icon-button[href*="rollcall_list"]:hover svg {
	color: #7c3aed !important;
}

/* استایل برای container دکمه‌های عملیات */
.action-buttons-container {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-start !important; /* در RTL، flex-start به معنای راست است */
	gap: 0.5rem;
	margin-top: 0 !important;
	margin-bottom: 0.75rem !important;
	direction: rtl !important;
	padding-top: 0 !important;
	text-align: right !important;
}

/* حذف margin از عناصر قبل از action-buttons-container */
div#targetDiv {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

div#targetDiv +  {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

.page-header-title {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 500;
	color: #2c3e50;
	font-family: 'IRANSans', Tahoma, sans-serif;
	flex: 1;
	text-align: right;
	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
	letter-spacing: 0.15px;
	position: relative;
	padding-right: 0.25rem;
}

/* منوی بازشو برای آیکن‌های خروجی */
.export-dropdown {
	position: relative;
	margin-left: auto;
	z-index: 102;
	isolation: isolate;
}

.export-dropdown-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	color: #2c3e50;
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 500;
	font-family: 'IRANSans', Tahoma, sans-serif;
	padding: 0.25rem 0.5rem;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.6);
	backdrop-filter: blur(4px);
	transition: all 0.2s ease;
	white-space: nowrap;
	border: 1px solid rgba(255, 255, 255, 0.8);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
	cursor: pointer;
}

.export-dropdown-toggle:hover {
	background: rgba(255, 255, 255, 0.85);
	transform: translateY(-1px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	color: #1a252f;
}

.export-dropdown-toggle svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.export-dropdown-menu {
	position: absolute;
	top: calc(100% + 0.25rem);
	right: 0;
	left: auto;
	background: #ffffff;
	border-radius: 5px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
	            0 2px 6px rgba(0, 0, 0, 0.1);
	min-width: 140px;
	max-width: 200px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.2s ease;
	z-index: 103 !important; /* z-index برای نمایش بالای header */
	direction: rtl;
	padding: 0.25rem 0;
	margin: 0;
	list-style: none;
	display: block;
	white-space: nowrap;
	transform-origin: top right;
	/* جلوگیری از خروج از صفحه */
	max-width: calc(100vw - 20px);
	overflow-x: hidden;
	overflow-y: auto;
}

.export-dropdown.active .export-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transform-origin: top right;
}

.export-dropdown-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	color: #2c3e50;
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 500;
	font-family: 'IRANSans', Tahoma, sans-serif;
	transition: all 0.2s ease;
	border: none;
	background: none;
	width: 100%;
	text-align: right;
	cursor: pointer;
}

.export-dropdown-item:hover {
	background: rgba(168, 213, 226, 0.2);
	color: #1a252f;
}

.export-dropdown-item svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.export-dropdown {
		margin-left: auto;
		margin-top: 0;
		width: auto;
	}
	
	.export-dropdown-toggle {
		width: auto;
		justify-content: flex-start;
		font-size: 0.6875rem;
		padding: 0.1875rem 0.375rem;
	}
	
	.export-dropdown-menu {
		right: 0;
		left: auto;
		width: auto;
		min-width: 120px;
		max-width: 180px;
		transform-origin: top right;
	}
}

/* سازگاری با موبایل */
@media (max-width: 768px) {
	.page-header-modern {
		padding: 0.3125rem 0.5rem;
		margin: 0.25rem;
		border-radius: 4px;
	}
	
	.page-header-modern::before,
	.page-header-modern::after {
		display: none;
	}
	
	.page-header-container {
		gap: 0.25rem;
	}
	
	.page-header-dashboard-link {
		font-size: 0.6875rem;
		padding: 0.1875rem 0.375rem;
	}
	
	.page-header-title {
		font-size: 0.75rem;
		width: auto;
		text-align: right;
		margin-top: 0;
		padding-right: 0.25rem;
		flex: 1;
	}
	
	.page-header-separator {
		display: block;
	}
}

@media (max-width: 480px) {
	.page-header-modern {
		padding: 0.25rem 0.4375rem;
		margin: 0.1875rem;
		border-radius: 4px;
	}
	
	.page-header-container {
		flex-direction: row;
		align-items: center;
		gap: 0.25rem;
	}
	
	.page-header-dashboard-link {
		justify-content: flex-start;
		width: auto;
		font-size: 0.6875rem;
		padding: 0.1875rem 0.375rem;
	}
	
	.page-header-title {
		font-size: 0.6875rem;
		margin-top: 0;
		text-align: right;
		padding-right: 0.25rem;
		flex: 1;
	}
	
	.export-dropdown {
		margin-left: auto;
		margin-top: 0;
		width: auto;
	}
	
	.export-dropdown-toggle {
		width: auto;
		font-size: 0.6875rem;
		padding: 0.1875rem 0.375rem;
	}
	
	.page-header-separator {
		display: block;
	}
}

.calendar {
	direction: rtl;
	font-family: Tahoma, Arial, sans-serif;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	background: #fff;
}

.calendar table {
	border-collapse: collapse;
	width: 100%;
}

.calendar .calendar-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	padding: 12px;
	border-radius: 8px 8px 0 0;
	font-weight: bold;
	text-align: center;
}

.calendar .calendar-nav {
	background: transparent;
	color: #fff;
	border: none;
	cursor: pointer;
	padding: 5px 10px;
	font-size: 16px;
	transition: all 0.3s ease;
}

.calendar .calendar-nav:hover {
	background: rgba(255,255,255,0.2);
	border-radius: 4px;
}

.calendar .calendar-day-header {
	background: #f8f9fa;
	color: #495057;
	font-weight: bold;
	padding: 8px 4px;
	text-align: center;
	border-bottom: 2px solid #dee2e6;
}

.calendar .calendar-day {
	padding: 8px 4px;
	text-align: center;
	cursor: pointer;
	border: 1px solid #e9ecef;
	transition: all 0.2s ease;
}

.calendar .calendar-day:hover {
	background: #e3f2fd;
	color: #1976d2;
	transform: scale(1.05);
}

.calendar .calendar-day-selected {
	background: #667eea !important;
	color: #fff !important;
	font-weight: bold;
	border-radius: 4px;
}

.calendar .calendar-day-today {
	background: #fff3cd;
	color: #856404;
	font-weight: bold;
	border: 2px solid #ffc107;
	border-radius: 4px;
}

.calendar .calendar-day-other-month {
	color: #adb5bd;
	background: #f8f9fa;
}

.calendar .calendar-day-disabled {
	color: #ced4da;
	cursor: not-allowed;
	background: #f8f9fa;
}

#flat_calendar_1, #flat_calendar_2{
	width: 280px;
}

.example {
	padding: 10px;
}

.display_area {
	background-color: #FFFF88
}

/* Grade input styles */
.grade-input-container {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	justify-content: center;
}

.grade-input-int,
.grade-input-dec {
	width: 45px !important;
	min-width: 45px !important;
	max-width: 45px !important;
	text-align: center;
	padding: 2px 4px;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 14px;
	cursor: pointer;
	background: #fff;
	font-family: 'IRANSans', Tahoma, sans-serif;
}

.grade-input-int:focus, 
.grade-input-dec:focus {
	outline: none;
	border-color: #4CAF50;
	box-shadow: 0 0 3px rgba(76, 175, 80, 0.3);
}

.grade-input-int:hover,
.grade-input-dec:hover {
	border-color: #4CAF50;
}

.grade-separator {
	margin: 0 2px;
	font-weight: bold;
}

/* بهبود استایل input تاریخ */
#date_input_10 {
	padding: 0.3125rem 0.4375rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	font-family: 'IRANSans', Tahoma, sans-serif;
	transition: all 0.3s ease;
	width: 110px;
	max-width: 200px;
	text-align: center;
	direction: rtl;
	cursor: pointer;
	background-color: #fff;
}

#date_input_10:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#date_input_10:hover {
	border-color: #667eea;
}

/* استایل کادر جستجو - سازگار با موبایل */
.search-form-container {
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	padding: 0.1875rem 0.625rem;
	background: #f9fafb;
	margin-bottom: 0.5rem;
	max-width: 100%;
	box-sizing: border-box;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.search-field-group {
	display: inline-block;
	padding: 0.375rem 0.5rem;
	vertical-align: top;
	margin-bottom: 0.5rem;
}

.search-label {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 500;
	color: #374151;
	margin-left: 0.5rem;
	margin-bottom: 0.25rem;
	font-family: 'IRANSans', Tahoma, sans-serif;
}

.search-input-wrapper {
	display: inline-block;
	vertical-align: middle;
}

.search-select, .search-input, .search-date-input {
	padding: 0.3125rem 0.4375rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	font-family: 'IRANSans', Tahoma, sans-serif;
	background: #fff;
	color: #1f2937;
	transition: all 0.3s ease;
	min-width: 100px;
	max-width: 200px;
}

#total_grade {
	font-size: 0.875rem !important;
}

#total_grade option {
	font-size: 0.875rem !important;
}

.search-select:focus, .search-input:focus, .search-date-input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-date-input {
	width: 110px;
	text-align: left;
	direction: ltr;
	cursor: pointer;
	font-family: 'IRANSans', 'Tahoma', 'Arial', sans-serif !important;
	font-size: 0.75rem !important;
	unicode-bidi: embed;
	-webkit-font-feature-settings: "liga" off;
	font-feature-settings: "liga" off;
	padding: 0.3125rem 0.4375rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.375rem;
	max-width: 200px;
}

.date-input-wrapper {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.calendar-icon {
	width: 24px;
	height: 24px;
	cursor: pointer;
	vertical-align: middle;
	transition: all 0.2s ease;
	color: #667eea;
	flex-shrink: 0;
}

.calendar-icon:hover {
	transform: scale(1.1);
	color: #5568d3;
}

.search-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.grade-input {
	width: 45px;
	text-align: center;
	direction: rtl;
}

.search-buttons {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
}

.search-submit-btn, .search-reset-btn {
	padding: 0.3125rem 0.625rem;
	border-radius: 0.375rem;
	font-size: 0.75rem; /* یک سایز بزرگتر از 0.6875rem */
	font-weight: 500;
	font-family: 'IRANSans', Tahoma, sans-serif;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	border: none;
}

.search-submit-btn {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
}

.search-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.search-reset-btn {
	background: #f3f4f6;
	color: #6b7280;
	border: 2px solid #e5e7eb;
}

.search-reset-btn:hover {
	background: #e5e7eb;
	color: #374151;
}

/* Modal برای نمایش نتیجه ثبت نمره */
.grade-save-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000000;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.grade-save-modal.show {
	opacity: 1;
	pointer-events: auto;
}

.grade-save-modal-content {
	border-radius: 16px;
	padding: 2rem 2.5rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	text-align: center;
	max-width: 400px;
	width: 90%;
	transform: scale(0.8) translateY(-20px);
	transition: transform 0.3s ease;
	direction: rtl;
	cursor: pointer;
	position: relative;
}

.grade-save-modal.show .grade-save-modal-content {
	transform: scale(1) translateY(0);
}

.grade-save-modal-content.success {
	background: #d1fae5;
	border: 2px solid #10b981;
}

.grade-save-modal-content.error {
	background: #fee2e2;
	border: 2px solid #ef4444;
}

.grade-save-modal-icon {
	font-size: 3.5rem;
	font-weight: bold;
	margin-bottom: 1rem;
	line-height: 1;
}

.grade-save-modal-content.success .grade-save-modal-icon {
	color: #10b981;
}

.grade-save-modal-content.error .grade-save-modal-icon {
	color: #ef4444;
}

.grade-save-modal-message {
	font-size: 1rem;
	color: #1f2937;
	font-family: 'IRANSans', Tahoma, sans-serif;
	line-height: 1.6;
	font-weight: 500;
}

.grade-save-modal-content.success .grade-save-modal-message {
	color: #065f46;
}

.grade-save-modal-content.error .grade-save-modal-message {
	color: #991b1b;
}

@media (max-width: 768px) {
	.grade-save-modal-content {
		padding: 1.5rem 2rem;
		max-width: 90%;
	}
	
	.grade-save-modal-icon {
		font-size: 3rem;
	}
	
	.grade-save-modal-message {
		font-size: 0.9375rem;
	}
}

@media (max-width: 480px) {
	.grade-save-modal-content {
		padding: 1.25rem 1.5rem;
		max-width: 95%;
	}
	
	.grade-save-modal-icon {
		font-size: 2.5rem;
	}
	
	.grade-save-modal-message {
		font-size: 0.875rem;
	}
}

/* پیام تغییر پارامترهای جستجو */
.search-params-message {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 0.75rem;
	margin-top: 0.75rem;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 0.375rem;
	font-size: 0.8125rem;
	color: #856404;
	font-family: 'IRANSans', Tahoma, sans-serif;
	animation: slideDown 0.3s ease;
}

.search-params-icon {
	font-size: 1rem;
	flex-shrink: 0;
}

.search-params-text {
	flex: 1;
	line-height: 1.5;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* استایل دکمه ثبت نمرات */
.grade-save-btn {
	padding: 0.375rem 0.875rem;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	font-weight: 600;
	font-family: 'IRANSans', Tahoma, sans-serif;
	cursor: pointer;
	transition: all 0.3s ease;
	border: none;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
	text-align: center;
	display: inline-block;
}

.grade-save-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.grade-save-btn:active {
	transform: translateY(0);
}

.grade-save-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* محدود کردن عرض ستون کد دانش‌آموز */
.ewTable tbody tr td:nth-child(2),
.ewTable thead tr td:nth-child(2) {
	max-width: 110px !important;
	width: 110px !important;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: right;
}

/* محدود کردن عرض ستون نام دانش‌آموز */
.ewTable tbody tr td:nth-child(3),
.ewTable thead tr td:nth-child(3) {
	max-width: 180px !important;
	width: 180px !important;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 768px) {
	.grade-save-btn {
		padding: 0.3125rem 0.75rem;
		font-size: 0.6875rem;
	}
	
	.ewTable tbody tr td:nth-child(2),
	.ewTable thead tr td:nth-child(2) {
		max-width: 85px !important;
		width: 85px !important;
	}
	
	.ewTable tbody tr td:nth-child(3),
	.ewTable thead tr td:nth-child(3) {
		max-width: 120px !important;
		width: 120px !important;
	}
}

@media (max-width: 480px) {
	.grade-save-btn {
		padding: 0.25rem 0.625rem;
		font-size: 0.625rem;
		width: 100%;
		max-width: 150px;
	}
	
	.ewTable tbody tr td:nth-child(2),
	.ewTable thead tr td:nth-child(2) {
		max-width: 70px !important;
		width: 70px !important;
	}
	
	.ewTable tbody tr td:nth-child(3),
	.ewTable thead tr td:nth-child(3) {
		max-width: 100px !important;
		width: 100px !important;
	}
}


/* استایل جدول نمرات اخیر */
.recent-grades-container {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	width: 100%;
	min-width: 0;
	overflow: visible;
	padding: 0;
	/* رنگ زمینه بسیار کم رنگ و شفاف */
	background-color: rgba(240, 253, 244, 0.75) !important; /* سبز بسیار کم رنگ و شفاف - شفافیت بیشتر */
	position: relative;
	z-index: 1 !important; /* پایین‌تر از فیلتر */
	/* جلوگیری از ایجاد stacking context */
	transform: none !important;
	opacity: 1 !important;
	will-change: auto !important;
}

/* Bold کردن نمره میانگین */
.recent-average {
	font-weight: bold !important;
}

/* افزایش سایز فونت recent-average در موبایل */
@media (max-width: 768px) {
	.recent-average {
		font-size: 0.9rem !important; /* یک سایز بزرگتر */
	}
}

@media (max-width: 480px) {
	.recent-average {
		font-size: 0.95rem !important; /* یک سایز بزرگتر */
	}
}

/* استایل فیلتر نمرات اخیر */
.recent-grades-filter-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 0;
	flex-wrap: wrap;
	position: relative;
	vertical-align: middle;
	height: 100%;
	min-height: 25px;
	z-index: 99998 !important; /* بالاتر از نمرات قبلی */
}

.recent-grades-filter-label {
	font-family: 'IRANSans', Tahoma, sans-serif;
	font-size: 0.82rem;
	font-weight: 500;
	color: #0f172a;
	line-height: 1.2;
	letter-spacing: 0.004em;
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	margin: 0;
	padding: 0;
}

.recent-grades-filter-icon-container {
	position: relative;
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	isolation: isolate; /* ایجاد stacking context جدید */
	z-index: 99999 !important; /* بالاتر از همه */
}

.recent-grades-filter-icon-btn {
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 4px 6px;
	cursor: pointer;
	color: #666;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	box-shadow: none;
}

.recent-grades-filter-icon-btn:hover {
	background: #e5e5e5;
	border-color: #ccc;
}

.recent-grades-filter-icon-btn:active {
	background: #ddd;
}

.recent-grades-filter-icon-btn.filter-active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-color: #667eea;
	color: #fff;
	box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.recent-grades-filter-icon-btn.filter-active:hover {
	background: linear-gradient(135deg, #5568d3 0%, #653a91 100%);
	box-shadow: 0 4px 8px rgba(102, 126, 234, 0.5);
}

.recent-grades-filter-icon-btn svg {
	width: 14px;
	height: 14px;
}

/* Modal backdrop */
.recent-grades-filter-modal-backdrop {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	background: rgba(0, 0, 0, 0.5) !important;
	z-index: 2147483646 !important;
	display: none;
	animation: fadeIn 0.2s ease-in-out;
}

.recent-grades-filter-modal-backdrop.show {
	display: block !important;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.recent-grades-filter-dropdown {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) !important;
	margin-top: 0 !important;
	background: #fff !important;
	border: 1px solid #ddd !important;
	border-radius: 12px !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
	min-width: 300px !important;
	max-width: 90vw !important;
	max-height: 80vh !important;
	z-index: 2147483647 !important; /* بالاتر از backdrop */
	padding: 20px !important;
	overflow-y: auto !important;
	display: none;
	animation: slideDown 0.3s ease-out;
}

.recent-grades-filter-dropdown.show {
	display: block !important;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translate(-50%, -60%);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

.recent-grades-filter-header {
	font-size: 0.875rem;
	font-weight: normal;
	color: #333;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #eee;
	font-family: 'IRANSans', Tahoma, sans-serif;
	text-align: center;
}

.recent-grades-filter-options {
	max-height: 200px;
	overflow-y: auto;
	margin-bottom: 10px;
}

.recent-grades-filter-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	cursor: pointer;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	font-family: 'IRANSans', Tahoma, sans-serif;
	font-size: 0.8125rem;
	font-weight: normal;
}

.recent-grades-filter-checkbox-label:hover {
	background-color: #f5f5f5;
}

.recent-grades-filter-checkbox {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: #667eea;
}

.recent-grades-filter-checkbox-label span {
	flex: 1;
	color: #333;
}

.recent-grades-filter-actions {
	display: flex;
	gap: 8px;
	justify-content: center;
	padding-top: 8px;
	border-top: 1px solid #eee;
}

.recent-grades-filter-btn {
	padding: 6px 16px;
	border: none;
	border-radius: 4px;
	font-size: 0.8125rem;
	font-weight: normal;
	cursor: pointer;
	transition: all 0.3s ease;
	font-family: 'IRANSans', Tahoma, sans-serif;
}

.recent-grades-filter-btn-apply {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.recent-grades-filter-btn-apply:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(102, 126, 234, 0.5);
}

.recent-grades-filter-btn-clear {
	background: #f5f5f5;
	color: #666;
	border: 1px solid #ddd;
}

.recent-grades-filter-btn-clear:hover {
	background: #e5e5e5;
}

.recent-grades-table {
	border-collapse: separate;
	border-spacing: 0;
	width: auto;
	min-width: 0;
	font-size: 0.75rem;
	font-family: 'IRANSans', Tahoma, sans-serif;
	display: inline-table;
	table-layout: auto;
	overflow: hidden;
	border-radius: 6px;
	position: relative;
	z-index: 1 !important; /* پایین‌تر از فیلتر */
	/* جلوگیری از ایجاد stacking context */
	transform: none !important;
	opacity: 1 !important;
	will-change: auto !important;
}

.recent-grades-table thead {
	background: transparent;
}

.recent-grades-table th,
.recent-grades-table td {
	padding: 6px 8px;
	font-size: 0.75rem;
	text-align: center;
	white-space: nowrap;
	min-width: 40px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-left: none;
	border-right: none;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	border-radius: 0;
	position: relative;
	/* نمرات پررنگ و واضح */
	font-weight: 600 !important;
	color: #0f172a !important;
}

/* لایه شفاف روی پس‌زمینه برای کم‌رنگ کردن رنگ‌های موجود - بدون تأثیر روی متن */
.recent-grades-table th::before,
.recent-grades-table td::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.65) !important; /* لایه سفید شفاف برای کم‌رنگ کردن رنگ‌های موجود */
	pointer-events: none;
	z-index: 0;
	border-radius: inherit;
	mix-blend-mode: overlay; /* ترکیب بهتر با رنگ‌های موجود */
}

/* اطمینان از پررنگ بودن نمرات - بدون تأثیر از opacity */
.recent-grades-table th,
.recent-grades-table td {
	opacity: 1 !important; /* اطمینان از عدم تأثیر opacity روی کل element */
}

.recent-grades-table th > *,
.recent-grades-table td > * {
	position: relative;
	z-index: 1;
	/* اطمینان از پررنگ بودن نمرات */
	font-weight: 600 !important;
	color: #0f172a !important;
	opacity: 1 !important;
}

.recent-grades-table th sup,
.recent-grades-table td sup {
	font-size: 0.65em;
	font-weight: bold;
	vertical-align: super;
	line-height: 0;
	margin-left: 1px;
}

.recent-grades-table th {
	font-weight: 600;
	color: #1f2937;
	transition: all 0.3s ease;
}

.recent-grades-table th:first-child,
.recent-grades-table td:first-child {
	border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.recent-grades-table th:last-child,
.recent-grades-table td:last-child {
	border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.recent-grades-table th:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* بهینه‌سازی کلی برای موبایل */
@media (max-width: 768px) {
	/* جلوگیری از overflow در body */
	body {
		overflow-x: hidden !important;
		max-width: 100vw !important;
	}
	
	/* جدول */
	.ewTable {
		width: max-content !important;
		min-width: 100% !important;
		max-width: 100vw !important;
		font-size: 0.6875rem !important;
		table-layout: auto;
		display: table;
		box-sizing: border-box;
	}
	
	.ewTable td,
	.ewTable th {
		padding: 0.25rem 0.375rem !important;
		font-size: 0.6875rem !important;
		white-space: nowrap;
		max-width: 120px !important;
		overflow: visible;
		text-overflow: ellipsis;
		box-sizing: border-box;
	}
	
	/* ستون نمرات اخیر - بدون محدودیت عرض */
	.ewTable td:has(.recent-grades-container),
	.ewTable th:has(.recent-grades-container) {
		max-width: none !important;
		overflow: visible !important;
		width: auto !important;
		min-width: 120px;
		padding: 0.25rem 0.375rem !important;
	}
	
	.ewTable thead td {
		padding: 0.375rem 0.5rem !important;
		font-size: 0.6875rem !important;
	}
	
	/* کادرهای نمره */
	.grade-input-container {
		display: flex;
		align-items: center;
		gap: 0.125rem;
		flex-wrap: nowrap;
		justify-content: center;
		min-width: 0;
	}
	
	.grade-input,
	.grade-input-int,
	.grade-input-dec {
		font-size: 0.875rem !important; /* یک سایز بزرگتر از 0.75rem */
		font-weight: bold !important; /* Bold کردن در موبایل */
		padding: 0.1875rem 0.25rem !important;
		width: 45px !important;
		min-width: 45px !important;
		max-width: 45px !important;
		box-sizing: border-box;
	}
	
	.grade-separator {
		font-size: 0.625rem !important;
		margin: 0 0.0625rem;
	}
	
	/* جدول نمرات اخیر */
	.recent-grades-container {
		width: 100% !important;
		min-width: 0 !important;
		overflow: visible !important;
	}
	
	.recent-grades-table {
		font-size: 0.625rem !important;
		width: auto !important;
		min-width: 0 !important;
		table-layout: auto !important;
		border-collapse: separate !important;
		border-spacing: 0 !important;
		overflow: hidden !important;
		border-radius: 4px !important;
	}
	
	.recent-grades-table th,
	.recent-grades-table td {
		padding: 2px 2px !important;
		font-size: 0.6rem !important;
		white-space: nowrap !important;
		min-width: 30px !important;
		max-width: none !important;
		overflow: visible !important;
		border: 1px solid rgba(0, 0, 0, 0.1) !important;
		border-left: none !important;
		border-right: none !important;
		border-radius: 0 !important;
		position: relative !important;
		/* نمرات پررنگ و واضح در موبایل */
		font-weight: 600 !important;
		color: #0f172a !important;
	}
	
	/* لایه شفاف روی پس‌زمینه برای کم‌رنگ کردن رنگ‌های موجود در موبایل - بدون تأثیر روی متن */
	.recent-grades-table th::before,
	.recent-grades-table td::before {
		content: '' !important;
		position: absolute !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		background-color: rgba(255, 255, 255, 0.65) !important; /* لایه سفید شفاف برای کم‌رنگ کردن رنگ‌های موجود */
		pointer-events: none !important;
		z-index: 0 !important;
		border-radius: inherit !important;
		mix-blend-mode: overlay !important; /* ترکیب بهتر با رنگ‌های موجود */
	}
	
	/* اطمینان از پررنگ بودن نمرات در موبایل - بدون تأثیر از opacity */
	.recent-grades-table th,
	.recent-grades-table td {
		opacity: 1 !important; /* اطمینان از عدم تأثیر opacity روی کل element */
	}
	
	.recent-grades-table th > *,
	.recent-grades-table td > * {
		position: relative !important;
		z-index: 1 !important;
		/* اطمینان از پررنگ بودن نمرات در موبایل */
		font-weight: 600 !important;
		color: #0f172a !important;
		opacity: 1 !important;
	}
	
	.recent-grades-table th:first-child,
	.recent-grades-table td:first-child {
		border-left: 1px solid rgba(0, 0, 0, 0.1) !important;
	}
	
	.recent-grades-table th:last-child,
	.recent-grades-table td:last-child {
		border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
	}

/* سازگاری با موبایل */
	.search-form-container {
		padding: 0.25rem 0.5rem;
		border-radius: 0.5rem;
		margin: 0.375rem;
		max-width: calc(100% - 0.75rem);
	}
	
	.search-field-group {
		display: flex;
		align-items: center;
		width: 100%;
		padding: 0.5rem;
		margin-bottom: 0.5rem;
		flex-wrap: nowrap;
		gap: 0.5rem;
		background: #fff;
		border-radius: 0.375rem;
		border: 1px solid #e5e7eb;
		box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	}
	
	.search-label {
		display: inline-block;
		margin: 0;
		font-size: 0.8125rem;
		font-weight: 600;
		color: #374151;
		vertical-align: middle;
		flex-shrink: 0;
		min-width: 80px;
		text-align: right;
		white-space: nowrap;
	}
	
	.search-input-wrapper {
		display: inline-block;
		width: 100%;
		vertical-align: middle;
		flex: 1;
		min-width: 0;
	}
	
	.search-select, .search-input, .search-date-input {
		width: 100% !important;
		min-width: 0 !important;
		font-size: 0.75rem;
		padding: 0.3125rem 0.4375rem;
		border-radius: 0.375rem;
		max-width: 100% !important;
		box-sizing: border-box;
		line-height: normal;
		height: auto;
	}
	
	.search-date-input {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		font-size: 0.75rem;
		padding: 0.3125rem 0.4375rem;
		box-sizing: border-box;
		line-height: normal;
		height: auto;
	}
	
	#total_grade {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		font-size: 0.875rem !important;
		padding: 0.3125rem 0.4375rem;
		box-sizing: border-box;
		line-height: normal;
		height: auto;
	}
	
	#total_grade option {
		font-size: 0.875rem !important;
	}
	
	.date-input-wrapper {
		display: flex;
		width: 100%;
		align-items: center;
		gap: 0.5rem;
	}
	
	.calendar-icon {
		flex-shrink: 0;
		width: 28px;
		height: 28px;
	}
	
	.search-field-group.search-actions {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		margin-top: 0.5rem;
		flex-wrap: wrap;
		gap: 0.5rem;
	}
	
	.search-actions {
		display: contents;
	}
	
	.search-buttons {
		display: contents;
	}
	
	.search-submit-btn, .search-reset-btn {
		display: inline-block;
		text-align: center;
		padding: 0.4375rem 0.75rem;
		font-size: 0.875rem; /* یک سایز بزرگتر از 0.75rem */
		font-weight: 500;
		border-radius: 0.375rem;
		min-height: auto;
		border: none !important;
		margin: 0;
	}
	
	.calendar {
		width: 95% !important;
		max-width: 95vw;
		font-size: 13px;
		position: fixed !important;
		left: 50% !important;
		right: auto !important;
		top: 50% !important;
		transform: translate(-50%, -50%) !important;
		margin: 0 !important;
	}
	
	.calendar table {
		width: 100% !important;
		font-size: 11px;
	}
	
	.calendar .calendar-day {
		padding: 8px 4px !important;
		font-size: 12px;
	}
	
	.calendar .calendar-nav {
		padding: 6px 10px !important;
		font-size: 16px !important;
		min-width: 35px !important;
	}
	
	.recent-grades-container {
		margin: 5px;
	}
	
	.recent-grades-table {
		width: 50px;
		font-size: 0.7rem;
	}
	
	.recent-grades-table th,
	.recent-grades-table td {
		padding: 3px 4px;
		font-size: 0.65rem;
	}
	
	.ewTableHeaderBtn {
		font-size: 0.75rem;
	}
	
	.grade-separator {
		font-size: 0.75rem;
		margin: 0 0.125rem;
	}
}

@media (max-width: 480px) {
	.search-form-container {
		padding: 0.25rem 0.5rem;
		margin: 0.25rem;
		max-width: calc(100% - 0.5rem);
	}
	
	.search-field-group {
		padding: 0.4375rem;
		margin-bottom: 0.4375rem;
		gap: 0.375rem;
		flex-wrap: wrap;
	}
	
	.search-label {
		font-size: 0.6875rem;
		min-width: 60px;
		width: auto;
		margin-bottom: 0;
	}
	
	.search-input-wrapper {
		width: 100%;
		flex: 1;
		min-width: 0;
	}
	
	.search-select, .search-input, .search-date-input {
		font-size: 0.6875rem;
		padding: 0.3125rem 0.4375rem;
		max-width: 100% !important;
		width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box;
		line-height: normal;
		height: auto;
	}
	
	.search-date-input {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		font-size: 0.6875rem;
		padding: 0.3125rem 0.4375rem;
		box-sizing: border-box;
		line-height: normal;
		height: auto;
	}
	
	#total_grade {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		font-size: 0.8125rem !important;
		padding: 0.3125rem 0.4375rem;
		box-sizing: border-box;
		line-height: normal;
		height: auto;
	}
	
	#total_grade option {
		font-size: 0.8125rem !important;
	}
	
	.search-field-group.search-actions {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		margin-top: 0.5rem;
		flex-wrap: wrap;
		gap: 0.5rem;
	}
	
	.search-actions {
		display: contents;
	}
	
	.search-buttons {
		display: contents;
	}
	
	.search-submit-btn, .search-reset-btn {
		display: inline-block;
		text-align: center;
		padding: 0.4375rem 0.75rem;
		font-size: 0.875rem; /* یک سایز بزرگتر از 0.75rem */
		font-weight: 500;
		border-radius: 0.375rem;
		min-height: auto;
		border: none !important;
		margin: 0;
	}
	
	.calendar {
		width: 98% !important;
		font-size: 12px;
	}
	
	.calendar .calendar-day {
		padding: 6px 3px !important;
		font-size: 11px;
	}
	
	/* بهینه‌سازی جدول ثبت نمرات برای موبایل کوچک */
	body {
		overflow-x: hidden !important;
		max-width: 100vw !important;
	}
	
	.ewTable {
		width: max-content !important;
		min-width: 100% !important;
		max-width: 100vw !important;
		font-size: 0.625rem !important;
		table-layout: auto;
		display: table;
		box-sizing: border-box;
	}
	
	.ewTable td,
	.ewTable th {
		padding: 0.1875rem 0.25rem !important;
		font-size: 0.625rem !important;
		white-space: nowrap;
		max-width: 100px !important;
		overflow: visible;
		text-overflow: ellipsis;
		box-sizing: border-box;
	}
	
	.ewTable td:has(.recent-grades-container),
	.ewTable th:has(.recent-grades-container) {
		max-width: none !important;
		overflow: visible !important;
		width: auto !important;
		min-width: 80px !important;
		padding: 0.125rem 0.1875rem !important;
	}
	
	.ewTable thead td {
		padding: 0.25rem 0.375rem !important;
		font-size: 0.625rem !important;
	}
	
	.ewTableHeaderBtn {
		font-size: 0.625rem !important;
	}
	
	.grade-input-container {
		display: flex;
		align-items: center;
		gap: 0.0625rem;
		flex-wrap: nowrap;
		justify-content: center;
		min-width: 0;
	}
	
	.grade-input,
	.grade-input-int,
	.grade-input-dec {
		font-size: 0.8125rem !important; /* یک سایز بزرگتر از 0.6875rem */
		font-weight: bold !important; /* Bold کردن در موبایل کوچک */
		padding: 0.125rem 0.1875rem !important;
		width: 40px !important;
		min-width: 40px !important;
		max-width: 40px !important;
		box-sizing: border-box;
	}
	
	.grade-separator {
		font-size: 0.5625rem !important;
		margin: 0 0.03125rem;
	}
	
	.recent-grades-table {
		font-size: 0.5rem !important;
		border-collapse: separate !important;
		border-spacing: 0 !important;
		overflow: hidden !important;
		border-radius: 3px !important;
	}
	
	.recent-grades-table th,
	.recent-grades-table td {
		padding: 1px 1px !important;
		font-size: 0.5rem !important;
		border: 1px solid rgba(0, 0, 0, 0.1) !important;
		border-left: none !important;
		border-right: none !important;
		border-radius: 0 !important;
		min-width: 25px !important;
	}
	
	.recent-grades-table th:first-child,
	.recent-grades-table td:first-child {
		border-left: 1px solid rgba(0, 0, 0, 0.1) !important;
	}
	
	.recent-grades-table th:last-child,
	.recent-grades-table td:last-child {
		border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
	}
}

/* ============================================
   استایل‌های مشترک برای تقویم‌های مدرن در همه صفحات
   ============================================ */

/* استایل wrapper برای input تاریخ و دکمه تقویم */
.date-input-wrapper {
	position: relative;
	display: inline-block;
	vertical-align: middle;
}

/* استایل input تاریخ */
.persian-date-input {
	padding: 0.3125rem 0.4375rem 0.3125rem 2rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	font-family: 'IRANSans', Tahoma, sans-serif;
	transition: all 0.3s ease;
	width: 110px;
	max-width: 200px;
	text-align: right;
	direction: rtl;
	cursor: pointer;
	background-color: #fff;
}

.persian-date-input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.persian-date-input:hover {
	border-color: #667eea;
}

/* استایل آیکن تقویم */
.calendar-icon {
	position: absolute;
	left: 0.375rem;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	cursor: pointer;
	color: #667eea;
	transition: color 0.2s ease;
	pointer-events: auto;
	z-index: 1;
}

.calendar-icon:hover {
	color: #5568d3;
}

/* استایل برای input های تاریخ در جداول */
table .persian-date-input {
	width: 100px;
	font-size: 0.6875rem;
	padding: 0.25rem 0.375rem 0.25rem 1.75rem;
	text-align: right;
}

table .calendar-icon {
	width: 16px;
	height: 16px;
	left: 0.25rem;
}

/* استایل برای input های تاریخ در فرم‌های جستجو */
.search-date-input.persian-date-input {
	width: 110px;
	padding-right: 0.4375rem;
	padding-left: 2rem;
	text-align: right;
}

/* غیرفعال کردن تقویم‌های قدیمی */
.calendar {
	display: none !important;
}

/* استایل برای موبایل */
@media (max-width: 768px) {
	.persian-date-input {
		width: 100px;
		font-size: 0.6875rem;
		padding: 0.25rem 0.375rem 0.25rem 1.75rem;
		text-align: right;
	}
	
	.calendar-icon {
		width: 16px;
		height: 16px;
		left: 0.25rem;
	}
}

@media (max-width: 480px) {
	.persian-date-input {
		width: 90px;
		font-size: 0.625rem;
		padding: 0.1875rem 0.3125rem 0.1875rem 1.5rem;
		text-align: right;
	}
	
	.calendar-icon {
		width: 14px;
		height: 14px;
		left: 0.1875rem;
	}
}

/* مخفی کردن متن آیکن‌های action در موبایل */
@media (max-width: 768px) {
	.action-icon-button .action-text {
		display: none !important;
	}
	
	.action-icon-button {
		justify-content: center !important;
		padding: 0 0.5rem !important;
		min-width: 36px !important;
		width: 36px !important;
	}
	
	.action-buttons-container {
		gap: 0.375rem !important;
	}
	
	/* بهینه‌سازی فونت‌های header و navbar در موبایل */
	.page-header-modern {
		font-size: 0.875rem !important;
		padding: 0.5rem 0.75rem !important;
	}
	
	.page-header-title {
		font-size: 0.875rem !important;
	}
	
	.page-header-dashboard-link {
		font-size: 0.75rem !important;
		padding: 0.375rem 0.5rem !important;
	}
	
	.headernav a {
		font-size: 0.875rem !important;
	}
	
	/* بهینه‌سازی فونت‌های action buttons */
	.action-icon-button {
		font-size: 0.75rem !important;
	}
	
	/* بهینه‌سازی فونت‌های export dropdown */
	.export-dropdown-toggle {
		font-size: 0.75rem !important;
		padding: 0.375rem 0.5rem !important;
	}
	
	.export-dropdown-menu {
		font-size: 0.75rem !important;
	}
	
	.export-dropdown-menu a {
		font-size: 0.75rem !important;
		padding: 0.375rem 0.5rem !important;
	}
	
	/* بهینه‌سازی فونت‌های search form */
	.search-form-container,
	.search-form-container input,
	.search-form-container select,
	.search-form-container button {
		font-size: 0.875rem !important;
	}
	
	/* Bold کردن select و input های جستجو در موبایل */
	.search-select,
	.persian-date-input,
	.search-date-input,
	#psearch,
	#x_dars,
	#date_input_10,
	#total_grade,
	#grade_type {
		font-weight: bold !important;
	}
	
	/* بهینه‌سازی فونت‌های table */
	.ewTable,
	.ewTable td,
	.ewTable th {
		font-size: 0.875rem !important;
	}
	
	.ewTableHeader td,
	.ewTable2Header td {
		font-size: 0.875rem !important;
	}
	
	/* بهینه‌سازی فونت‌های pagination */
	.ewGridLowerPanel,
	.ewGridLowerPanel *,
	.ewGridLowerPanel td,
	.ewGridLowerPanel span,
	.ewGridLowerPanel .fontstyle {
		font-size: 0.875rem !important;
	}
	
	/* بهینه‌سازی فونت‌های modal */
	.modal-title,
	.modal-body,
	.modal-footer {
		font-size: 0.875rem !important;
	}
	
	/* بهینه‌سازی فونت‌های card */
	.card-header {
		font-size: 0.9375rem !important;
	}
	
	.card-body {
		font-size: 0.875rem !important;
	}
	
	/* بهینه‌سازی فونت‌های button */
	.btn {
		font-size: 0.875rem !important;
		padding: 0.5rem 0.75rem !important;
	}
	
	/* بهینه‌سازی فونت‌های input و select */
	input[type="text"],
	input[type="number"],
	input[type="email"],
	input[type="password"],
	input[type="date"],
	input[type="time"],
	textarea,
	select {
		font-size: 0.875rem !important;
	}
	
	/* بهینه‌سازی فونت‌های label */
	label,
	.ewLabel {
		font-size: 0.875rem !important;
	}
	
	/* بهینه‌سازی فونت‌های message */
	.ewMessage {
		font-size: 0.875rem !important;
	}
	
	/* بهینه‌سازی فونت‌های news */
	.ewNewsHeader {
		font-size: 0.9375rem !important;
	}
	
	.ewNewsContent {
		font-size: 0.875rem !important;
	}
}

/* بهینه‌سازی بیشتر برای موبایل کوچک */
@media (max-width: 480px) {
	.page-header-modern {
		font-size: 0.8125rem !important;
		padding: 0.4375rem 0.625rem !important;
	}
	
	.page-header-title {
		font-size: 0.8125rem !important;
	}
	
	.page-header-dashboard-link {
		font-size: 0.6875rem !important;
		padding: 0.3125rem 0.4375rem !important;
	}
	
	.headernav a {
		font-size: 0.8125rem !important;
	}
	
	.action-icon-button {
		font-size: 0.6875rem !important;
	}
	
	.export-dropdown-toggle {
		font-size: 0.6875rem !important;
		padding: 0.3125rem 0.4375rem !important;
	}
	
	.export-dropdown-menu {
		font-size: 0.6875rem !important;
	}
	
	.export-dropdown-menu a {
		font-size: 0.6875rem !important;
		padding: 0.3125rem 0.4375rem !important;
	}
	
	.search-form-container,
	.search-form-container input,
	.search-form-container select,
	.search-form-container button {
		font-size: 0.8125rem !important;
	}
	
	/* Bold کردن select و input های جستجو در موبایل کوچک */
	.search-select,
	.persian-date-input,
	.search-date-input,
	#psearch,
	#x_dars,
	#date_input_10,
	#total_grade,
	#grade_type {
		font-weight: bold !important;
	}
	
	.ewTable,
	.ewTable td,
	.ewTable th {
		font-size: 0.8125rem !important;
	}
	
	.ewTableHeader td,
	.ewTable2Header td {
		font-size: 0.8125rem !important;
	}
	
	.ewGridLowerPanel,
	.ewGridLowerPanel *,
	.ewGridLowerPanel td,
	.ewGridLowerPanel span,
	.ewGridLowerPanel .fontstyle {
		font-size: 0.8125rem !important;
	}
	
	.modal-title,
	.modal-body,
	.modal-footer {
		font-size: 0.8125rem !important;
	}
	
	.card-header {
		font-size: 0.875rem !important;
	}
	
	.card-body {
		font-size: 0.8125rem !important;
	}
	
	.btn {
		font-size: 0.8125rem !important;
		padding: 0.4375rem 0.625rem !important;
	}
	
	input[type="text"],
	input[type="number"],
	input[type="email"],
	input[type="password"],
	input[type="date"],
	input[type="time"],
	textarea,
	select {
		font-size: 0.8125rem !important;
	}
	
	label,
	.ewLabel {
		font-size: 0.8125rem !important;
	}
	
	.ewMessage {
		font-size: 0.8125rem !important;
	}
	
	.ewNewsHeader {
		font-size: 0.875rem !important;
	}
	
	.ewNewsContent {
		font-size: 0.8125rem !important;
	}
}

/* استایل برای آیکن‌های edit در جداول - رنگ آبی یکسان */
.ewTable .ewInlineLink svg[stroke="currentColor"],
.ewTable a[href*="edit"] svg,
.ewTable .ewInlineLink svg {
    stroke: #3b82f6 !important;
    color: #3b82f6 !important;
}

.ewTable .ewInlineLink:hover svg {
    stroke: #2563eb !important;
    color: #2563eb !important;
}

/* حذف کادر از همه لینک‌های داخل ewTable */
.ewTable a,
.ewTable a:link,
.ewTable a:visited,
.ewTable a:hover,
.ewTable a:active,
.ewTable a:focus,
.ewTableSeparate a,
.ewTableSeparate a:link,
.ewTableSeparate a:visited,
.ewTableSeparate a:hover,
.ewTableSeparate a:active,
.ewTableSeparate a:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* حذف کادر از div و span های داخل ewTable که حاوی لینک هستند */
.ewTable td div,
.ewTable td span,
.ewTableSeparate td div,
.ewTableSeparate td span {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}


