/* The ERP login page in the CRM's sign-in look. Every rule is scoped to the login page. */

body[data-path="login"] {
	background: #f8f9fa !important;
	overflow: hidden;
}

body[data-path="login"] .ag-login-bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

body[data-path="login"] .ag-shape {
	position: absolute;
	opacity: 0.06;
	filter: blur(2px);
}

body[data-path="login"] .ag-shape-1 {
	top: 8%;
	left: -10%;
	width: 380px;
	height: 380px;
	background: #2d3436;
	border-radius: 60% 40% 30% 70%;
	animation: agFloat1 12s ease-in-out infinite;
}

body[data-path="login"] .ag-shape-2 {
	bottom: 10%;
	right: -6%;
	width: 350px;
	height: 350px;
	background: #d63031;
	border-radius: 40% 60% 70% 30%;
	animation: agFloat2 15s ease-in-out infinite;
}

body[data-path="login"] .ag-shape-3 {
	top: 20%;
	right: 15%;
	width: 280px;
	height: 280px;
	background: #f7ba5b;
	border-radius: 70% 30% 50% 50%;
	animation: agFloat3 10s ease-in-out infinite;
}

body[data-path="login"] .ag-shape-4 {
	top: 55%;
	left: 5%;
	width: 200px;
	height: 200px;
	background: #636e72;
	border-radius: 50% 50% 60% 40%;
	animation: agFloat4 18s ease-in-out infinite;
}

body[data-path="login"] .ag-shape-5 {
	top: 30%;
	left: 55%;
	width: 160px;
	height: 160px;
	background: #74b9ff;
	border-radius: 30% 70% 40% 60%;
	animation: agFloat5 14s ease-in-out infinite;
}

body[data-path="login"] .for-login {
	position: fixed;
	inset: 0;
	margin: auto;
	z-index: 2;
	height: fit-content;
	width: min(460px, calc(100% - 32px));
	background: #fff;
	border-radius: 20px;
	padding: 48px 44px 40px;
	border: 1px solid rgba(0, 0, 0, 0.04);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
	animation: agCardSlideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

body[data-path="login"] .for-login .page-card-head {
	padding: 0;
	margin: 0 0 30px;
	text-align: center;
}

body[data-path="login"] .for-login .page-card-head .app-logo {
	width: 72%;
	max-width: 260px;
	height: auto;
	max-height: none;
	border-radius: 0;
	box-shadow: none;
	background: none;
	animation: agIconBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

body[data-path="login"] .for-login .page-card-head h4 {
	color: #636e72;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	margin: 26px auto 0;
	max-width: 340px;
	animation: agTextFadeIn 0.5s ease 0.3s both;
}

body[data-path="login"] .for-login .login-content.page-card {
	background: none;
	box-shadow: none;
	border: 0;
	padding: 0;
	margin: 0;
	max-width: none;
}

body[data-path="login"] .for-login .page-card-body {
	padding: 0;
}

body[data-path="login"] .for-login .login-divider {
	display: none;
}

body[data-path="login"] .for-login .social-login-buttons,
body[data-path="login"] .for-login .login-button-wrapper {
	width: 100%;
	max-width: none;
	margin: 0;
}

body[data-path="login"] .for-login .btn-ag_one_account {
	display: block;
	width: 100%;
	background: #2d3436 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 12px !important;
	padding: 16px !important;
	font-size: 16px !important;
	font-weight: 500;
	line-height: 1.4 !important;
	height: auto !important;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	animation: agTextFadeIn 0.5s ease 0.45s both;
}

body[data-path="login"] .for-login .btn-ag_one_account:hover {
	background: #1a1e1f !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(45, 52, 54, 0.25);
}

body[data-path="login"] .for-login::after {
	content: "Need assistance? Contact the IT team for help";
	display: block;
	text-align: center;
	color: #636e72;
	font-size: 14px;
	margin-top: 26px;
	animation: agTextFadeIn 0.5s ease 0.6s both;
}

@keyframes agCardSlideUp {
	from { opacity: 0; transform: translateY(40px) scale(0.96); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes agIconBounce {
	from { opacity: 0; transform: scale(0.6); }
	60% { transform: scale(1.05); }
	to { opacity: 1; transform: scale(1); }
}

@keyframes agTextFadeIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes agFloat1 {
	0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
	50% { transform: translate(-15px, 25px) rotate(180deg) scale(0.9); }
}

@keyframes agFloat2 {
	0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
	50% { transform: translate(30px, -25px) rotate(45deg) scale(0.85); }
}

@keyframes agFloat3 {
	0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
	50% { transform: translate(-25px, -20px) rotate(144deg) scale(0.8); }
}

@keyframes agFloat4 {
	0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
	50% { transform: translate(-30px, 20px) rotate(126deg) scale(1.1); }
}

@keyframes agFloat5 {
	0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
	50% { transform: translate(15px, 25px) rotate(90deg) scale(1.2); }
}

@media (max-width: 768px) {
	body[data-path="login"] .for-login { padding: 36px 24px 32px; border-radius: 16px; }
	body[data-path="login"] .ag-shape-1,
	body[data-path="login"] .ag-shape-2 { width: 250px; height: 250px; }
	body[data-path="login"] .ag-shape-3 { width: 180px; height: 180px; }
	body[data-path="login"] .ag-shape-4 { width: 140px; height: 140px; }
	body[data-path="login"] .ag-shape-5 { width: 120px; height: 120px; }
}

@media (max-width: 480px) {
	body[data-path="login"] .for-login { padding: 28px 20px 26px; }
	body[data-path="login"] .ag-shape-4,
	body[data-path="login"] .ag-shape-5 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	body[data-path="login"] *,
	body[data-path="login"] .for-login::after {
		animation: none !important;
		transition: none !important;
	}
}
