@import url(fontiran.css);
@import url(fonts.css);

body {
	font-family: IRANSansXFaNum, IRANYekanFaNum, iranyekan, Tahoma, sans-serif;
	font-size: 0.9rem;
	background-color: #f8f9fa;
}
.django-ckeditor-widget
{
	width: 100%;
}
h1 {
	font-size: 1.7rem;
	font-weight: 550;
	margin-bottom: 1rem;
}

h2 {
	font-size: 1.2rem;
	font-weight: 550;
	margin-bottom: 1rem;
}

h3 {
	font-size: 1.1rem;
	font-weight: 550;
	margin-bottom: 0.8rem;
}

h4 {
	font-size: 1.0rem;
	font-weight: 550;
	margin-bottom: 0.6rem;
}

h5 {
	font-size: 0.9rem;
	font-weight: 550;
	margin-bottom: 0.5rem;
	line-height: 1.5;
}

a {
	text-decoration: none;
	transition: color 0.2s;
}

a:hover {
	color: #0d6efd;
}

.system-title {
	color: #e2e8f0;
	font-size: 1.8rem;
	font-weight: 500;
	margin-bottom: 0.5rem;
	font-family: "IranNastaliq", "IranYekan", "Tahoma";
}

@media (max-width: 768px) {
	.system-title {
		font-size: 1.4rem;
	}
}

/*برای چشمک زدن آیکونهایی مثل انتخابات*/
@keyframes blink {
  50% { opacity: 0; }
}

.blink-text {
  animation: blink 1.4s 14;
}


@media (min-width: 1400px){
	.container, .container-lg, .container-md, .container-sm, .container-xl
	{
		max-width: 1500px;
	}
}

@media print {
	.top-bar,
	footer,
	.sidebar-menu,
	.menu-overlay,
	.no-print{
		display:none !important;
	}

	html,
	body{
		margin:0 !important;
		padding:0 !important;
		background:#fff !important;
	}
	.app-wrapper{
		margin:0 !important;
		padding:0 !important;
		display:block !important;
		width:100% !important;
		max-width:100% !important;
	}

	.main-content{
		margin:0 !important;
		padding:0 !important;
		border:none !important;
		box-shadow:none !important;
		width:100% !important;
	}
}

.form-grid {
	display: grid;
	grid-template-columns: 100px 1fr;
	gap: 1rem;
	align-items: center;
}

.form-grid label {
	text-align: left;
	margin-bottom: 0;
	font-weight: 500;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
	width: 100%;
	padding: 0.375rem 0.75rem;
	border: 1px solid #ced4da;
	border-radius: 0.25rem;
}

/* استایل برای checkbox های داخل فرم‌ست مستندات */
.form-grid input[type="checkbox"][name*="DELETE"] {
	width: 16px;
	height: 16px;
	margin-left: 8px;
}

.form-grid input[type="checkbox"][name*="DELETE"]:checked {
	accent-color: #dc3545; /* رنگ قرمز برای حذف */
}

/* برای لیبل checkbox حذف */
.form-grid label[for*="DELETE"] {
	color: #dc3545;
	cursor: pointer;
	font-size: 0.9rem;
}

.document-form {
	margin-bottom: 1.5rem;
	position: relative;
	border: 1px solid #dee2e6;
	border-radius: 0.25rem;
	padding: 1rem;
}

/* رنگ‌های متناوب برای کارت‌ها */
.document-form:nth-child(odd) {
	background-color: #f8f9fa;
}
   
/* استایل‌های اضافی برای بهبود ظاهر */
.form-icon {
	margin-left: 5px;
	vertical-align: middle;
}

.card-header {
	background-color: #dde9eb;    
}

/* دکمه‌های افزودن/حذف */
.btn-add-form {
	background-color: #28a745;
	color: white;
	margin-bottom: 1rem;
}

.btn-remove-form {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	background-color: #dc3545;
	color: white;
	border: none;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.hidden {
	display: none;
}

.alert-error {
	background: linear-gradient(135deg, #FFCDD2 0%, #FFEBEE 100%);
	color: #C62828;
	padding: 14px;
	border-radius: 8px;
	box-shadow: 0 3px 6px rgba(198,40,40,0.16);
	font-weight: bold;
}


/* ===== RESET & BASE ===== */
html, body {
	height: 100%;
	margin: 0;
	padding: 0;
	background-color: #f0f2f5;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* ===== LAYOUT ===== */
.app-wrapper {
	display: flex;
	flex: 1;
	width: 100%;
	max-width: 100%;
	padding: 0 20px;
	gap: 25px;
	margin: 20px 0;
}

/* ===== TOP BAR ===== */
.top-bar {
	background: linear-gradient(135deg, #0d6efd 0%, #0099ff 100%);
	color: white;
	padding: 10px 0;
	box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
	width: 100%;
	position: sticky;
	top: 0;
	z-index: 1000;
}

.top-bar .container-fluid {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 25px;
}

.top-bar .site-brand {
	font-size: 1.2rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(255, 255, 255, 0.15);
	padding: 5px 15px;
	border-radius: 14px;
	backdrop-filter: blur(5px);
}

.top-bar .site-brand i {
	font-size: 1.3rem;
}

.top-bar .site-brand a {
	color: white;
	text-decoration: none;
}

.top-bar .user-section {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.top-bar .action-buttons {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: 15px;
	padding-left: 15px;
	border-left: 2px solid rgba(255, 255, 255, 0.3);
}

.top-bar .action-btn {
	background: rgba(255, 255, 255, 0.2);
	color: white;
	border: none;
	padding: 6px 15px;
	border-radius: 14px;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	text-decoration: none;
	transition: all 0.3s ease;
	backdrop-filter: blur(5px);
}

.top-bar .action-btn:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: translateY(-2px);
	color: white;
}

.top-bar .action-btn i {
	font-size: 1rem;
}

.top-bar .user-info {
	display: flex;
	align-items: center;
	gap: 15px;
}

.top-bar .user-info a {
	color: white;
	text-decoration: none;
	opacity: 0.9;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1rem;
}

.top-bar .user-info a:hover {
	opacity: 1;
	transform: translateY(-2px);
}

.top-bar .user-profile {
	background: rgba(255, 255, 255, 0.2);
	padding: 6px 15px;
	border-radius: 14px;
	backdrop-filter: blur(5px);
}

.top-bar .user-profile i {
	font-size: 1.1rem;
}

.top-bar .logout-btn {
	background-color: rgba(204, 91, 102, 0.33);
	padding: 6px 15px;
	border-radius: 14px;
	backdrop-filter: blur(5px);
}

.top-bar .logout-btn:hover {
	background-color: rgba(220, 53, 69, 0.3);
}
		

/* ===== MAIN CONTENT ===== */
.main-content {
	flex: 1;
	min-width: 0;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
	padding: 10px;
	border: 1px solid rgba(0, 0, 0, 0.03);
	transition: all 0.3s ease;
	animation: slideIn 0.4s ease-out;
}

/* ===== SIDEBAR ===== */
.sidebar-menu {
	width: 300px;
	flex-shrink: 0;
	background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
	border-radius: 16px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
	padding: 25px 0;
	height: fit-content;
	position: sticky;
	top: 85px;
	border: 1px solid rgba(13, 110, 253, 0.1);
	transition: all 0.3s ease;
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 #f1f5f9;
}

.sidebar-menu::-webkit-scrollbar {
	width: 5px;
}
.sidebar-menu::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 10px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 10px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* desktop toggle styled like mobile hamburger, shown on desktop only */
.desktop-menu-toggle {
	display: inline-flex;
	justify-content: center;
	background: rgba(255, 255, 255, 0.2);
	color: white;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 1.3rem;
	cursor: pointer;
	transition: all 0.3s ease;
	margin-inline-start: 8px; /* small gap from logo in RTL */
	height: 40px;
	width: 40px;
	padding: 6px;
}

.desktop-menu-toggle:hover {
	background: rgba(255, 255, 255, 0.3);
}
/* ===== FOOTER ===== */
footer {
	margin-top: auto;
	background: linear-gradient(135deg, #0a58ca 0%, #0d6efd 100%);
	width: 100%;
	padding: 20px 0;
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(10px);
		-webkit-transform:;
		-moz-transform:;
		-ms-transform:;
		-o-transform:;
}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* حالت مخفی سایدبار */
body.sidebar-hidden .sidebar-menu {
	display: none !important;
}

body.sidebar-hidden .menu-overlay {
	display: none !important;
}

body.sidebar-hidden .app-wrapper {
	padding-right: 0;
}

body.sidebar-hidden .main-content {
	width: 100%;
}

/*مناسب سازی لیست جستجو برای زبان فارسی*/
.select2-container--bootstrap-5 .select2-selection {
	min-width: 200px;
}
.select2-selection__rendered
{
	padding-right: 20px;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear
{
	left: 1rem;
	right: auto !important;
}