html.ecovg-auth-modal-open,
body.ecovg-auth-modal-open {
	overflow: hidden !important;
}

.ecovg-auth-modal,
.ecovg-auth-modal * {
	box-sizing: border-box;
}

.ecovg-auth-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: inherit;
}

.ecovg-auth-modal.is-open {
	display: flex;
}

.ecovg-auth-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 14, 30, 0.72);
	backdrop-filter: blur(4px);
}

.ecovg-auth-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 24px 70px rgba(0, 27, 73, 0.28);
	animation: ecovgAuthPopupIn 0.2s ease-out;
}

@keyframes ecovgAuthPopupIn {

	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.ecovg-auth-brand-line {
	height: 6px;
	background: linear-gradient(
		90deg,
		#003c97 0%,
		#003c97 62%,
		#e80c93 62%,
		#e80c93 100%
	);
}

.ecovg-auth-modal__close {
	position: absolute;
	top: 17px;
	right: 17px;
	z-index: 2;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f3f6fb;
	color: #172033;
	font-size: 27px;
	line-height: 1;
	cursor: pointer;
}

.ecovg-auth-modal__close:hover,
.ecovg-auth-modal__close:focus {
	background: #e8eef8;
	outline: none;
}

.ecovg-auth-modal__body {
	padding: 40px;
}

.ecovg-auth-step {
	display: none;
}

.ecovg-auth-step.is-active {
	display: block;
}

.ecovg-auth-step h2 {
	margin: 0 48px 10px 0;
	color: #10213d;
	font-size: 28px;
	line-height: 1.25;
	font-weight: 700;
}

.ecovg-auth-step > p {
	margin: 0 0 26px;
	color: #5b6472;
	font-size: 14px;
	line-height: 1.6;
}

.ecovg-auth-step form {
	margin: 0;
}

.ecovg-auth-step label {
	display: block;
	margin: 0 0 8px;
	color: #1f2937;
	font-size: 14px;
	font-weight: 600;
}

.ecovg-auth-step input {
	width: 100%;
	height: 52px;
	margin: 0 0 18px;
	padding: 0 15px;
	border: 1px solid #cfd8e6;
	border-radius: 10px;
	background: #ffffff;
	color: #182235;
	font-family: inherit;
	font-size: 15px;
	outline: none;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.ecovg-auth-step input:focus {
	border-color: #003c97;
	box-shadow: 0 0 0 3px rgba(0, 60, 151, 0.1);
}

.ecovg-auth-step input[readonly] {
	background: #f4f7fb;
	color: #536074;
}

/**
 * Password field wrapper.
 */
.ecovg-auth-password-field {
	position: relative;
	width: 100%;
	margin: 0 0 18px;
}

.ecovg-auth-password-field input {
	margin-bottom: 0;
	padding-right: 52px;
}

/**
 * Password eye button.
 */
.ecovg-auth-password-toggle {
	position: absolute;
	top: 50%;
	right: 12px;
	width: 36px;
	height: 36px;
	padding: 7px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #64748b;
	transform: translateY(-50%);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ecovg-auth-password-toggle:hover,
.ecovg-auth-password-toggle:focus {
	background: #f1f5f9;
	color: #003c97;
	outline: none;
}

.ecovg-auth-password-toggle svg {
	width: 21px;
	height: 21px;
	fill: currentColor;
}

.ecovg-auth-password-toggle .ecovg-eye-hide {
	display: none;
}

.ecovg-auth-password-toggle.is-visible .ecovg-eye-show {
	display: none;
}

.ecovg-auth-password-toggle.is-visible .ecovg-eye-hide {
	display: block;
}

.ecovg-auth-primary-btn,
.ecovg-auth-secondary-btn {
	min-height: 50px;
	padding: 0 22px;
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.ecovg-auth-primary-btn {
	width: 100%;
	border: 1px solid #003c97;
	background: #003c97;
	color: #ffffff;
}

.ecovg-auth-primary-btn:hover,
.ecovg-auth-primary-btn:focus {
	border-color: #e80c93;
	background: #e80c93;
	color: #ffffff;
	outline: none;
}

.ecovg-auth-secondary-btn {
	border: 1px solid #ccd6e5;
	background: #ffffff;
	color: #003c97;
}

.ecovg-auth-secondary-btn:hover,
.ecovg-auth-secondary-btn:focus {
	border-color: #003c97;
	background: #f3f7fd;
	outline: none;
}

.ecovg-auth-actions-row {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 12px;
	align-items: center;
	margin-top: 4px;
}

.ecovg-auth-actions-row .ecovg-auth-primary-btn {
	width: 100%;
}

.ecovg-auth-message {
	display: none;
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: 9px;
	font-size: 13px;
	line-height: 1.5;
}

.ecovg-auth-message.is-visible {
	display: block;
}

.ecovg-auth-message.is-error {
	border: 1px solid #f1b5bd;
	background: #fff2f4;
	color: #9b1c31;
}

.ecovg-auth-message.is-success {
	border: 1px solid #9ed8b3;
	background: #edf9f1;
	color: #17693a;
}

.ecovg-auth-step form.is-loading {
	opacity: 0.72;
	pointer-events: none;
}

.ecovg-auth-step button:disabled,
.ecovg-auth-step input:disabled {
	cursor: wait;
}

@media (max-width: 600px) {

	.ecovg-auth-modal {
		padding: 14px;
		align-items: flex-start;
		padding-top: 40px;
	}

	.ecovg-auth-modal__dialog {
		max-height: calc(100vh - 54px);
		border-radius: 16px;
	}

	.ecovg-auth-modal__body {
		padding: 30px 22px 24px;
	}

	.ecovg-auth-step h2 {
		font-size: 24px;
	}

	.ecovg-auth-actions-row {
		grid-template-columns: 1fr;
	}

	.ecovg-auth-secondary-btn {
		order: 2;
	}
}