:root /* light */
{
	/* --bg-main: #F6F6F6; */
	--bg-main: #ffffff;
	--bg-side: #FFFFFF;
	/* --bg-content: #F3F3F3; */
	--bg-content: #ffffff;
	--bg-form: #ffffff;
	--bg-scroll: rgba(0,0,0,0.2);
	/* --bg-scroll: rgba(0,0,0); */
	--bg-hover-side: #f3f4f6;
	
	--border-side: #E2E2E2;
	--border-form: #E2E2E2;
	
	--color-side: #1F1F1F;
	--color-content: #1F1F1F;
	--color-form: #1F1F1F;
	
	--bar-height: 50px;
	
	--icon-normal: #6A6A6A;
	--icon-available: #1F1F1F;
	--icon-unavailable: #B5B5B5;
	
	--btn-submit-bg: #2563EB;        /* آبی مدرن */
	--btn-submit-bg-hover: #1D4ED8;
	--btn-submit-bg-active: #1E40AF;

	--btn-submit-color: #FFFFFF;
	--btn-submit-border: #2563EB;
}

body.dark /* dark */
{
	--bg-main: #121212;
	--bg-side: #181818;
	--bg-content: #141414;
	--bg-form: #1E1E1E;
	--bg-scroll: rgba(100,100,100,0.2);
	/* --bg-scroll: red; */
	/* --bg-hover-side: #2E2E2E; */
	--bg-hover-side: #535353;
	
	--border-side: #535353;
	--border-form: #535353;
	
	--color-side: #EDEDED;
	--color-content: #EDEDED;
	--color-form: #EDEDED;
	
	--icon-normal: #B5B5B5;
	--icon-available: #FFFFFF;
	--icon-unavailable: #6A6A6A;
	
	--btn-submit-bg: #3B82F6;        /* کمی روشن‌تر برای دارک */
	--btn-submit-bg-hover: #2563EB;
	--btn-submit-bg-active: #1D4ED8;

	--btn-submit-color: #FFFFFF;
	--btn-submit-border: #3B82F6;
}

/* استایل خط با عنوان */
.divider
{
	display: flex;
	align-items: center;
	margin: 30px 0;
}

.divider-line
{
	flex: 1;
	height: 2px;
	/* background-color: red; */
}

.divider-title
{
	padding: 0 15px;
	color: var(--color-content);
	font-weight: bold;
	font-size: 1.4rem;
	white-space: nowrap;
}

/* انواع مختلف استایل خط */
.divider-solid .divider-line
{
	background-color: var(--border-form);
	height: 2px;
}

.divider-dotted .divider-line
{
	background-color: transparent;
	background-image: linear-gradient(to right, transparent 50%, #e74c3c 50%);
	background-size: 15px 2px;
	height: 2px;
}

.divider-dashed .divider-line
{
	background-color: transparent;
	background-image: linear-gradient(to right, transparent 50%, #2ecc71 50%);
	background-size: 10px 2px;
	height: 2px;
}

.divider-double .divider-line
{
	height: 4px;
	background: linear-gradient(to bottom, #9b59b6 2px, transparent 2px, transparent 2px, #9b59b6 2px);
}

.divider-shadow .divider-line
{
	height: 3px;
	background-color: #f1c40f;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.divider-gradient .divider-line
{
	height: 3px;
	background: linear-gradient(to right, #e74c3c, #3498db);
}

/* Firefox */
*
{
	/* اندازه کوچک */
	scrollbar-width: thin;
	/* رنگ thumb و track */
	scrollbar-color: var(--bg-scroll) transparent;
}

/* Webkit */
*::-webkit-scrollbar
{
	width: 6px;
	height: 6px;
}

*::-webkit-scrollbar-thumb
{
	background-color: var(--bg-scroll);
	border-radius: 3px;
}

*::-webkit-scrollbar-track
{
	background-color: transparent;
}

.btn
{
	background: var(--btn-submit-bg);
	color: var(--btn-submit-color);
	
	border: 1px solid var(--btn-submit-border);
	border-radius: 8px;
	
	padding: 10px 18px;
	
	font-size: 14px;
	font-weight: 500;
	
	cursor: pointer;
	
	transition:
		background-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.1s ease;
}

.btn:hover
{
	background: var(--btn-submit-bg-hover);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active
{
	background: var(--btn-submit-bg-active);
	transform: translateY(1px);
	box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.btn:disabled
{
	background: var(--bg-hover-side);
	color: var(--icon-unavailable);
	border-color: var(--border-form);
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

@font-face
{
	font-family: 'Vazir';
	src: url('../fonts/vazir/Vazir.woff2') format('woff2'),
		 url('../fonts/vazir/Vazir.woff') format('woff'),
		 url('../fonts/vazir/Vazir.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

*
{
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Vazir';
}

html, body
{
	height: 100%;
	overflow: hidden;
}

/* لایه اصلی */
.dashboard
{
	display: flex;
	min-height: 100dvh;
}

/* سایدبار */
.sidebar
{
	width: 250px;
	background: var(--bg-side);
	border-inline-end: 1px solid var(--border-side);
	transition: width 0.3s ease;
	
	/* display: flex; */
	/* flex-direction: column; */
}

/* فقط دسکتاپ */
.sidebar-desktop
{
	display: flex;
	flex-direction: column;
	height: 100dvh;
	background: var(--bg-side);
}

.sidebar-top,
.sidebar-bottom
{
	height: var(--bar-height);
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-side);
	color: var(--color-side);
}

.sidebar-bottom
{
	border-top: 1px solid var(--border-side);
}

.sidebar-top
{
	display: flex;
	flex-direction: row;
	align-items: center;
	/* justify-content: center; */
	justify-content: space-between;
	border-bottom: 1px solid var(--border-side);
}

.sideTopRight
{
	/* flex: 1; */
	height: 100%;
	padding: 5px 10px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	/* background-color: red; */
	cursor: pointer;
	/* justify-content: space-between; */
}

.sideTopRight .arrow
{
	transition: transform 0.3s ease;
	transform: rotate(90deg);
}

.iconAvailable
{
	color: var(--icon-available);
}

.sideTopRight.open .arrow
{
	transform: rotate(0deg);
}

.sideTopRightValue
{
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.sideTopLeft
{
	/* width: 50px; */
	height: 100%;
	padding: 0px 17px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	/* background-color: blue; */
}

.sidebar-menu
{
	flex: 1;
	overflow-y: auto;
}

.sidebar
{
	width: 260px;
	background: #1e1e2f;
	color: #fff;
	font-family: Vazir, sans-serif;
	height: 100vh;
}

.menu
{
	list-style: none;
	margin: 0;
	padding: 0;
}

.menu-item
{
	/* border-bottom: 1px solid rgba(0,0,0,0.05); */
}

.menu-link
{
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	cursor: pointer;
	color: var(--color-side);
	text-decoration: none;
}

.menu-link:hover
{
	background: var(--bg-hover-side);
}

.menu-link .value
{
	/* background-color: red; */
	
	display: flex;
	justify-content: center;
	align-items: center;
}

.menu-link .value .icon
{
	margin-left: 10px;
}

.menu-link .value .titr
{
	
}

.menu-link .iconArrow
{
	/* background-color: blue; */
}

.has-submenu .menu-link
{
	user-select: none;
}

.submenu
{
	list-style: none;
	padding: 0;
	margin: 0;
	display: none;
	background: var(--bg-side);
}

.submenu .value
{
	/* background-color: red; */
	
	display: flex;
	/* justify-content: center; */
	align-items: center;
}

.submenu .value .icon
{
	margin-left: 10px;
}

.submenu .value .titr
{
	
}

.submenu li a
{
	display: block;
	padding: 10px 32px;
	color: var(--color-side);
	text-decoration: none;
	font-size: 14px;
}

.submenu li a:hover
{
	background: var(--bg-hover-side);
	color: var(--color-side);
}

.menu-item.open .submenu
{
	display: block;
}

.arrow
{
	font-size: 12px;
	transition: transform 0.3s;
	transform: rotate(90deg);
	
}

.menu-item.open .arrow
{
	transform: rotate(0deg);
}

.sidebar-mobile
{
	background: var(--bg-side);
	display: none;
	grid-template-columns: repeat(5, 1fr);
	height: 100%;
}

@media (max-width: 768px)
{
	.sidebar
	{
		width: 100%;
		height: var(--bar-height);

		position: fixed;
		bottom: 0;
		right: 0;
		left: 0;
		z-index: 1000;
		border-inline-end: 0px;
		border-top: 1px solid var(--border-side);
	}
	
	.sidebar-desktop
	{
		display: none;
	}
	
	.sidebar-mobile
	{
		display: grid;
	}
	
	.nav-btn
	{
		color: var(--color-side);
		font-size: 14px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.nav-btn-center
	{
		/* font-size: 20px; */
	}
	
	.content
	{
		padding-bottom: var(--bar-height); /* جا برای سایدبار پایین */
	}
}





/* محتوای اصلی */
.content
{
	background-color: var(--bg-content);
	flex: 1;
	height: 100dvh;
	overflow: auto;
}

.form
{
	margin: auto;
	background: var(--bg-form);
	/* border-radius: 10px; */
	/* margin: 30px; */
	min-height: 200px;
	color: var(--color-form);
	/* border: 1px solid var(--border-form); */
	
	/* padding: 20px; */
	/* box-shadow: 0 8px 25px rgba(0,0,0,0.12); */
	/* width: fit-content; */
	/* margin-left: auto; */
	/* margin-right: auto; */
	/* margin: 30 auto; */
}

.disNone
{
	display: none !important;
}

.noSelect
{
	-webkit-user-select: none; /* Chrome, Safari */
	-moz-user-select: none;    /* Firefox */
	-ms-user-select: none;     /* Edge قدیمی */
	user-select: none;         /* استاندارد */
}

/* Input group */

.input-group
{
	position: relative;
	/* width: 300px; */
	/* margin: auto; */
	margin-bottom: 30px;
	margin-top: 30px;
}

.input-group .manual
{
	position: absolute;
	top: -3px;
	left: -3px;
	cursor: pointer;
	padding: 10px;
}
/* اینجا یک wrapper برای input اضافه می‌کنیم */
.input-wrapper
{
	position: relative;
}

@media (max-width: 768px)
{
	.input-group
	{
		width: 100%;
	}
	
	.input-group .date-inputs
	{
		flex-direction: row; /* دو input هنوز کنار هم */
	}
	
	.input-group .select-options
	{
		flex-direction: row;
	}
}

.input-group-check
{
	width: 100%;
	padding: 16px 12px 12px 12px;
	font-size: 16px;
	border: 1px solid #aaa;
	border-radius: 8px;
	background: var(--bg-form);
	outline: none;
	transition: border-color 0.3s;
	font-family: 'Vazir';
	color: var(--color-form);
	cursor: pointer;
	margin-top: 20px;
}

.input-group-check *
{
	cursor: pointer;
}

.input-group-check label
{
	margin-right: 5px;
}

/* ورودی */
.input-wrapper input
{
	width: 100%;
	padding: 16px 12px 12px 12px;
	font-size: 16px;
	border: 1px solid #aaa;
	border-radius: 8px;
	background: var(--bg-form);
	outline: none;
	transition: border-color 0.3s;
	font-family: 'Vazir';
	color: var(--color-form);
}

/* inputهای ماه و سال */
.input-wrapper .date-inputs input
{
	flex: 1; /* دو input مساوی */
}

/* بدون نوار اضافه */
.input-wrapper input:focus
{
	/* border-color: #4CAF50; */
	border-color: var(--border-form);
}

/* لیبل اصلی */
.input-wrapper label
{
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
	color: #888;
	padding: 0 4px;
	transition: all 0.3s ease;
	pointer-events: none;
	z-index: 3;
	background: transparent;
}

.input-wrapper label.top
{
	top: 0px;
	background: var(--bg-form); /* هم‌رنگ پس‌زمینه input */
}

.input-wrapper .date-inputs
{
	display: flex;
	gap: 10px; /* فاصله بین ماه و سال */
}

/* وقتی فوکوس یا پرشده */
.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label
{
	top: 0;
	transform: translateY(-50%);
	font-size: 16px;
	color: #888;
}

/* ماسک برای بریدن خط پشت لیبل */
.input-wrapper label::before
{
	content: '';
	position: absolute;
	top: 50%;
	right: 0;
	left: 0;
	height: 1.4em; /* ارتفاع مناسب برای برش کامل خط */
	background-color: var(--bg-form); /* هم‌رنگ پس‌زمینه ورودی */
	transform: translateY(-50%);
	z-index: -1;
	border-radius: 4px;
	display: none;
}

.input-wrapper input:focus + label::before,
.input-wrapper input:not(:placeholder-shown) + label::before
{
	display: block;
}

.input-group .duplicateValueWarning
{
	color: #D32F2F; /* قرمز تیره و مدرن */
	font-size: 0.875rem; /* کمی کوچکتر از متن معمول */
	font-weight: 500; /* نیمه-bold برای جلب توجه بدون اغراق */
	margin-top: 4px; /* فاصله از input */
	display: none; /* مطمئن شدن از خط جدید */
}

/* Popup */

.popup-overlay
{
	position: fixed;
	top: 0;
	left: 0;
	/* width: 100vw; */
	/* height: 100vh; */
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.popup-overlay.active
{
	opacity: 1;
	pointer-events: auto;
}

.popup-box
{
	background: var(--bg-content);
	/* min-width: 100%; */
	/* max-width: 90%; */
	max-height: 90%;
	border-radius: 8px;
	/* padding: 20px; */
	transform: scale(0.9);
	transition: transform 0.3s ease;
	overflow: auto;
	/* width: 90%; */
	/* height: 100%; */
	
	overflow-x: hidden;
}

@media (max-width: 768px)
{
	.popup-box
	{
		width: 100%;
	}
}

.popup-overlay.active .popup-box
{
	transform: scale(1);
}

.popup-close
{
	position: absolute;
	top: 10px;
	right: 15px;
	cursor: pointer;
	font-size: 20px;
}

@media print
{
	/* .popup-overlay */
	/* { */
		/* position: static !important; */
		/* background: none !important; */
		/* display: block !important; */
		/* opacity: 1 !important; */
		/* pointer-events: auto !important; */
	/* } */

	/* .popup-box */
	/* { */
		/* position: static !important; */
		/* max-height: none !important;  /* برداشتن محدودیت ارتفاع */ */
		/* transform: none !important; */
		/* width: 100% !important; */
		/* height: auto !important;       /* ارتفاع واقعی محتوا */ */
		/* overflow: visible !important; /* برداشتن scroll */ */
	/* } */

	/* .popup-close */
	/* { */
		/* display: none !important;     /* دکمه بستن در چاپ دیده نشه */ */
	/* } */
}


/* test */

.input-group-boolean
{
	position: relative;
	/* width: 300px; */
	/* margin: auto; */
	margin-bottom: 30px;
	margin-top: 30px;
	
	width: 100%;
	padding: 16px 12px 12px 12px;
	border: 1px solid #aaa;
	border-radius: 8px;
	background: var(--bg-form);
	transition: border-color 0.3s;
}

.input-group-boolean .input-group-boolean-titr
{
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
	color: #888;
	padding: 0 4px;
	transition: all 0.3s ease;
	pointer-events: none;
	z-index: 3;
	top: 0px;
	background: var(--bg-form); /* هم‌رنگ پس‌زمینه input */
}

.input-group-boolean .input-group-boolean-wrapper
{
	display: flex;
	flex-direction: row;
	gap: 10px;
}

.input-group-boolean .input-group-boolean-wrapper label
{
	flex: 1;
}

/* start confirmation-dialog */

.confirmation-dialog
{
	margin-top: 10px;
	padding: 30px;
}

/* .confirmation-dialog .dialog-box
{
	
} */

.confirmation-dialog .dialog-box p
{
	font-size: 20px;
	font-family: 'Vazir';
}

.confirmation-dialog .dialog-box .button-container
{
	margin-top: 30px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
}

.confirmation-dialog .dialog-box .confirm-btn
{
	font-family: 'Vazir';
	font-size: 15px;

	width: 100px;
	height: 40px;
	margin: 0 10px;
	background-color: #20935c;
	color: #fff;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

.confirmation-dialog .dialog-box .cancel-btn
{
	font-family: 'Vazir';
	font-size: 15px;

	width: 100px;
	height: 40px;
	margin: 0 10px;
	background-color: #cf603f;
	color: #fff;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

.note-1
{
	font-family: 'Vazir';
	font-size: 15px;
	margin-top: 5px;

	color: #cf603f;
}

/* end confirmation-dialog */

