/**
 * Главная партнёрского портала — блок по центру экрана (без левого сайдбара).
 */

.bap-partner-landing {
	--bap-brand: #003366;
	--bap-gold: #ffcc00;
	--bap-font: "Montserrat", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--bap-text: #1a1a1a;
	--bap-muted: #919191;
	--bap-line: #e8e8e8;
	--bap-field-border: #7a8291;
	--bap-field-bg: #ffffff;
	--bap-card-pad-x: 1.25rem;
	/* Շատ նուրբ զարդանախշ (հաղորդակցական) + soft gradient */
	--bap-landing-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23003366' stroke-width='0.35' opacity='0.05'%3E%3Cpath d='M50 5v90M5 50h90'/%3E%3Ccircle cx='50' cy='50' r='16'/%3E%3Cpath d='M18 18l64 64M82 18L18 82'/%3E%3C/g%3E%3C/svg%3E");
	margin: 0;
	min-height: 100vh;
	font-family: var(--bap-font);
	color: var(--bap-text);
	background-color: #e8eef6;
	background-image:
		linear-gradient(168deg, rgba(255, 255, 255, 0.72) 0%, rgba(232, 238, 246, 0) 38%, rgba(220, 230, 242, 0.5) 100%),
		var(--bap-landing-texture);
	background-size: 100% 100%, 380px 380px;
	background-attachment: fixed;
}

@media (min-width: 480px) {
	.bap-partner-landing {
		--bap-card-pad-x: 1.75rem;
	}
}

.bap-landing-shell {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Центральная колонка */
.bap-landing-centered {
	flex: 1;
	width: 100%;
	max-width: 520px;
	margin: 0 auto;
	padding: 1.35rem 1.25rem 2.5rem;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

@media (min-width: 600px) {
	.bap-landing-centered {
		padding-top: 1.75rem;
		padding-bottom: 3rem;
	}
}

/* Полоса шапки: логотип слева, подпись рядом; контент по той же оси, что и карточка */
.bap-landing-head {
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid rgba(0, 51, 102, 0.08);
	background: rgba(255, 255, 255, 0.42);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.bap-landing-head__inner {
	box-sizing: border-box;
	width: 100%;
	max-width: 520px;
	margin: 0 auto;
	padding: 0.85rem 1.25rem;
}

.bap-landing-head__brand {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 0.75rem 1rem;
	margin: 0 0 0 0.55rem;
	padding: 0;
	box-sizing: border-box;
}

.bap-landing-head__brand--has-logo .bap-landing-head__portal {
	padding-left: 1rem;
	margin-left: 0;
	border-left: 1px solid rgba(0, 51, 102, 0.14);
}

.bap-landing-head__portal {
	margin: 0;
	font-size: clamp(1.02rem, 2.6vw, 1.22rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--bap-brand);
	letter-spacing: -0.01em;
	text-align: left;
	max-width: 100%;
}

.bap-landing-head__logo-link {
	display: inline-block;
	line-height: 0;
	flex-shrink: 0;
	text-decoration: none;
	color: inherit;
	border-radius: 4px;
}

.bap-landing-head__logo-link:focus-visible {
	outline: 2px solid var(--bap-gold);
	outline-offset: 2px;
}

.bap-landing-head__logo-link:hover .bap-landing-head__logo {
	opacity: 0.9;
}

.bap-landing-head__logo {
	display: block;
	margin: 0;
	max-width: 200px;
	width: auto;
	height: auto;
	max-height: 52px;
	object-fit: contain;
	flex-shrink: 0;
}

/* Карточка: мягкие углы, лёгкая тень, золотая полоса бренда сверху */
.bap-landing-card {
	background: #ffffff;
	border: 1px solid rgba(219, 228, 239, 0.95);
	border-top: 4px solid var(--bap-gold);
	border-radius: 22px;
	box-shadow:
		0 2px 18px rgba(0, 51, 102, 0.055),
		0 1px 3px rgba(0, 51, 102, 0.04);
	padding: 1.35rem var(--bap-card-pad-x) 1.5rem;
	box-sizing: border-box;
}

@media (min-width: 480px) {
	.bap-landing-card {
		padding: 1.5rem var(--bap-card-pad-x) 1.75rem;
	}
}

.bap-landing-card__title {
	margin: 0 0 0.85rem;
	font-size: clamp(1.15rem, 2.8vw, 1.4rem);
	font-weight: 400;
	color: var(--bap-muted);
	text-align: center;
}

.bap-landing-rule {
	height: 1px;
	background: var(--bap-line);
	margin: 0;
	border: 0;
}

.bap-landing-rule--spaced {
	margin: 1.5rem 0;
}

.bap-auth-wrap--landing {
	background: transparent;
	padding: 1.25rem 0 0;
	margin: 0;
}

.bap-auth--landing {
	max-width: 100%;
	margin: 0;
}

.bap-landing-section {
	margin: 0;
	padding: 0;
}

.bap-landing-section__h {
	margin: 0 0 0.75rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--bap-text);
}

.bap-form-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

/* gap задаёт интервал только между ячейками одной строки; между соседними .bap-form-row его не было */
.bap-form-row + .bap-form-row {
	margin-top: 1rem;
}

/*
 * Одно целое поле: один внешний контур (#7a8291), label сверху слева внутри,
 * ввод без отдельной «коробки» — как на втором референсе (без двойной рамки).
 */
.bap-field {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	background: var(--bap-field-bg);
	border: 2px solid var(--bap-field-border);
	border-radius: 8px;
	transition: border-color 0.15s;
	box-shadow: none;
	/* Срез углов от огромного inset-autofill: обрезаем содержимое по скруглению */
	overflow: hidden;
	isolation: isolate;
}

.bap-field:focus-within {
	border-color: var(--bap-gold);
	outline: none;
	box-shadow: none;
}

.bap-field__label {
	order: -1;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--bap-muted);
	padding: 0.28rem 0.7rem 0;
	line-height: 1.2;
	margin: 0;
	border: 0;
	box-shadow: none;
}

.bap-field__input {
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 0.08rem 0.7rem 0.5rem;
	font-family: var(--bap-font);
	/* Обычный вес; чуть крупнее базового 16px, без «жирного» набора */
	font-size: clamp(1.05rem, 2.35vw, 1.125rem);
	font-weight: 400;
	line-height: 1.4;
	color: var(--bap-brand);
	background: transparent;
	border: none;
	border-radius: 0;
	box-sizing: border-box;
	outline: none;
	outline-offset: 0;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.bap-field__input-wrap {
	position: relative;
	width: 100%;
	align-self: stretch;
}

.bap-field__input-wrap .bap-field__input {
	padding-right: 2.65rem;
}

.bap-password-toggle {
	position: absolute;
	right: 0.35rem;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: var(--bap-muted);
	cursor: pointer;
	line-height: 0;
}

.bap-password-toggle:hover {
	color: var(--bap-brand);
}

.bap-password-toggle:focus {
	outline: none;
}

.bap-password-toggle:focus-visible {
	outline: 2px solid var(--bap-gold);
	outline-offset: 2px;
}

.bap-password-toggle__icon {
	display: block;
	flex-shrink: 0;
}

/*
 * Внутренние «серые линии» / пунктир от фокуса чаще всего даёт не наш CSS, а:
 * глобальные стили темы (Astra/дочерняя), блоков WP (:focus-visible, box-shadow),
 * или правила .bap-auth input — они уже исключены для .bap-auth--landing, но
 * порядок enqueue может вернуть чужой outline. Ниже — жёсткий сброс только на лендинге.
 */
body.bap-partner-landing .bap-auth--landing .bap-field__input,
body.bap-partner-landing .bap-auth--landing .bap-field__input:hover,
body.bap-partner-landing .bap-auth--landing .bap-field__input:active {
	outline: 0 !important;
	outline-offset: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	font-size: clamp(1.05rem, 2.35vw, 1.125rem) !important;
	font-weight: 400 !important;
}

/* Фокус без autofill: убрать чужой ring; autofill ниже задаёт свой inset */
body.bap-partner-landing .bap-auth--landing .bap-field__input:focus,
body.bap-partner-landing .bap-auth--landing .bap-field__input:focus-visible {
	outline: 0 !important;
	outline-offset: 0 !important;
	border: 0 !important;
}

body.bap-partner-landing .bap-auth--landing .bap-field__input:focus:not(:-webkit-autofill) {
	box-shadow: none !important;
}

body.bap-partner-landing .bap-auth--landing .bap-field__input:-webkit-autofill,
body.bap-partner-landing .bap-auth--landing .bap-field__input:-webkit-autofill:hover,
body.bap-partner-landing .bap-auth--landing .bap-field__input:-webkit-autofill:focus,
body.bap-partner-landing .bap-auth--landing .bap-field__input:-webkit-autofill:focus-visible {
	-webkit-text-fill-color: var(--bap-brand);
	transition: background-color 99999s ease-out 0s;
	/* Большой inset закрашивает поле; родитель .bap-field с overflow:hidden обрезает по скруглению */
	box-shadow: inset 0 0 0 1000px #fff !important;
	border-radius: 6px !important;
}

.bap-field__input::placeholder {
	color: #b0b8c4;
	font-weight: 400;
}

/* Fallback autofill (специфичность ниже блока body… выше на лендинге) */
.bap-field__input:-webkit-autofill,
.bap-field__input:-webkit-autofill:hover,
.bap-field__input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--bap-brand);
	transition: background-color 99999s ease-out 0s;
	box-shadow: inset 0 0 0 1000px #fff;
	border-radius: 6px;
}

.bap-login-remember {
	margin: 1rem 0 0.5rem;
}

.bap-check {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.9rem;
	color: var(--bap-text);
	cursor: pointer;
}

.bap-check input {
	width: 1rem;
	height: 1rem;
	accent-color: var(--bap-brand);
}

.bap-login-actions {
	margin: 1.25rem 0 0;
	text-align: center;
}

/* Primary CTA — #003366, заметнее padding/вес; secondary — прозрачный фон, без «конкуренции» с входом */
.bap-btn-primary,
.bap-btn-outline {
	appearance: none;
	display: inline-block;
	width: auto;
	max-width: 100%;
	font-family: var(--bap-font);
	border-radius: 999px;
	cursor: pointer;
	box-sizing: border-box;
	vertical-align: middle;
	text-align: center;
	transition: filter 0.15s, box-shadow 0.15s, background 0.18s, color 0.18s, border-color 0.18s;
}

.bap-btn-primary {
	padding: 0.72rem 1.85rem;
	font-size: 1rem;
	font-weight: 700;
	color: #ffffff;
	background: #003366;
	border: 2px solid #003366;
	box-shadow: 0 3px 16px rgba(0, 51, 102, 0.28);
}

.bap-btn-primary:hover,
.bap-btn-primary:focus-visible {
	filter: brightness(1.06);
	box-shadow: 0 4px 20px rgba(0, 51, 102, 0.36);
}

.bap-btn-primary:active {
	filter: brightness(0.97);
}

.bap-btn-outline {
	padding: 0.58rem 1.45rem;
	font-size: 0.93rem;
	font-weight: 600;
	color: #003366;
	background: transparent;
	border: 2px solid #003366;
	box-shadow: none;
}

.bap-btn-outline:hover,
.bap-btn-outline:focus-visible {
	background: rgba(0, 51, 102, 0.05);
	color: #003366;
	border-color: #003366;
	filter: none;
	box-shadow: none;
}

.bap-btn-outline:active {
	background: rgba(0, 51, 102, 0.09);
}

.bap-auth__lost {
	margin: 1.25rem 0 0;
	padding-top: 1rem;
	text-align: center;
	font-size: 0.9rem;
	border-top: 1px solid var(--bap-line);
}

.bap-auth__lost a {
	color: #0d93fc;
	font-weight: 600;
	text-decoration: none;
}

.bap-auth__lost a:hover {
	text-decoration: underline;
}

.bap-auth__register-intro {
	text-align: center;
	margin: 0.25rem 0 0;
	padding: 0 0.25rem;
}

.bap-auth__register-intro-text {
	margin: 0 0 1rem;
	font-size: 0.95rem;
	color: #555;
	line-height: 1.5;
}

.bap-auth__reg-panel {
	margin-top: 0.5rem;
	padding-top: 0.75rem;
}

.bap-landing-footer {
	padding: 1rem 1.25rem;
	text-align: center;
	font-size: 0.8rem;
	color: var(--bap-muted);
	background: transparent;
}

.bap-landing-footer__copy {
	margin: 0;
}

.bap-auth--landing .bap-auth__alert {
	border-radius: 10px;
	margin-bottom: 1rem;
}
