/**
 * ACCESFY Auth Portal – modern login / register
 */

:root {
	--ap-bg: #050505;
	--ap-card: rgba(16, 16, 18, 0.92);
	--ap-border: rgba(255, 255, 255, 0.08);
	--ap-text: #ffffff;
	--ap-muted: #a1a1aa;
	--ap-gold: #c9a962;
	--ap-gold-soft: #e8d5a8;
	--ap-pink: #ff4da6;
	--ap-ease: cubic-bezier(0.4, 0, 0.2, 1);
	--ap-radius: 18px;
}

/* Fullscreen guest auth */
body.accesfy-auth-portal-page:not(.logged-in) {
	background: var(--ap-bg) !important;
}

body.accesfy-auth-portal--fullscreen:not(.logged-in) .site-header,
body.accesfy-auth-portal--fullscreen:not(.logged-in) #masthead,
body.accesfy-auth-portal--fullscreen:not(.logged-in) .elementor-location-header,
body.accesfy-auth-portal--fullscreen:not(.logged-in) .ct-header,
body.accesfy-auth-portal--fullscreen:not(.logged-in) .accesfy-hb-header,
body.accesfy-auth-portal--fullscreen:not(.logged-in) footer:not(.accesfy-hb-footer),
body.accesfy-auth-portal--fullscreen:not(.logged-in) .site-footer:not(.accesfy-hb-footer),
body.accesfy-auth-portal--fullscreen:not(.logged-in) .entry-header,
body.accesfy-auth-portal--fullscreen:not(.logged-in) .page-title {
	display: none !important;
}

body.accesfy-auth-portal-page:not(.logged-in) .woocommerce-account .woocommerce {
	max-width: none;
	margin: 0;
	padding: 0;
}

body.accesfy-auth-portal-page .woocommerce-notices-wrapper {
	max-width: 480px;
	margin: 0 auto 12px;
	padding: 0 16px;
}

/* Layout */
.accesfy-ap {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 16px 56px;
	overflow: hidden;
	background: var(--ap-bg);
}

.accesfy-ap__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

.accesfy-ap__orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	opacity: 0.55;
}

.accesfy-ap__orb--gold {
	width: 360px;
	height: 360px;
	background: radial-gradient(circle, rgba(201, 169, 98, 0.22), transparent 70%);
	top: -80px;
	right: -60px;
	animation: apFloat 8s ease-in-out infinite;
}

.accesfy-ap__orb--pink {
	width: 280px;
	height: 280px;
	background: radial-gradient(circle, rgba(255, 77, 166, 0.14), transparent 70%);
	bottom: -40px;
	left: -40px;
	animation: apFloat 10s ease-in-out infinite reverse;
}

.accesfy-ap__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
}

@keyframes apFloat {
	0%, 100% { transform: translate(0, 0); }
	50% { transform: translate(12px, 18px); }
}

.accesfy-ap__shell {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 440px;
	animation: apIn 0.6s var(--ap-ease);
}

@keyframes apIn {
	from { opacity: 0; transform: translateY(24px); }
	to { opacity: 1; transform: translateY(0); }
}

.accesfy-ap__card {
	padding: 34px 28px 30px;
	background: var(--ap-card);
	border: 1px solid var(--ap-border);
	border-radius: 24px;
	box-shadow:
		0 24px 64px rgba(0, 0, 0, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(16px);
	position: relative;
	overflow: hidden;
}

.accesfy-ap__card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--ap-gold), var(--ap-pink), var(--ap-gold), transparent);
}

/* Logo */
.accesfy-ap__brand {
	display: flex;
	justify-content: center;
	margin-bottom: 24px;
}

.accesfy-ap__logo-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	text-decoration: none;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
	transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.accesfy-ap__logo-link:hover {
	border-color: rgba(201, 169, 98, 0.45);
	box-shadow: 0 12px 40px rgba(201, 169, 98, 0.12);
	transform: translateY(-2px);
}

.accesfy-ap__logo-img,
.accesfy-ap__brand .accesfy-hb__logo-img,
.accesfy-ap__brand .custom-logo {
	max-height: 108px;
	width: auto;
	border-radius: 12px;
	display: block;
}

.accesfy-ap__logo-text,
.accesfy-ap__brand .accesfy-hb__logo-text {
	font-size: 1.4rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ap-text);
}

.accesfy-ap__brand .accesfy-hb__logo-brand--auth {
	padding: 10px 16px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Head */
.accesfy-ap__head {
	text-align: center;
	margin-bottom: 22px;
}

.accesfy-ap__title {
	margin: 0 0 8px;
	font-size: 1.75rem;
	font-weight: 600;
	color: var(--ap-text);
	letter-spacing: -0.02em;
}

.accesfy-ap__subtitle {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--ap-muted);
	max-width: 360px;
	margin-left: auto;
	margin-right: auto;
}

/* Tabs */
.accesfy-ap__tabs-wrap {
	margin-bottom: 22px;
}

.accesfy-ap__tabs {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 5px;
	background: rgba(0, 0, 0, 0.45);
	border: 1px solid var(--ap-border);
	border-radius: 14px;
}

.accesfy-ap__tabs-indicator {
	position: absolute;
	top: 5px;
	left: 5px;
	width: calc(50% - 7px);
	height: calc(100% - 10px);
	background: linear-gradient(135deg, rgba(201, 169, 98, 0.22), rgba(255, 77, 166, 0.1));
	border: 1px solid rgba(201, 169, 98, 0.25);
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
	transition: transform 0.35s var(--ap-ease);
	pointer-events: none;
	z-index: 0;
}

.accesfy-ap[data-active-tab="register"] .accesfy-ap__tabs-indicator {
	transform: translateX(calc(100% + 4px));
}

.accesfy-ap__tab {
	position: relative;
	z-index: 1;
	padding: 12px 10px;
	border: none;
	background: transparent;
	color: var(--ap-muted);
	font-size: 14px;
	font-weight: 600;
	border-radius: 10px;
	cursor: pointer;
	transition: color 0.25s;
}

.accesfy-ap__tab.is-active {
	color: var(--ap-text);
}

.accesfy-ap__tab:focus-visible {
	outline: 2px solid var(--ap-gold);
	outline-offset: 2px;
}

/* Panels */
.accesfy-ap__panel {
	display: none;
	animation: apPanel 0.35s var(--ap-ease);
}

.accesfy-ap__panel.is-active {
	display: block;
}

@keyframes apPanel {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Form */
.accesfy-ap__field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-bottom: 14px;
}

.accesfy-ap__field label {
	font-size: 12px;
	font-weight: 500;
	color: #e4e4e7;
	letter-spacing: 0.03em;
}

.accesfy-ap__field .required {
	color: var(--ap-gold);
}

.accesfy-ap__input-wrap {
	position: relative;
	display: block;
}

.accesfy-ap__field input,
.accesfy-ap__form .woocommerce-Input,
.accesfy-ap__form .input-text {
	width: 100%;
	padding: 13px 44px 13px 16px;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid var(--ap-border);
	border-radius: 12px;
	color: var(--ap-text);
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.accesfy-ap__field input:not([type="password"]) {
	padding-right: 16px;
}

.accesfy-ap__field input:focus,
.accesfy-ap__form .woocommerce-Input:focus {
	outline: none;
	border-color: rgba(201, 169, 98, 0.55);
	box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.12);
}

.accesfy-ap__toggle-pw {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	color: var(--ap-muted);
	cursor: pointer;
	border-radius: 8px;
	padding: 0;
}

.accesfy-ap__toggle-pw:hover {
	color: var(--ap-gold-soft);
}

.accesfy-ap__toggle-pw .accesfy-ap__eye-closed {
	display: none;
}

.accesfy-ap__toggle-pw.is-visible .accesfy-ap__eye-open {
	display: none;
}

.accesfy-ap__toggle-pw.is-visible .accesfy-ap__eye-closed {
	display: block;
}

.accesfy-ap__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.accesfy-ap__remember {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #e4e4e7;
	cursor: pointer;
}

.accesfy-ap__remember input {
	accent-color: var(--ap-gold);
}

.accesfy-ap__forgot {
	font-size: 13px;
	color: var(--ap-muted);
	text-decoration: none;
	transition: color 0.2s;
}

.accesfy-ap__forgot:hover {
	color: var(--ap-gold-soft);
}

.accesfy-ap__note {
	font-size: 13px;
	color: var(--ap-muted);
	line-height: 1.5;
	margin: 0 0 16px;
	padding: 12px 14px;
	background: rgba(201, 169, 98, 0.08);
	border: 1px solid rgba(201, 169, 98, 0.18);
	border-radius: 12px;
}

.accesfy-ap__submit {
	width: 100%;
	padding: 14px 18px;
	background: linear-gradient(135deg, #ffffff, #f4f4f5);
	color: #0a0a0a;
	border: none;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.25s var(--ap-ease), box-shadow 0.25s, background 0.25s;
	margin-top: 2px;
}

.accesfy-ap__submit:hover {
	background: linear-gradient(135deg, var(--ap-gold-soft), var(--ap-gold));
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(201, 169, 98, 0.28);
}

.accesfy-ap__submit--register {
	background: linear-gradient(135deg, var(--ap-gold), #dbc07a);
	color: #0a0a0a;
}

.accesfy-ap__form .woocommerce-privacy-policy-text {
	font-size: 12px;
	color: var(--ap-muted);
	margin-top: 12px;
}

.accesfy-ap__form .woocommerce-privacy-policy-text a {
	color: var(--ap-gold-soft);
}

.accesfy-ap__back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 20px auto 0;
	color: var(--ap-muted);
	font-size: 13px;
	text-decoration: none;
	transition: color 0.2s;
}

.accesfy-ap__back:hover {
	color: var(--ap-gold-soft);
}

@media (max-width: 480px) {
	.accesfy-ap {
		padding: 28px 14px 40px;
	}

	.accesfy-ap__card {
		padding: 26px 18px 22px;
		border-radius: 20px;
	}

	.accesfy-ap__logo-img,
	.accesfy-ap__brand .accesfy-hb__logo-img {
		max-height: 88px;
	}

	.accesfy-ap__title {
		font-size: 1.45rem;
	}
}
