/* Custom Account Suite
   Scoped styles: all selectors are prefixed to minimize theme conflicts.
*/

.custom-account {
	--custom-accent: #b58a52;
	--custom-dark: #171717;
	--custom-text: #252525;
	--custom-muted: #707070;
	--custom-border: #e8e5df;
	--custom-soft: #f7f6f3;
	--custom-success: #24724b;
	--custom-danger: #a43c3c;
	--custom-radius-lg: 28px;
	--custom-radius-md: 18px;
	--custom-shadow: 0 24px 70px rgba(22, 22, 22, 0.10);
	width: 100%;
	color: var(--custom-text);
	font-family: inherit;
	line-height: 1.55;
}

.custom-account *,
.custom-account *::before,
.custom-account *::after {
	box-sizing: border-box;
}

.custom-account h1,
.custom-account h2,
.custom-account h3,
.custom-account p {
	margin-top: 0;
}

.custom-account a {
	color: inherit;
	text-decoration: none;
}

.custom-icon {
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
}

.custom-eyebrow {
	display: inline-block;
	margin-bottom: 10px;
	color: var(--custom-accent);
	font-size: 12px;
	font-weight: 750;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.custom-alert {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 1180px;
	margin: 0 auto 20px;
	padding: 14px 18px;
	border: 1px solid;
	border-radius: 14px;
	font-size: 14px;
	font-weight: 650;
}

.custom-alert--success {
	border-color: rgba(36, 114, 75, 0.25);
	background: rgba(36, 114, 75, 0.08);
	color: var(--custom-success);
}

.custom-alert--error {
	border-color: rgba(164, 60, 60, 0.25);
	background: rgba(164, 60, 60, 0.08);
	color: var(--custom-danger);
}

/* Guest area */
.custom-auth-shell {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(430px, 1.05fr);
	max-width: 1180px;
	min-height: 690px;
	margin: 0 auto;
	overflow: hidden;
	border: 1px solid var(--custom-border);
	border-radius: var(--custom-radius-lg);
	background: #fff;
	box-shadow: var(--custom-shadow);
}

.custom-auth-intro {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	overflow: hidden;
	padding: clamp(38px, 6vw, 78px);
	background:
		radial-gradient(circle at 88% 12%, rgba(181, 138, 82, 0.30), transparent 30%),
		linear-gradient(145deg, var(--custom-dark), #292825);
	color: #fff;
}

.custom-auth-intro::after {
	content: "";
	position: absolute;
	right: -110px;
	bottom: -140px;
	width: 360px;
	height: 360px;
	border: 1px solid rgba(255, 255, 255, 0.11);
	border-radius: 50%;
	box-shadow:
		0 0 0 55px rgba(255, 255, 255, 0.025),
		0 0 0 110px rgba(255, 255, 255, 0.018);
	pointer-events: none;
}

.custom-auth-intro h1 {
	max-width: 500px;
	margin-bottom: 20px;
	color: #fff;
	font-size: clamp(38px, 5vw, 66px);
	font-weight: 650;
	letter-spacing: -0.045em;
	line-height: 1.02;
}

.custom-auth-intro > p {
	max-width: 540px;
	margin-bottom: 42px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 17px;
}

.custom-benefits {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.custom-benefits li {
	display: flex;
	align-items: center;
	gap: 14px;
	color: rgba(255, 255, 255, 0.88);
	font-size: 14px;
	font-weight: 600;
}

.custom-benefits .custom-icon {
	width: 20px;
	color: var(--custom-accent);
}

.custom-auth-card {
	padding: clamp(32px, 5vw, 68px);
	background: #fff;
}

.custom-auth-tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 42px;
	padding: 5px;
	border-radius: 14px;
	background: var(--custom-soft);
}

.custom-tab-button {
	flex: 1;
	padding: 12px 18px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--custom-muted);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: 180ms ease;
}

.custom-tab-button:hover {
	color: var(--custom-dark);
}

.custom-tab-button.is-active {
	background: #fff;
	color: var(--custom-dark);
	box-shadow: 0 6px 18px rgba(20, 20, 20, 0.08);
}

.custom-tab-panel {
	display: none;
}

.custom-tab-panel.is-active {
	display: block;
	animation: customFade 180ms ease;
}

@keyframes customFade {
	from { opacity: 0; transform: translateY(5px); }
	to { opacity: 1; transform: translateY(0); }
}

.custom-form-heading {
	margin-bottom: 28px;
}

.custom-form-heading h2 {
	margin-bottom: 8px;
	color: var(--custom-dark);
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -0.025em;
}

.custom-form-heading p {
	margin-bottom: 0;
	color: var(--custom-muted);
	font-size: 14px;
}

.custom-form {
	display: grid;
	gap: 18px;
}

.custom-field-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.custom-field {
	display: grid;
	gap: 8px;
	margin: 0;
	color: var(--custom-text);
	font-size: 13px;
	font-weight: 700;
}

.custom-field input,
.custom-field select,
.custom-field textarea {
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--custom-border);
	border-radius: 12px;
	outline: none;
	background: #fff;
	color: var(--custom-text);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	box-shadow: none;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.custom-field input:focus,
.custom-field select:focus,
.custom-field textarea:focus {
	border-color: var(--custom-accent);
	box-shadow: 0 0 0 4px rgba(181, 138, 82, 0.12);
}

.custom-field small {
	color: var(--custom-muted);
	font-size: 11px;
	font-weight: 500;
}

.custom-password-wrap {
	position: relative;
	display: block;
}

.custom-password-wrap input {
	padding-right: 52px;
}

.custom-password-toggle {
	position: absolute;
	top: 50%;
	right: 8px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	transform: translateY(-50%);
	background: transparent;
	color: var(--custom-muted);
	cursor: pointer;
}

.custom-password-toggle:hover {
	color: var(--custom-dark);
}

.custom-password-toggle .custom-icon {
	width: 19px;
	height: 19px;
}

.custom-form-row {
	display: flex;
	align-items: center;
	gap: 14px;
}

.custom-form-row--between {
	justify-content: space-between;
}

.custom-form-row a {
	color: var(--custom-accent);
	font-size: 13px;
	font-weight: 700;
}

.custom-check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0;
	color: var(--custom-muted);
	font-size: 13px;
	font-weight: 550;
	cursor: pointer;
}

.custom-check input {
	width: 16px;
	height: 16px;
	margin: 2px 0 0;
	accent-color: var(--custom-accent);
}

.custom-check a {
	color: var(--custom-accent);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.custom-check--privacy {
	margin-top: 2px;
}

.custom-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 50px;
	padding: 13px 20px;
	border: 1px solid transparent;
	border-radius: 12px;
	font: inherit;
	font-size: 14px;
	font-weight: 750;
	line-height: 1.2;
	cursor: pointer;
	transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.custom-button:hover {
	transform: translateY(-1px);
}

.custom-button--primary {
	background: var(--custom-dark);
	color: #fff !important;
	box-shadow: 0 12px 22px rgba(20, 20, 20, 0.14);
}

.custom-button--primary:hover {
	background: #292929;
	box-shadow: 0 15px 30px rgba(20, 20, 20, 0.18);
}

.custom-button--secondary {
	border-color: var(--custom-border);
	background: #fff;
	color: var(--custom-dark) !important;
}

.custom-button--light {
	background: #fff;
	color: var(--custom-dark) !important;
}

.custom-honeypot {
	position: absolute !important;
	left: -99999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Logged-in dashboard */
.custom-dashboard-shell {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	max-width: 1240px;
	min-height: 720px;
	margin: 0 auto;
	overflow: hidden;
	border: 1px solid var(--custom-border);
	border-radius: var(--custom-radius-lg);
	background: #fff;
	box-shadow: var(--custom-shadow);
}

.custom-sidebar {
	padding: 28px 20px;
	background: var(--custom-dark);
	color: #fff;
}

.custom-user-card {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 28px;
	padding: 0 8px 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.custom-avatar {
	width: 58px;
	height: 58px;
	border: 2px solid rgba(255, 255, 255, 0.26);
	border-radius: 50%;
	object-fit: cover;
}

.custom-user-card > div {
	min-width: 0;
}

.custom-user-card span,
.custom-user-card small {
	display: block;
	color: rgba(255, 255, 255, 0.55);
	font-size: 11px;
}

.custom-user-card strong {
	display: block;
	overflow: hidden;
	margin: 2px 0;
	color: #fff;
	font-size: 15px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.custom-user-card small {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.custom-account-nav {
	display: grid;
	gap: 5px;
}

.custom-nav-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 11px;
	color: rgba(255, 255, 255, 0.68) !important;
	font-size: 13px;
	font-weight: 650;
	transition: 160ms ease;
}

.custom-nav-link .custom-icon {
	width: 19px;
	height: 19px;
}

.custom-nav-link:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff !important;
}

.custom-nav-link.is-active {
	background: var(--custom-accent);
	color: #fff !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.custom-nav-link--logout {
	margin-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 0;
	padding-top: 22px;
}

.custom-dashboard-main {
	min-width: 0;
	padding: clamp(28px, 4vw, 54px);
	background: #fbfbfa;
}

.custom-section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 30px;
}

.custom-section-header h1 {
	margin-bottom: 10px;
	color: var(--custom-dark);
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 680;
	letter-spacing: -0.04em;
	line-height: 1.08;
}

.custom-section-header p {
	max-width: 680px;
	margin-bottom: 0;
	color: var(--custom-muted);
	font-size: 15px;
}

.custom-stat-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 18px;
}

.custom-stat-card {
	position: relative;
	display: flex;
	min-height: 170px;
	flex-direction: column;
	padding: 22px;
	border: 1px solid var(--custom-border);
	border-radius: var(--custom-radius-md);
	background: #fff;
}

.custom-stat-icon {
	position: absolute;
	top: 20px;
	right: 20px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: rgba(181, 138, 82, 0.12);
	color: var(--custom-accent);
}

.custom-stat-icon .custom-icon {
	width: 20px;
	height: 20px;
}

.custom-stat-card > span {
	margin-bottom: 8px;
	color: var(--custom-muted);
	font-size: 12px;
	font-weight: 650;
}

.custom-stat-card > strong {
	margin-bottom: auto;
	padding-right: 46px;
	color: var(--custom-dark);
	font-size: 29px;
	font-weight: 700;
	line-height: 1.1;
}

.custom-stat-card > a {
	margin-top: 24px;
	color: var(--custom-accent);
	font-size: 12px;
	font-weight: 750;
}

.custom-content-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.75fr);
	gap: 18px;
}

.custom-panel {
	padding: 26px;
	border: 1px solid var(--custom-border);
	border-radius: var(--custom-radius-md);
	background: #fff;
}

.custom-panel-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 24px;
}

.custom-panel-heading h2 {
	margin-bottom: 0;
	color: var(--custom-dark);
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.custom-panel-heading > a {
	color: var(--custom-accent);
	font-size: 12px;
	font-weight: 750;
}

.custom-latest-order {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	padding: 18px;
	border-radius: 14px;
	background: var(--custom-soft);
}

.custom-latest-order small {
	display: block;
	margin-bottom: 5px;
	color: var(--custom-muted);
	font-size: 10px;
	font-weight: 650;
	text-transform: uppercase;
}

.custom-latest-order strong {
	color: var(--custom-dark);
	font-size: 13px;
}

.custom-status {
	display: inline-flex;
	align-items: center;
	padding: 5px 9px;
	border-radius: 999px;
	background: rgba(181, 138, 82, 0.12);
	color: #795a31;
	font-size: 11px;
	font-weight: 750;
	white-space: nowrap;
}

.custom-panel--help {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	background:
		radial-gradient(circle at 100% 0, rgba(181, 138, 82, 0.34), transparent 35%),
		var(--custom-dark);
	color: #fff;
}

.custom-panel--help h2 {
	margin-bottom: 12px;
	color: #fff;
	font-size: 25px;
	line-height: 1.18;
}

.custom-panel--help p {
	margin-bottom: 24px;
	color: rgba(255, 255, 255, 0.68);
	font-size: 14px;
}

.custom-empty-state {
	display: flex;
	min-height: 250px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.custom-empty-state > .custom-icon {
	width: 38px;
	height: 38px;
	margin-bottom: 16px;
	color: var(--custom-accent);
}

.custom-empty-state h2,
.custom-empty-state h3 {
	margin-bottom: 7px;
	color: var(--custom-dark);
}

.custom-empty-state p {
	max-width: 500px;
	margin-bottom: 20px;
	color: var(--custom-muted);
}

/* Orders */
.custom-orders-panel {
	padding: 0;
	overflow: hidden;
}

.custom-orders-table-wrap {
	overflow-x: auto;
}

.custom-orders-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	background: #fff;
}

.custom-orders-table th,
.custom-orders-table td {
	padding: 18px 20px;
	border: 0;
	border-bottom: 1px solid var(--custom-border);
	text-align: left;
	vertical-align: middle;
}

.custom-orders-table th {
	background: var(--custom-soft);
	color: var(--custom-muted);
	font-size: 10px;
	font-weight: 750;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.custom-orders-table td {
	color: var(--custom-text);
	font-size: 13px;
}

.custom-order-action {
	text-align: right !important;
}

.custom-order-action a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--custom-accent);
	font-weight: 750;
}

.custom-order-action .custom-icon {
	width: 16px;
	height: 16px;
}

.custom-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 18px 20px;
	color: var(--custom-muted);
	font-size: 12px;
}

.custom-pagination a {
	color: var(--custom-accent);
	font-weight: 750;
}

/* Profile */
.custom-profile-form {
	padding: 0;
	overflow: hidden;
}

.custom-form-section {
	display: grid;
	grid-template-columns: minmax(210px, 0.65fr) minmax(0, 1.35fr);
	gap: 36px;
	padding: 30px;
	border-bottom: 1px solid var(--custom-border);
}

.custom-form-section-heading h2 {
	margin-bottom: 7px;
	color: var(--custom-dark);
	font-size: 19px;
}

.custom-form-section-heading p {
	margin-bottom: 0;
	color: var(--custom-muted);
	font-size: 13px;
}

.custom-form-section > .custom-field,
.custom-form-section > .custom-field-grid {
	align-self: start;
}

.custom-form-section > *:nth-child(n+3) {
	grid-column: 2;
}

.custom-form-actions {
	display: flex;
	justify-content: flex-end;
	padding: 22px 30px;
	background: var(--custom-soft);
}

/* Addresses and external cards */
.custom-address-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.custom-address-card {
	display: flex;
	min-height: 330px;
	flex-direction: column;
}

.custom-address-card .custom-panel-heading > .custom-icon {
	width: 28px;
	height: 28px;
	color: var(--custom-accent);
}

.custom-address-card address {
	margin-bottom: auto;
	color: var(--custom-muted);
	font-size: 14px;
	font-style: normal;
	line-height: 1.9;
}

.custom-address-card .custom-button {
	align-self: flex-start;
	margin-top: 28px;
}

.custom-external-card {
	display: flex;
	min-height: 390px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.custom-external-icon {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	margin-bottom: 20px;
	border-radius: 22px;
	background: rgba(181, 138, 82, 0.12);
	color: var(--custom-accent);
}

.custom-external-icon .custom-icon {
	width: 33px;
	height: 33px;
}

.custom-external-card h2 {
	margin-bottom: 8px;
	color: var(--custom-dark);
}

.custom-external-card p {
	max-width: 520px;
	margin-bottom: 24px;
	color: var(--custom-muted);
}

/* Compact account link shortcode */
.custom-account-link {
	display: inline-flex;
	align-items: center;
	font-weight: 700;
}

/* Responsive */
@media (max-width: 980px) {
	.custom-auth-shell {
		grid-template-columns: 1fr;
	}

	.custom-auth-intro {
		min-height: 360px;
	}

	.custom-dashboard-shell {
		grid-template-columns: 1fr;
	}

	.custom-sidebar {
		padding: 20px;
	}

	.custom-user-card {
		margin-bottom: 16px;
	}

	.custom-account-nav {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.custom-nav-link {
		justify-content: center;
	}

	.custom-nav-link--logout {
		margin-top: 0;
		padding-top: 12px;
		border-top: 0;
		border-radius: 11px;
	}

	.custom-content-grid {
		grid-template-columns: 1fr;
	}

	.custom-form-section {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.custom-form-section > *:nth-child(n+3) {
		grid-column: auto;
	}
}

@media (max-width: 720px) {
	.custom-auth-shell,
	.custom-dashboard-shell {
		border-radius: 20px;
	}

	.custom-auth-intro,
	.custom-auth-card,
	.custom-dashboard-main {
		padding: 26px 20px;
	}

	.custom-auth-intro {
		min-height: 330px;
	}

	.custom-auth-intro h1 {
		font-size: 42px;
	}

	.custom-field-grid,
	.custom-stat-grid,
	.custom-address-grid {
		grid-template-columns: 1fr;
	}

	.custom-account-nav {
		display: flex;
		overflow-x: auto;
		padding-bottom: 8px;
		scrollbar-width: thin;
	}

	.custom-nav-link {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	.custom-stat-card {
		min-height: 150px;
	}

	.custom-latest-order {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.custom-orders-table thead {
		display: none;
	}

	.custom-orders-table,
	.custom-orders-table tbody,
	.custom-orders-table tr,
	.custom-orders-table td {
		display: block;
		width: 100%;
	}

	.custom-orders-table tr {
		padding: 12px 0;
		border-bottom: 1px solid var(--custom-border);
	}

	.custom-orders-table td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 18px;
		padding: 9px 18px;
		border: 0;
		text-align: right;
	}

	.custom-orders-table td::before {
		content: attr(data-label);
		color: var(--custom-muted);
		font-size: 10px;
		font-weight: 750;
		letter-spacing: 0.06em;
		text-transform: uppercase;
	}

	.custom-order-action {
		justify-content: flex-end !important;
		text-align: right !important;
	}

	.custom-order-action::before {
		display: none;
	}

	.custom-form-section,
	.custom-form-actions {
		padding: 22px 18px;
	}

	.custom-form-actions .custom-button {
		width: 100%;
	}
}

@media (max-width: 460px) {
	.custom-auth-tabs {
		margin-bottom: 28px;
	}

	.custom-form-row--between {
		align-items: flex-start;
		flex-direction: column;
	}

	.custom-latest-order {
		grid-template-columns: 1fr;
	}

	.custom-panel {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.custom-account *,
	.custom-account *::before,
	.custom-account *::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
