/* =========================================================
   IKYBOY AUTH PAGES DESIGN (LOGIN, REGISTER, PASSWORD RESET)
   Non-destructive styling preserving 100% OJS 3.5 security,
   CSRF tokens, reCAPTCHA, ORCID OAuth & validation hooks
   ========================================================= */
.page_login,
.page_register,
.page_lost_password,
.page_reset_password {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.page_login .cmp_breadcrumbs,
.page_register .cmp_breadcrumbs,
.page_lost_password .cmp_breadcrumbs,
.page_reset_password .cmp_breadcrumbs {
	margin: 0 0 0.25rem !important;
	padding: 0 0 0.75rem !important;
	border-bottom: 1px solid var(--ib-border, #e2e8f0) !important;
	font-size: 0.82rem !important;
}

.page_login .cmp_breadcrumbs a,
.page_register .cmp_breadcrumbs a,
.page_lost_password .cmp_breadcrumbs a,
.page_reset_password .cmp_breadcrumbs a {
	color: #0284c7 !important;
	font-weight: 600 !important;
	text-decoration: none !important;
}

.page_login .cmp_breadcrumbs a:hover,
.page_register .cmp_breadcrumbs a:hover,
.page_lost_password .cmp_breadcrumbs a:hover,
.page_reset_password .cmp_breadcrumbs a:hover {
	text-decoration: underline !important;
}

.ib_auth_banner {
	position: relative;
	border-radius: 16px;
	padding: 1.6rem 1.8rem;
	background: radial-gradient(circle at 86% 24%, rgba(56, 189, 248, 0.28), transparent 46%),
		linear-gradient(135deg, #0b162d 0%, #132852 55%, #0d1d3a 100%);
	color: #f8fafc;
	overflow: hidden;
	box-shadow: 0 18px 38px -20px rgba(15, 23, 42, 0.55);
}

.ib_auth_banner_badge {
	display: inline-flex;
	align-items: center;
	gap: 0.42rem;
	padding: 0.26rem 0.78rem;
	border-radius: 999px;
	background: rgba(56, 189, 248, 0.16);
	border: 1px solid rgba(56, 189, 248, 0.42);
	color: #bae6fd;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 0.7rem;
}

.ib_auth_banner h1 {
	margin: 0 0 0.4rem !important;
	font-size: clamp(1.45rem, 2.3vw, 1.9rem) !important;
	font-weight: 800 !important;
	line-height: 1.22 !important;
	color: #ffffff !important;
}

.ib_auth_banner_sub {
	margin: 0 !important;
	font-size: 0.89rem;
	line-height: 1.6;
	color: #cbd5e1;
	max-width: 60ch;
}

.page_login > p.required,
.page_register > p.required,
.page_login .cmp_form > p:first-of-type,
.page_register .cmp_form > p:first-of-type,
.ib_auth_req_note {
	font-size: 0.82rem !important;
	color: var(--ib-muted, #64748b) !important;
	margin: 0 0 0.25rem !important;
}

.page_login .pkp_form_error,
.page_register .pkp_form_error,
.page_lost_password .pkp_form_error,
.page_login .cmp_form_error,
.page_register .cmp_form_error,
.page_lost_password .cmp_form_error {
	background: rgba(239, 68, 68, 0.08) !important;
	border: 1px solid rgba(239, 68, 68, 0.36) !important;
	border-left: 4px solid #dc2626 !important;
	border-radius: 10px !important;
	padding: 0.85rem 1.05rem !important;
	color: #b91c1c !important;
	font-size: 0.86rem !important;
	font-weight: 600 !important;
	margin-bottom: 1rem !important;
}

.page_login .cmp_notification,
.page_register .cmp_notification,
.page_lost_password .cmp_notification {
	background: rgba(2, 132, 199, 0.08) !important;
	border: 1px solid rgba(2, 132, 199, 0.3) !important;
	border-left: 4px solid #0284c7 !important;
	border-radius: 10px !important;
	padding: 0.9rem 1.1rem !important;
	color: var(--ib-text, #0f172a) !important;
	font-size: 0.88rem !important;
}

/* LOGIN & LOST PASSWORD CARD */
.page_login form.cmp_form,
.page_lost_password form.cmp_form,
.page_reset_password form.cmp_form {
	width: 100% !important;
	max-width: 540px !important;
	margin: 0.35rem auto 0.5rem !important;
	background: var(--ib-surface, #ffffff) !important;
	border: 1px solid var(--ib-border, #e2e8f0) !important;
	border-top: 4px solid #0284c7 !important;
	border-radius: 16px !important;
	padding: 1.75rem 1.85rem !important;
	box-shadow: 0 16px 36px -20px rgba(15, 23, 42, 0.22) !important;
	box-sizing: border-box !important;
}

.page_login form.cmp_form fieldset,
.page_lost_password form.cmp_form fieldset,
.page_reset_password form.cmp_form fieldset {
	border: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.page_login form.cmp_form .fields > div,
.page_lost_password form.cmp_form .fields > div,
.page_reset_password form.cmp_form .fields > div {
	margin-bottom: 1.1rem !important;
	padding: 0 !important;
}

/* REGISTER MODULAR SECTION CARDS + 2-COLUMN GRID */
.page_register form.cmp_form {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
}

.page_register form.cmp_form fieldset {
	background: var(--ib-surface, #ffffff) !important;
	border: 1px solid var(--ib-border, #e2e8f0) !important;
	border-left: 4px solid #0284c7 !important;
	border-radius: 14px !important;
	padding: 1.35rem 1.5rem 1.45rem !important;
	margin: 0 !important;
	box-shadow: 0 10px 26px -16px rgba(15, 23, 42, 0.14) !important;
	box-sizing: border-box !important;
}

.page_register form.cmp_form fieldset.login {
	border-left-color: #4f46e5 !important;
}

.page_register form.cmp_form fieldset.consent,
.page_register form.cmp_form fieldset.reviewer_nocontext_interests {
	border-left-color: #15803d !important;
}

.page_register form.cmp_form fieldset > legend {
	display: block !important;
	width: 100% !important;
	float: left !important;
	margin: 0 0 1.05rem !important;
	padding: 0 0 0.65rem !important;
	border-bottom: 2px solid rgba(2, 132, 199, 0.12) !important;
	font-size: 1rem !important;
	font-weight: 800 !important;
	letter-spacing: -0.01em;
	color: var(--ib-text, #0f172a) !important;
}

.page_register form.cmp_form fieldset > legend + * {
	clear: both;
}

.page_register form.cmp_form fieldset.identity .fields,
.page_register form.cmp_form fieldset.login .fields {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 1rem 1.15rem !important;
	clear: both;
}

.page_register form.cmp_form fieldset.identity .fields > div,
.page_register form.cmp_form fieldset.login .fields > div {
	margin: 0 !important;
	padding: 0 !important;
	min-width: 0;
}

/* UNIFIED LABELS, INPUTS & SELECTS */
.page_login form.cmp_form label,
.page_register form.cmp_form label,
.page_lost_password form.cmp_form label,
.page_reset_password form.cmp_form label {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
}

.page_login form.cmp_form .label,
.page_register form.cmp_form .label,
.page_lost_password form.cmp_form .label,
.page_reset_password form.cmp_form .label {
	display: block !important;
	font-size: 0.83rem !important;
	font-weight: 700 !important;
	font-style: normal !important;
	color: var(--ib-text, #1e293b) !important;
	margin-bottom: 0.4rem !important;
	line-height: 1.35 !important;
}

.page_login form.cmp_form .required,
.page_register form.cmp_form .required,
.page_lost_password form.cmp_form .required {
	color: #dc2626 !important;
	font-weight: 800 !important;
}

.page_login form.cmp_form input[type="text"],
.page_login form.cmp_form input[type="email"],
.page_login form.cmp_form input[type="password"],
.page_register form.cmp_form input[type="text"],
.page_register form.cmp_form input[type="email"],
.page_register form.cmp_form input[type="password"],
.page_register form.cmp_form select,
.page_lost_password form.cmp_form input[type="text"],
.page_lost_password form.cmp_form input[type="email"],
.page_reset_password form.cmp_form input[type="password"] {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 44px !important;
	padding: 0.55rem 0.9rem !important;
	border-radius: 10px !important;
	border: 1.5px solid #cbd5e1 !important;
	background: var(--ib-bg, #f8fafc) !important;
	color: var(--ib-text, #0f172a) !important;
	font-size: 0.92rem !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	box-sizing: border-box !important;
	box-shadow: none !important;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
}

.page_login form.cmp_form input:hover,
.page_register form.cmp_form input:hover,
.page_register form.cmp_form select:hover,
.page_lost_password form.cmp_form input:hover {
	border-color: #94a3b8 !important;
}

.page_login form.cmp_form input:focus,
.page_register form.cmp_form input:focus,
.page_register form.cmp_form select:focus,
.page_lost_password form.cmp_form input:focus,
.page_reset_password form.cmp_form input:focus {
	outline: none !important;
	background: var(--ib-surface, #ffffff) !important;
	border-color: #0284c7 !important;
	box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.16) !important;
}

.ib_pw_wrap {
	position: relative;
	display: block;
	width: 100%;
}

.ib_pw_wrap input[type="password"],
.ib_pw_wrap input[type="text"] {
	padding-right: 2.85rem !important;
}

.ib_pw_toggle {
	position: absolute;
	top: 50%;
	right: 0.55rem;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	padding: 0;
	transition: background 0.16s ease, color 0.16s ease;
}

.ib_pw_toggle:hover {
	background: rgba(2, 132, 199, 0.1);
	color: #0284c7;
}

.ib_pw_meter {
	margin-top: 0.45rem;
}

.ib_pw_meter_track {
	width: 100%;
	height: 5px;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.25);
	overflow: hidden;
}

.ib_pw_meter_fill {
	width: 0%;
	height: 100%;
	border-radius: 999px;
	transition: width 0.22s ease, background 0.22s ease;
}

.ib_pw_meter_txt {
	margin-top: 0.25rem;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--ib-muted, #64748b);
}

.page_login form.cmp_form .password a {
	display: inline-block !important;
	margin-top: 0.45rem !important;
	font-size: 0.8rem !important;
	font-weight: 700 !important;
	color: #0284c7 !important;
	text-decoration: none !important;
}

.page_login form.cmp_form .password a:hover {
	text-decoration: underline !important;
}

.page_login form.cmp_form .checkbox,
.page_register form.cmp_form fieldset.consent .fields > div,
.page_register form.cmp_form .optin,
.page_register form.cmp_form .privacy,
.page_register form.cmp_form .reviewer {
	margin-bottom: 0.65rem !important;
}

.page_login form.cmp_form .checkbox label,
.page_register form.cmp_form fieldset.consent label,
.page_register form.cmp_form .reviewer_interests label {
	display: flex !important;
	align-items: flex-start !important;
	gap: 0.65rem !important;
	padding: 0.75rem 0.9rem !important;
	border-radius: 10px !important;
	background: var(--ib-bg, #f8fafc) !important;
	border: 1px solid var(--ib-border, #e2e8f0) !important;
	cursor: pointer !important;
	font-size: 0.86rem !important;
	line-height: 1.5 !important;
	color: var(--ib-text, #1e293b) !important;
	transition: border-color 0.18s ease, background 0.18s ease !important;
}

.page_login form.cmp_form .checkbox label:hover,
.page_register form.cmp_form fieldset.consent label:hover {
	border-color: #0284c7 !important;
	background: rgba(2, 132, 199, 0.04) !important;
}

.page_login form.cmp_form .checkbox input[type="checkbox"],
.page_register form.cmp_form fieldset.consent input[type="checkbox"] {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	margin: 2px 0 0 !important;
	accent-color: #0284c7;
	cursor: pointer;
}

.page_login form.cmp_form .checkbox .label,
.page_register form.cmp_form fieldset.consent .label {
	display: inline !important;
	margin: 0 !important;
	font-weight: 500 !important;
	font-size: 0.86rem !important;
	color: inherit !important;
}

.page_register form.cmp_form fieldset.consent label a {
	color: #0284c7 !important;
	font-weight: 700 !important;
	text-decoration: underline !important;
}

.page_login form.cmp_form .buttons,
.page_register form.cmp_form .buttons,
.page_lost_password form.cmp_form .buttons,
.page_reset_password form.cmp_form .buttons {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	flex-wrap: wrap !important;
	gap: 0.75rem !important;
	margin-top: 1.25rem !important;
	padding-top: 1.15rem !important;
	border-top: 1px solid var(--ib-border, #e2e8f0) !important;
}

.page_login form.cmp_form .buttons button.submit,
.page_register form.cmp_form .buttons button.submit,
.page_lost_password form.cmp_form .buttons button.submit,
.page_reset_password form.cmp_form .buttons button.submit {
	order: 2;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.45rem !important;
	min-width: 155px !important;
	height: 44px !important;
	padding: 0 1.45rem !important;
	border-radius: 10px !important;
	border: none !important;
	background: linear-gradient(90deg, #0369a1 0%, #2563eb 100%) !important;
	color: #ffffff !important;
	font-size: 0.88rem !important;
	font-weight: 800 !important;
	letter-spacing: 0.03em !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	box-shadow: 0 10px 24px -10px rgba(37, 99, 235, 0.72) !important;
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}

.page_login form.cmp_form .buttons button.submit:hover,
.page_register form.cmp_form .buttons button.submit:hover,
.page_lost_password form.cmp_form .buttons button.submit:hover,
.page_reset_password form.cmp_form .buttons button.submit:hover {
	transform: translateY(-2px) !important;
	filter: brightness(1.07) !important;
	box-shadow: 0 14px 28px -10px rgba(37, 99, 235, 0.85) !important;
}

.page_login form.cmp_form .buttons a,
.page_register form.cmp_form .buttons a,
.page_lost_password form.cmp_form .buttons a {
	order: 1;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	height: 44px !important;
	padding: 0 1.15rem !important;
	border-radius: 10px !important;
	border: 1.5px solid var(--ib-border, #cbd5e1) !important;
	background: var(--ib-bg, #f8fafc) !important;
	color: var(--ib-text, #1e293b) !important;
	font-size: 0.85rem !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	margin: 0 !important;
	transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease !important;
}

.page_login form.cmp_form .buttons a:hover,
.page_register form.cmp_form .buttons a:hover,
.page_lost_password form.cmp_form .buttons a:hover {
	border-color: #0284c7 !important;
	background: rgba(2, 132, 199, 0.08) !important;
	color: #0369a1 !important;
}

/* DARK MODE FULL CONTRAST SUPPORT */
:root[data-theme="dark"] .page_login form.cmp_form,
:root[data-theme="dark"] .page_lost_password form.cmp_form,
:root[data-theme="dark"] .page_reset_password form.cmp_form,
:root[data-theme="dark"] .page_register form.cmp_form fieldset {
	background: #0f172a !important;
	border-color: rgba(148, 163, 184, 0.22) !important;
}

:root[data-theme="dark"] .page_login form.cmp_form {
	border-top-color: #38bdf8 !important;
}

:root[data-theme="dark"] .page_register form.cmp_form fieldset {
	border-left-color: #38bdf8 !important;
}

:root[data-theme="dark"] .page_register form.cmp_form fieldset.login {
	border-left-color: #818cf8 !important;
}

:root[data-theme="dark"] .page_register form.cmp_form fieldset.consent,
:root[data-theme="dark"] .page_register form.cmp_form fieldset.reviewer_nocontext_interests {
	border-left-color: #22c55e !important;
}

:root[data-theme="dark"] .page_register form.cmp_form fieldset > legend,
:root[data-theme="dark"] .page_login form.cmp_form .label,
:root[data-theme="dark"] .page_register form.cmp_form .label,
:root[data-theme="dark"] .page_lost_password form.cmp_form .label,
:root[data-theme="dark"] .page_login form.cmp_form .checkbox label,
:root[data-theme="dark"] .page_register form.cmp_form fieldset.consent label {
	color: #f1f5f9 !important;
}

:root[data-theme="dark"] .page_login form.cmp_form input[type="text"],
:root[data-theme="dark"] .page_login form.cmp_form input[type="email"],
:root[data-theme="dark"] .page_login form.cmp_form input[type="password"],
:root[data-theme="dark"] .page_register form.cmp_form input[type="text"],
:root[data-theme="dark"] .page_register form.cmp_form input[type="email"],
:root[data-theme="dark"] .page_register form.cmp_form input[type="password"],
:root[data-theme="dark"] .page_register form.cmp_form select,
:root[data-theme="dark"] .page_lost_password form.cmp_form input[type="text"],
:root[data-theme="dark"] .page_lost_password form.cmp_form input[type="email"],
:root[data-theme="dark"] .page_reset_password form.cmp_form input[type="password"] {
	background: #131e33 !important;
	border-color: rgba(148, 163, 184, 0.3) !important;
	color: #f8fafc !important;
}

:root[data-theme="dark"] .page_login form.cmp_form input:focus,
:root[data-theme="dark"] .page_register form.cmp_form input:focus,
:root[data-theme="dark"] .page_register form.cmp_form select:focus,
:root[data-theme="dark"] .page_lost_password form.cmp_form input:focus {
	background: #0b1324 !important;
	border-color: #38bdf8 !important;
	box-shadow: 0 0 0 3.5px rgba(56, 189, 248, 0.2) !important;
}

:root[data-theme="dark"] .page_login form.cmp_form .checkbox label,
:root[data-theme="dark"] .page_register form.cmp_form fieldset.consent label,
:root[data-theme="dark"] .page_login form.cmp_form .buttons a,
:root[data-theme="dark"] .page_register form.cmp_form .buttons a,
:root[data-theme="dark"] .page_lost_password form.cmp_form .buttons a {
	background: #131e33 !important;
	border-color: rgba(148, 163, 184, 0.28) !important;
	color: #e2e8f0 !important;
}

:root[data-theme="dark"] .page_login form.cmp_form .buttons a:hover,
:root[data-theme="dark"] .page_register form.cmp_form .buttons a:hover,
:root[data-theme="dark"] .page_lost_password form.cmp_form .buttons a:hover {
	border-color: #38bdf8 !important;
	color: #7dd3fc !important;
}

:root[data-theme="dark"] .page_login .cmp_breadcrumbs a,
:root[data-theme="dark"] .page_register .cmp_breadcrumbs a,
:root[data-theme="dark"] .page_lost_password .cmp_breadcrumbs a,
:root[data-theme="dark"] .page_login form.cmp_form .password a,
:root[data-theme="dark"] .page_register form.cmp_form fieldset.consent label a {
	color: #38bdf8 !important;
}

:root[data-theme="dark"] .ib_pw_toggle {
	color: #94a3b8;
}

:root[data-theme="dark"] .ib_pw_toggle:hover {
	color: #38bdf8;
	background: rgba(56, 189, 248, 0.14);
}

:root[data-theme="dark"] .page_login .pkp_form_error,
:root[data-theme="dark"] .page_register .pkp_form_error,
:root[data-theme="dark"] .page_login .cmp_form_error,
:root[data-theme="dark"] .page_register .cmp_form_error {
	background: rgba(239, 68, 68, 0.16) !important;
	color: #fecaca !important;
}

@media (max-width: 720px) {
	.page_register form.cmp_form fieldset.identity .fields,
	.page_register form.cmp_form fieldset.login .fields {
		grid-template-columns: 1fr !important;
	}
	.page_login form.cmp_form,
	.page_lost_password form.cmp_form,
	.page_register form.cmp_form fieldset {
		padding: 1.25rem 1.15rem !important;
	}
	.ib_auth_banner {
		padding: 1.3rem 1.25rem;
	}
	.page_login form.cmp_form .buttons,
	.page_register form.cmp_form .buttons {
		flex-direction: column-reverse !important;
		align-items: stretch !important;
	}
	.page_login form.cmp_form .buttons button.submit,
	.page_register form.cmp_form .buttons button.submit,
	.page_login form.cmp_form .buttons a,
	.page_register form.cmp_form .buttons a {
		width: 100% !important;
	}
}
