/**
 * My Account — Amazon / TikTok mall layout for all logged-in endpoints.
 */

body.sophia-account-mall-page.woocommerce-account {
	background-color: var(--wp--preset--color--body-background, #fdf6f2);
}

body.sophia-account-mall-page .woocommerce-MyAccount-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

body.sophia-account-mall-page .woocommerce-MyAccount-content > .woocommerce-notices-wrapper:empty {
	display: none;
}

body.sophia-account-mall-page .woocommerce-MyAccount-content > .woocommerce-message,
body.sophia-account-mall-page .woocommerce-MyAccount-content > .woocommerce-info,
body.sophia-account-mall-page .woocommerce-MyAccount-content > .woocommerce-error,
body.sophia-account-mall-page .woocommerce-notices-wrapper .woocommerce-message,
body.sophia-account-mall-page .woocommerce-notices-wrapper .woocommerce-info,
body.sophia-account-mall-page .woocommerce-notices-wrapper .woocommerce-error {
	background: var(--wp--preset--color--background, #fff);
	border: 1px solid var(--wp--preset--color--border-color, #e8ddd6);
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	margin: 0 0 4px;
	padding: 0.95rem 1.15rem;
}

.sophia-account-mall,
.sophia-account-mall * {
	box-sizing: border-box;
}

.sophia-account-mall {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

.sophia-account-mall__card {
	background: var(--wp--preset--color--background, #fff);
	border: 1px solid var(--wp--preset--color--border-color, #e8ddd6);
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	padding: 1.25rem 1.4rem;
	width: 100%;
}

.sophia-account-mall__eyebrow {
	color: var(--wp--preset--color--foreground, #1f1f1f);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 0 0 0.35rem;
	opacity: 0.55;
	text-transform: uppercase;
}

.sophia-account-mall__title {
	font-size: clamp(1.45rem, 2.4vw, 1.9rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0 0 0.4rem;
}

.sophia-account-mall__lede {
	font-size: 0.9875rem;
	line-height: 1.55;
	margin: 0;
	opacity: 0.9;
}

.sophia-account-mall__lede a {
	color: var(--wp--preset--color--button-color, #954e26);
	font-weight: 600;
}

.sophia-account-mall__section-head {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.sophia-account-mall__section-head h2 {
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0;
}

.sophia-account-mall__link {
	color: var(--wp--preset--color--button-color, #954e26);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.sophia-account-mall__link:hover {
	text-decoration: underline;
}

.sophia-account-mall__btn,
.sophia-account-mall .button,
.sophia-account-mall button.button,
.sophia-account-mall a.button {
	align-items: center;
	border-radius: 32px !important;
	box-sizing: border-box;
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 600;
	justify-content: center;
	line-height: 1.2;
	min-height: 40px;
	padding: 10px 18px;
	text-decoration: none !important;
	white-space: nowrap;
}

.sophia-account-mall__btn.is-primary,
.sophia-account-mall button.button[name="save_account_details"],
.sophia-account-mall button.button[name="save_address"],
.sophia-account-mall .button.alt {
	background: var(--wp--preset--color--button-color, #954e26) !important;
	border: 0 !important;
	color: #fff !important;
}

.sophia-account-mall__btn.is-secondary,
.sophia-account-mall a.button:not(.alt) {
	background: transparent !important;
	border: 1px solid var(--wp--preset--color--border-color, #cfae9b) !important;
	color: var(--wp--preset--color--foreground, #1f1f1f) !important;
}

.sophia-account-mall__btn.is-secondary:hover,
.sophia-account-mall a.button:not(.alt):hover {
	border-color: var(--wp--preset--color--button-color, #954e26) !important;
	color: var(--wp--preset--color--button-color, #954e26) !important;
}

.sophia-account-mall__badge {
	align-items: center;
	border-radius: 999px;
	display: inline-flex;
	font-size: 0.75rem;
	font-weight: 700;
	justify-content: center;
	line-height: 1;
	padding: 0.4rem 0.7rem;
	white-space: nowrap;
}

.sophia-account-mall__badge.is-success {
	background: #e8f6ee;
	color: #1f8f4e;
}

.sophia-account-mall__badge.is-waiting {
	background: #fff4e5;
	color: #c77700;
}

.sophia-account-mall__badge.is-bad {
	background: #fdecea;
	color: #c0392b;
}

.sophia-account-mall__badge.is-neutral {
	background: var(--wp--preset--color--tertiary, #f2e8e3);
	color: var(--wp--preset--color--button-color, #954e26);
}

/* Dashboard shortcuts */
.sophia-account-mall__shortcuts {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sophia-account-mall__shortcut {
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-height: 132px;
	padding: 1.15rem 1.2rem;
	text-decoration: none !important;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.sophia-account-mall__shortcut:hover {
	border-color: var(--wp--preset--color--button-color, #954e26);
	transform: translateY(-1px);
}

.sophia-account-mall__shortcut-icon {
	background: var(--wp--preset--color--tertiary, #f2e8e3);
	border-radius: 10px;
	display: block;
	height: 40px;
	margin-bottom: 0.35rem;
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: 20px 20px;
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: 20px 20px;
	position: relative;
	width: 40px;
}

.sophia-account-mall__shortcut-icon::before {
	background-color: var(--wp--preset--color--button-color, #954e26);
	content: "";
	display: block;
	height: 100%;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8H3'/%3E%3Cpath d='M21 16H3'/%3E%3Cpath d='M6 4h12l1 4H5l1-4z'/%3E%3Cpath d='M5 12h14l-1 8H6l-1-8z'/%3E%3C/svg%3E");
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: 20px 20px;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8H3'/%3E%3Cpath d='M21 16H3'/%3E%3Cpath d='M6 4h12l1 4H5l1-4z'/%3E%3Cpath d='M5 12h14l-1 8H6l-1-8z'/%3E%3C/svg%3E");
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: 20px 20px;
	width: 100%;
}

.sophia-account-mall__shortcut-icon.is-address::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 21s7-5.2 7-11a7 7 0 1 0-14 0c0 5.8 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 21s7-5.2 7-11a7 7 0 1 0-14 0c0 5.8 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

.sophia-account-mall__shortcut-icon.is-account::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c1.8-3.2 4.5-5 8-5s6.2 1.8 8 5'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c1.8-3.2 4.5-5 8-5s6.2 1.8 8 5'/%3E%3C/svg%3E");
}

.sophia-account-mall__shortcut-icon.is-shop::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 9h18l-1.5 11h-15L3 9z'/%3E%3Cpath d='M8 9V7a4 4 0 0 1 8 0v2'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 9h18l-1.5 11h-15L3 9z'/%3E%3Cpath d='M8 9V7a4 4 0 0 1 8 0v2'/%3E%3C/svg%3E");
}

.sophia-account-mall__shortcut-label {
	font-size: 1rem;
	font-weight: 700;
}

.sophia-account-mall__shortcut-hint {
	font-size: 0.8125rem;
	opacity: 0.7;
}

/* Order cards */
.sophia-account-mall__order-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sophia-account-mall__order-card {
	align-items: center;
	background: var(--wp--preset--color--tertiary, #f2e8e3);
	border-radius: 12px;
	display: grid;
	gap: 12px 16px;
	grid-template-columns: minmax(0, 1.4fr) auto auto auto;
	padding: 1rem 1.1rem;
}

.sophia-account-mall--orders > .sophia-account-mall__order-list > .sophia-account-mall__order-card {
	background: var(--wp--preset--color--background, #fff);
	border: 1px solid var(--wp--preset--color--border-color, #e8ddd6);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.sophia-account-mall__order-main {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.sophia-account-mall__order-id {
	color: inherit;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
}

.sophia-account-mall__order-id:hover {
	color: var(--wp--preset--color--button-color, #954e26);
}

.sophia-account-mall__order-date,
.sophia-account-mall__order-meta {
	font-size: 0.8125rem;
	opacity: 0.75;
}

.sophia-account-mall__order-total {
	font-size: 0.9875rem;
	font-weight: 700;
	text-align: right;
	white-space: nowrap;
}

.sophia-account-mall__order-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.sophia-account-mall__pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

.sophia-account-mall__empty {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	text-align: left;
}

.sophia-account-mall__empty h2 {
	font-size: 1.25rem;
	margin: 0;
}

.sophia-account-mall__empty p {
	margin: 0 0 0.35rem;
	opacity: 0.85;
}

/* Addresses */
.sophia-account-mall__address-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sophia-account-mall__address-card address {
	background: var(--wp--preset--color--tertiary, #f2e8e3);
	border-radius: 8px;
	display: block;
	font-style: normal;
	line-height: 1.65;
	margin: 0;
	overflow-wrap: anywhere;
	padding: 14px 16px;
}

/* Forms */
.sophia-account-mall__form-card .woocommerce-EditAccountForm,
.sophia-account-mall__form-card .woocommerce-address-fields {
	margin: 0;
}

.sophia-account-mall__form-card .form-row {
	margin-bottom: 1rem;
}

.sophia-account-mall__form-card label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.sophia-account-mall__form-card input.input-text,
.sophia-account-mall__form-card select,
.sophia-account-mall__form-card textarea {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-color, #e8ddd6);
	border-radius: 10px;
	padding: 0.7rem 0.85rem;
	width: 100%;
}

.sophia-account-mall__form-card fieldset {
	background: var(--wp--preset--color--tertiary, #f2e8e3);
	border: 0;
	border-radius: 10px;
	margin: 1.25rem 0 0;
	padding: 1rem 1.1rem;
}

.sophia-account-mall__form-card fieldset legend {
	font-size: 0.875rem;
	font-weight: 700;
	padding: 0 0.25rem;
}

.sophia-account-mall__form-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0.5rem 0 0;
}

/* Tables (downloads / payments) */
.sophia-account-mall__table,
.sophia-account-mall .shop_table {
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	margin: 0;
	width: 100%;
}

.sophia-account-mall .shop_table th,
.sophia-account-mall .shop_table td {
	border-top: 1px solid var(--wp--preset--color--border-color, #e8ddd6);
	font-size: 0.9375rem;
	padding: 0.9rem 0.35rem;
	text-align: left;
	vertical-align: middle;
}

.sophia-account-mall .shop_table thead th {
	border-top: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	opacity: 0.7;
	text-transform: uppercase;
}

/* Hide stock page titles when our hero is present */
body.sophia-account-mall-page .wp-block-post-title {
	margin-bottom: 1rem;
}

@media screen and (max-width: 1100px) {
	.sophia-account-mall__shortcuts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 900px) {
	.sophia-account-mall__order-card {
		grid-template-columns: 1fr auto;
	}

	.sophia-account-mall__order-total,
	.sophia-account-mall__order-actions {
		grid-column: 1 / -1;
	}

	.sophia-account-mall__order-actions {
		justify-content: flex-start;
	}

	.sophia-account-mall__order-total {
		text-align: left;
	}

	.sophia-account-mall__address-grid {
		grid-template-columns: 1fr;
	}
}

@media screen and (max-width: 600px) {
	.sophia-account-mall__card {
		padding: 1.05rem 1.1rem;
	}

	.sophia-account-mall__shortcuts {
		grid-template-columns: 1fr;
	}

	.sophia-account-mall__order-actions .sophia-account-mall__btn,
	.sophia-account-mall__form-actions .sophia-account-mall__btn,
	.sophia-account-mall__form-actions .button {
		flex: 1 1 auto;
		justify-content: center;
	}
}

/* ---- Guest login / register — split auth gate ---- */
body.sophia-account-auth-page.woocommerce-account {
	--sophia-gate-ink: #10233a;
	--sophia-gate-muted: #5b6b7c;
	--sophia-gate-line: #d7dee7;
	--sophia-gate-panel: #ffffff;
	--sophia-gate-soft: #eef3f7;
	--sophia-gate-accent: #1f8a7a;
	--sophia-gate-ruo: #e8f2f4;
	background: var(--wp--preset--color--body-background, #fdf6f2) !important;
	color: var(--sophia-gate-ink);
}

body.sophia-account-auth-page .wp-block-post-title,
body.sophia-account-auth-page .sophia-members-catalog-intro {
	display: none !important;
}

body.sophia-account-auth-page main.wp-block-group,
body.sophia-account-auth-page main > .wp-block-group {
	background: transparent !important;
}

body.sophia-account-auth-page .entry-content,
body.sophia-account-auth-page .woocommerce,
body.sophia-account-auth-page main .woocommerce {
	max-width: 1120px !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

body.sophia-account-auth-page .entry-content.alignfull {
	padding-top: 0.5rem;
	padding-bottom: 2.5rem;
}

.sophia-auth-gate {
	align-items: stretch;
	box-sizing: border-box;
	display: grid;
	gap: 1.15rem;
	grid-template-columns: 1fr 1fr;
	margin: 0 auto;
	min-height: min(720px, calc(100vh - 180px));
	width: 100%;
}

.sophia-auth-gate *,
.sophia-auth-gate *::before,
.sophia-auth-gate *::after {
	box-sizing: border-box;
}

.sophia-auth-gate__visual {
	border-radius: 24px;
	color: #fff;
	isolation: isolate;
	min-height: 560px;
	overflow: hidden;
	position: relative;
}

.sophia-auth-gate__visual-bg {
	background-position: center;
	background-size: cover;
	inset: 0;
	position: absolute;
	transform: scale(1.02);
	z-index: 0;
}

.sophia-auth-gate__visual-shade {
	background:
		linear-gradient(180deg, rgba(8, 28, 36, 0.55) 0%, rgba(8, 28, 36, 0.18) 38%, rgba(8, 28, 36, 0.72) 100%),
		linear-gradient(90deg, rgba(10, 40, 48, 0.35), transparent 55%);
	inset: 0;
	position: absolute;
	z-index: 1;
}

.sophia-auth-gate__visual-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: space-between;
	min-height: inherit;
	padding: 1.6rem 1.5rem 1.75rem;
	position: relative;
	z-index: 2;
}

.sophia-auth-gate__brand {
	align-items: center;
	display: flex;
	gap: 0.7rem;
}

.sophia-auth-gate__logo {
	border-radius: 8px;
	height: 36px;
	object-fit: contain;
	width: 36px;
}

.sophia-auth-gate__brand-name {
	font-family: var(--wp--preset--font-family--merriweather, Merriweather, Georgia, serif);
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.sophia-auth-gate__badges {
	display: grid;
	gap: 0.7rem;
	justify-items: center;
	margin: auto 0;
	padding: 1rem 0;
}

.sophia-auth-gate__badges span {
	backdrop-filter: blur(6px);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.2;
	padding: 0.7rem 1.15rem;
	text-align: center;
	white-space: nowrap;
}

.sophia-auth-gate__visual-foot {
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.8125rem;
	line-height: 1.5;
	margin: 0;
	max-width: 18rem;
}

.sophia-auth-gate__panel {
	background: var(--sophia-gate-panel);
	border-radius: 28px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
	display: flex;
	flex-direction: column;
	min-height: 100%;
	overflow: hidden;
	padding: 1.35rem 1.35rem 1.15rem;
}

.sophia-auth-gate__tabs {
	background: var(--sophia-gate-soft);
	border-radius: 999px;
	display: grid;
	gap: 0.25rem;
	grid-template-columns: 1fr 1fr;
	margin: 0 0 1.15rem;
	padding: 0.28rem;
}

.sophia-auth-gate__tab {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: var(--sophia-gate-ink);
	cursor: pointer;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	min-height: 42px;
	padding: 0.65rem 0.85rem;
	transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.sophia-auth-gate__tab.is-active {
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 35, 58, 0.12);
	color: var(--sophia-gate-ink);
}

.sophia-auth-gate__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.sophia-auth-gate__form-panel {
	display: none;
}

.sophia-auth-gate__form-panel.is-active {
	display: block;
	animation: sophia-auth-fade 0.28s ease;
}

@keyframes sophia-auth-fade {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.sophia-auth-gate__form-panel.is-active {
		animation: none;
	}
}

.sophia-auth-gate__divider {
	align-items: center;
	color: var(--sophia-gate-ink);
	display: flex;
	font-size: 0.6875rem;
	font-weight: 800;
	gap: 0.75rem;
	letter-spacing: 0.08em;
	margin: 0 0 1.1rem;
	text-transform: uppercase;
}

.sophia-auth-gate__google {
	margin: 0 0 1rem;
}

.sophia-auth-gate__google-btn {
	align-items: center;
	background: #fff;
	border: 1px solid var(--sophia-gate-line);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(16, 35, 58, 0.04);
	color: var(--sophia-gate-ink) !important;
	display: flex;
	font-size: 0.9375rem;
	font-weight: 700;
	gap: 0.65rem;
	justify-content: center;
	min-height: 48px;
	padding: 0.75rem 1rem;
	text-decoration: none !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	width: 100%;
}

.sophia-auth-gate__google-btn:hover {
	background: #f8fafc;
	border-color: #c5ced8;
	box-shadow: 0 2px 8px rgba(16, 35, 58, 0.08);
	color: var(--sophia-gate-ink) !important;
}

.sophia-auth-gate__google-icon {
	display: inline-flex;
	flex: 0 0 auto;
	line-height: 0;
}

.sophia-auth-gate__google-note {
	color: var(--sophia-gate-muted);
	font-size: 0.75rem;
	line-height: 1.45;
	margin: 0.65rem 0 0;
	text-align: center;
}

.sophia-auth-gate__divider::before,
.sophia-auth-gate__divider::after {
	background: var(--sophia-gate-line);
	content: "";
	flex: 1 1 auto;
	height: 1px;
}

.sophia-auth-gate__divider span {
	flex: 0 0 auto;
}

.sophia-auth-gate form.login,
.sophia-auth-gate form.register,
body.sophia-account-auth-page .sophia-auth-gate form.login,
body.sophia-account-auth-page .sophia-auth-gate form.register {
	background: transparent !important;
	border: 0 !important;
	margin: 0 !important;
	max-width: none !important;
	padding: 0 !important;
	width: 100% !important;
}

.sophia-auth-gate .form-row {
	margin: 0 0 0.95rem !important;
}

.sophia-auth-gate label {
	color: var(--sophia-gate-ink) !important;
	display: block;
	font-size: 0.875rem !important;
	font-weight: 700 !important;
	letter-spacing: 0;
	margin: 0 0 0.4rem !important;
}

.sophia-auth-gate label .required {
	color: #c0392b;
}

.sophia-auth-gate input.input-text,
.sophia-auth-gate select {
	background: #fff !important;
	border: 1px solid var(--sophia-gate-line) !important;
	border-radius: 12px !important;
	box-shadow: none !important;
	color: var(--sophia-gate-ink) !important;
	font-size: 0.9375rem !important;
	min-height: 48px;
	padding: 0.75rem 0.95rem !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	width: 100% !important;
}

.sophia-auth-gate input.input-text:focus,
.sophia-auth-gate select:focus {
	border-color: var(--sophia-gate-accent) !important;
	box-shadow: 0 0 0 3px rgba(31, 138, 122, 0.18) !important;
	outline: none !important;
}

.sophia-auth-gate__password-wrap {
	display: block;
	position: relative;
}

.sophia-auth-gate__password-wrap input.input-text {
	padding-right: 4.25rem !important;
}

.sophia-auth-gate__show-pass {
	appearance: none;
	background: transparent;
	border: 0;
	color: var(--sophia-gate-ink);
	cursor: pointer;
	font-size: 0.8125rem;
	font-weight: 700;
	padding: 0.35rem 0.55rem;
	position: absolute;
	right: 0.45rem;
	top: 50%;
	transform: translateY(-50%);
}

.sophia-auth-gate__meta {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1rem;
	justify-content: space-between;
	margin: 0.1rem 0 1.1rem;
}

.sophia-auth-gate__check {
	align-items: center;
	color: var(--sophia-gate-muted) !important;
	cursor: pointer;
	display: inline-flex !important;
	font-size: 0.8125rem !important;
	font-weight: 500 !important;
	gap: 0.45rem;
	margin: 0 !important;
}

.sophia-auth-gate__check input {
	accent-color: var(--sophia-gate-accent);
	height: 1rem;
	margin: 0;
	width: 1rem;
}

.sophia-auth-gate__forgot {
	color: var(--sophia-gate-ink);
	font-size: 0.8125rem;
	font-weight: 700;
	text-decoration: none;
}

.sophia-auth-gate__forgot:hover {
	color: var(--sophia-gate-accent);
	text-decoration: underline;
}

.sophia-auth-gate__hint {
	background: var(--sophia-gate-soft);
	border-radius: 12px;
	color: var(--sophia-gate-muted);
	font-size: 0.8125rem;
	line-height: 1.5;
	margin: 0 0 1rem;
	padding: 0.8rem 0.95rem;
}

.sophia-auth-gate__actions {
	margin: 0 0 0.35rem !important;
}

.sophia-auth-gate__submit,
body.sophia-account-auth-page .sophia-auth-gate .woocommerce-form-login__submit,
body.sophia-account-auth-page .sophia-auth-gate .woocommerce-form-register__submit {
	background: var(--sophia-gate-ink) !important;
	border: 0 !important;
	border-radius: 12px !important;
	box-shadow: none !important;
	color: #fff !important;
	cursor: pointer;
	font-size: 0.9375rem !important;
	font-weight: 700 !important;
	min-height: 48px;
	padding: 0.85rem 1.25rem !important;
	transition: background 0.18s ease, transform 0.18s ease;
	width: 100%;
}

.sophia-auth-gate__submit:hover,
body.sophia-account-auth-page .sophia-auth-gate .woocommerce-form-login__submit:hover,
body.sophia-account-auth-page .sophia-auth-gate .woocommerce-form-register__submit:hover {
	background: #071521 !important;
	transform: translateY(-1px);
}

.sophia-auth-gate__ruo {
	background: var(--sophia-gate-ruo);
	border-radius: 14px;
	color: var(--sophia-gate-ink);
	margin-top: auto;
	padding: 0.95rem 1rem;
}

.sophia-auth-gate__ruo strong {
	color: var(--sophia-gate-accent);
	display: block;
	font-size: 0.875rem;
	margin-bottom: 0.35rem;
}

.sophia-auth-gate__ruo p {
	color: var(--sophia-gate-muted);
	font-size: 0.75rem;
	line-height: 1.5;
	margin: 0;
}

body.sophia-account-auth-page .sophia-auth-gate .sophia-reg-checkbox {
	margin-bottom: 0.8rem;
}

body.sophia-account-auth-page .sophia-auth-gate .sophia-reg-checkbox label {
	align-items: flex-start;
	color: var(--sophia-gate-muted) !important;
	display: flex !important;
	font-size: 0.75rem !important;
	font-weight: 500 !important;
	gap: 0.5rem;
	line-height: 1.45;
}

body.sophia-account-auth-page .sophia-auth-gate .sophia-reg-checkbox input {
	accent-color: var(--sophia-gate-accent);
	flex: 0 0 auto;
	height: 1rem;
	margin: 0.15rem 0 0;
	width: 1rem;
}

body.sophia-account-auth-page .sophia-auth-gate .sophia-reg-checkbox a,
body.sophia-account-auth-page .sophia-auth-gate .woocommerce-privacy-policy-text a {
	color: var(--sophia-gate-accent);
	font-weight: 700;
}

body.sophia-account-auth-page .sophia-auth-gate .woocommerce-privacy-policy-text {
	color: var(--sophia-gate-muted);
	font-size: 0.75rem;
	line-height: 1.45;
	margin: 0 0 0.85rem;
}

body.sophia-account-auth-page .woocommerce-notices-wrapper {
	margin: 0 0 1rem;
}

body.sophia-account-auth-page .woocommerce-notices-wrapper .woocommerce-error,
body.sophia-account-auth-page .woocommerce-notices-wrapper .woocommerce-message,
body.sophia-account-auth-page .woocommerce-notices-wrapper .woocommerce-info {
	background: #fff;
	border-radius: 12px;
	margin: 0;
}

@media screen and (max-width: 900px) {
	/*
	 * Block theme alignfull + nested has-global-padding was breaking out unevenly
	 * (large left gap, flush right). Force equal side spacing on the auth gate.
	 */
	body.sophia-account-auth-page .has-global-padding {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}

	body.sophia-account-auth-page .has-global-padding .has-global-padding {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	body.sophia-account-auth-page .alignfull {
		margin-left: 0 !important;
		margin-right: 0 !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	body.sophia-account-auth-page .entry-content,
	body.sophia-account-auth-page .woocommerce,
	body.sophia-account-auth-page main .woocommerce,
	body.sophia-account-auth-page .sophia-auth-gate {
		box-sizing: border-box;
		margin-left: auto !important;
		margin-right: auto !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	.sophia-auth-gate {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.sophia-auth-gate__visual {
		min-height: 280px;
	}

	.sophia-auth-gate__badges span {
		font-size: 0.75rem;
		padding: 0.55rem 0.9rem;
		white-space: normal;
	}

	.sophia-auth-gate__panel {
		border-radius: 22px;
	}
}

@media screen and (max-width: 600px) {
	body.sophia-account-auth-page .has-global-padding {
		padding-left: max(14px, env(safe-area-inset-left)) !important;
		padding-right: max(14px, env(safe-area-inset-right)) !important;
	}

	body.sophia-account-auth-page .entry-content.alignfull {
		padding-bottom: 1.5rem;
	}

	.sophia-auth-gate__panel {
		padding: 1rem;
	}

	.sophia-auth-gate__tab {
		font-size: 0.8125rem;
		padding: 0.55rem 0.5rem;
	}
}
