@font-face {
	font-family: 'TT Commons';
	src: url('/platform/uni_client@websoft/web/uc/fonts/TT_Commons_Classic/TT_Commons_Classic_Regular.woff2') format('woff2'),
		url('/platform/uni_client@websoft/web/uc/fonts/TT_Commons_Classic/TT_Commons_Classic_Regular.woff') format('woff');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'TT Commons';
	src: url('/platform/uni_client@websoft/web/uc/fonts/TT_Commons_Classic/TT_Commons_Classic_Regular.woff2') format('woff2'),
		url('/platform/uni_client@websoft/web/uc/fonts/TT_Commons_Classic/TT_Commons_Classic_Medium.woff2') format('woff2'),
		url('/platform/uni_client@websoft/web/uc/fonts/TT_Commons_Classic/TT_Commons_Classic_Regular.woff') format('woff');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

/* --- База --- */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: 'TT Commons', sans-serif;
	background-color: #E1EBF080;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
	padding: 1rem;
}

.login-container {
	background: #fff;
	padding: 2rem;
	border-radius: 12px;
	max-width: 400px;
	width: 100%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.logo {
	text-align: center;
	margin-bottom: 1.5rem;
}

.logo img {
	height: 32px;
}

h1 {
	font-size: 20px;
	font-weight: 600;
	text-align: center;
	margin-bottom: 0.25rem;
}

p.subtitle {
	font-size: 14px;
	text-align: center;
	color: #666;
	margin-bottom: 2rem;
}

/* --- Общие элементы --- */
.def_auth--input-title {
	color: #A6ACAE;
	font-size: 14px;
	display: block;
	margin-bottom: 4px;
	font-weight: 400;
}

.def_auth--input-title .required {
	color: #ff4d4d;
	margin-left: 2px;
}

.def_auth--link-wrapper {
	display: flex;
	height: 30px;
}

.def_auth--link {
	font-size: 16px;
	color: #5875FF;
	margin: auto;
	cursor: pointer;
	text-decoration: underline;
	/* Кнопки-«ссылки» (<button>) — убираем нативную кнопочную обёртку браузера */
	border: none;
	background: none;
	font-family: inherit;
}

.error-message {
	display: none;
	text-align: center;
	color: #ff4d4d;
	font-size: 14px;
	margin-top: 1rem;
}

/* --- Экран успеха --- */
.success-message {
	display: none;
	text-align: center;
	padding: 1rem 0;
}

.success-message .success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: #e6f7ec;
	display: flex;
	align-items: center;
	justify-content: center;
}

.success-message .success-icon svg {
	width: 28px;
	height: 28px;
	stroke: #0ec029;
}

.success-message .success-text {
	font-size: 18px;
	font-weight: 600;
	color: #1a1a1a;
	margin-bottom: 0.5rem;
}

.success-message .success-subtext {
	font-size: 14px;
	color: #666;
	margin-bottom: 1.5rem;
}

.btn-login {
	display: inline-block;
	padding: 0.75rem 3rem;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 600;
	background-color: #5875FF;
	color: white;
	border: none;
	cursor: pointer;
	text-decoration: none;
	font-family: 'TT Commons', sans-serif;
}

.btn-login:hover {
	background-color: #5875FFCC;
}

#view-login .def_auth--button {
	width: 100%;
	padding: 0.75rem;
	background-color: #5875FF;
	color: #fff;
	font-weight: 600;
	border: none;
	border-radius: 100px;
	font-size: 14px;
	cursor: pointer;
}

#view-login .def_auth--button:hover {
	background-color: #5875FFCC;
}

.def_auth--button:disabled {
	background-color: #CADADE;
	color: white;
	cursor: auto;
}

#view-login input[type="text"],
#view-login input[type="password"] {
	width: 100%;
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border: 1px solid #CADADE;
	border-radius: 12px;
	font-size: 14px;
	transition: border-color 0.3s ease;
}

#view-login input[type="text"]:hover,
#view-login input[type="password"]:hover,
#view-login input[type="text"]:focus,
#view-login input[type="password"]:focus {
	border-color: #5875FF;
	outline: none;
}

#view-login input.field-invalid,
#view-login input.field-invalid:focus {
	border-color: #ff4d4d;
}

.def_auth--input-wrapper {
	position: relative;
	margin-bottom: 1rem;
}

#view-login .def_auth--input-wrapper input {
	padding-right: 40px;
	margin-bottom: 0;
}

#def_auth--input-security_button {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
	border-radius: 4px;
	transition: background 0.2s;
}

/* --- Вид: сброс (reset) --- */
#view-reset input[type="text"] {
	width: 100%;
	padding: 0.75rem 1rem;
	margin: 1rem 0;
	border: 1px solid #CADADE;
	border-radius: 12px;
	font-size: 14px;
	transition: border-color 0.3s ease;
}

#view-reset input[type="text"]:hover,
#view-reset input[type="text"]:focus {
	border-color: #5875FF;
	outline: none;
}

.btn-save {
	display: block;
	width: 100%;
	padding: 0.75rem;
	border-radius: 100px;
	font-size: 14px;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.2s;
	border: none;
	background-color: #5875FF;
	color: white;
	margin-bottom: 0.75rem;
}

.btn-save:hover:not(:disabled) {
	background-color: #5875FFCC;
}

.btn-save:disabled {
	background-color: #CADADE;
	color: white;
	cursor: auto;
}

/* --- Вид: подтверждение (confirm) --- */
.password-wrapper {
	display: flex;
	align-items: center;
	margin-bottom: 1.2rem;
	border: 1px solid #CADADE;
	border-radius: 12px;
	transition: border-color 0.3s ease;
	background: #fff;
	overflow: hidden;
}

.password-wrapper:focus-within,
.password-wrapper:hover {
	border-color: #5875FF;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
	flex: 1;
	padding: 0.75rem 0 0.75rem 1rem;
	border: none;
	border-radius: 0;
	font-size: 14px;
	outline: none;
	background: transparent;
	min-width: 0;
}

.password-wrapper input.mismatch {
	border: none;
	background-color: #fffafa;
}

.password-wrapper:has(input.mismatch) {
	border-color: #ff4d4d;
}

.def_auth--security-btn {
	flex-shrink: 0;
	padding: 0 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
}

.criteria-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem 0;
	display: block;
}

.criterion {
	font-size: 13px;
	color: #A6ACAE;
	display: flex;
	align-items: center;
	margin-bottom: 4px;
}

.criterion::before {
	margin-right: 6px;
}

.criterion.valid {
	color: #2ecc71;
}

.criterion.valid::before {
	content: "\2713";
}

.criterion:not(.valid)::before {
	content: "\25CB";
}

.btn-cancel {
	display: block;
	text-align: center;
	font-size: 14px;
	color: #5875FF;
	cursor: pointer;
	text-decoration: none;
	background: none;
	border: none;
	width: 100%;
	font-family: 'TT Commons', sans-serif;
	font-weight: 600;
}

.btn-cancel:hover {
	text-decoration: underline;
}
