/* ==========================================================================
   Alpha Peptides — My Account (P7)
   --------------------------------------------------------------------------
   Two surfaces:

   A. LOGGED OUT — the source's bespoke SPLIT SCREEN. Lifted from the operator's
      own inline block in source-account/my-account.html (`.al-*`, 22 KB) and
      source-account/lost-password.html (`apex-password-screen`, 9 KB), measured
      against _shots/account-{1440,390}.png. Class names are kept IDENTICAL to
      the source so the lift is auditable.

   B. LOGGED IN — the Blue Sky structure (STANDARDS #1) painted in the source's
      account language, taken from the operator's `apex-account-css` block:
      white cards, 1px #E2E6ED hairlines, 14px radius, #F4F6FA cream header
      strips, pill status badges with the exact status colours, 66px capped
      product thumbs, round #2563EB arrow buttons and pill filter chips.

   ⛔ Section 0 is the RAIL NEUTRALISER. Do not delete it. Read the comment.

   Tokens are referenced as `var(--ap-x, #hex)` so this file never fights
   whichever agent owns the `:root` block — it works standalone and inherits
   automatically once the sitewide tokens land.
   ========================================================================== */


/* ==========================================================================
   0. ⛔⛔ THE RAIL NEUTRALISER — the pipeline's most-repeated defect ⛔⛔

   WooCommerce ships, in its own woocommerce-layout.css:

       .woocommerce-account .woocommerce-MyAccount-navigation { float:left; width:30% }
       .woocommerce-account .woocommerce-MyAccount-content    { float:right; width:68% }

   That is 0,2,0 specificity. It beats any single-class `.…-sidebar` rule and —
   the part that actually breaks the layout — `float` takes the rail OUT OF GRID
   FLOW, so its grid track collapses and the rail shrink-to-fits to ~84px: icons
   only, labels wrapped one word per line.

   Neutralised here at 0,3,0 (`.woocommerce-account` + `.ap-acc` +
   `.woocommerce-MyAccount-navigation`), which is >= Woo's, with `float:none` so
   the element returns to grid flow, and `min-width:0` on the content column so
   a wide table can never push the rail out again.

   Woo's own smallscreen reset only starts at <=768px, which is why the
   769–991px band is the one that keeps shipping broken. The neutraliser below
   is UNCONDITIONAL, so every width is covered.

   The SOURCE has this same bug and patched the symptom
   (`.woocommerce-account .wcmam-nav { float:none !important; width:100% !important }`
   in its `apex-account-css`). We fix the cause.
   ========================================================================== */
.woocommerce-account .ap-acc .woocommerce-MyAccount-navigation,
.woocommerce-account .ap-acc .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce-MyAccount-navigation.ap-acc__nav,
.woocommerce-account .woocommerce-MyAccount-content.ap-acc__content {
	float: none;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
	min-width: 0;
}

/* Clear Woo's `.col2-set` / `.u-columns` float scaffolding inside the account. */
.woocommerce-account .ap-acc::after {
	content: "";
	display: block;
	clear: both;
}


/* ==========================================================================
   1. Shared tokens + primitives
   ========================================================================== */
.ap-acc,
.ap-login,
.ap-checkout-signin {
	--apa-font: var(--ap-font, 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
	--apa-bg: var(--ap-bg, #ffffff);
	--apa-cream: var(--ap-cream, #f4f6fa);
	--apa-cream-2: var(--ap-cream-2, #eceff6);
	--apa-line: var(--ap-line, #e2e6ed);
	--apa-line-2: var(--ap-line-2, #c7cdd8);
	--apa-ink: var(--ap-ink, #0b1322);
	--apa-ink-2: var(--ap-ink-2, #3a4458);
	--apa-ink-3: var(--ap-ink-3, #6e7890);
	--apa-ink-4: var(--ap-ink-4, #9aa6bd);
	--apa-dark: var(--ap-dark, #070f1e);
	--apa-dark-2: var(--ap-dark-2, #0c1828);
	--apa-dark-3: var(--ap-dark-3, #16243a);
	--apa-dark-line: var(--ap-dark-line, rgba(255, 255, 255, 0.08));
	--apa-dark-ink: var(--ap-dark-ink, #f2f5fa);
	--apa-dark-ink-2: var(--ap-dark-ink-2, #9aa6bd);
	--apa-dark-ink-3: #6b7894;
	--apa-blue: var(--ap-blue, #2563eb);
	--apa-blue-2: var(--ap-blue-2, #1d4ed8);
	--apa-blue-grad: var(--ap-blue-grad, linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%));
	--apa-green: var(--ap-green, #1fab57);
	--apa-green-2: var(--ap-green-2, #16933f);
	--apa-radius: var(--ap-radius, 14px);
	--apa-radius-sm: 10px;
	--apa-shadow: var(--ap-shadow, 0 12px 36px rgba(7, 15, 30, 0.08));
	--apa-rail: 272px;
}

.ap-acc *,
.ap-login * {
	box-sizing: border-box;
}

/* ---- Buttons (shared by the account screens) ---- */
.ap-acc__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--apa-font);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1;
	padding: 13px 26px;
	border-radius: 999px;
	border: 1px solid transparent;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease,
		border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.ap-acc__btn--primary,
.ap-acc .woocommerce-MyAccount-content a.woocommerce-button.button.pay,
.ap-acc .woocommerce-MyAccount-content a.woocommerce-button.button.order-again {
	background-image: var(--apa-blue-grad);
	background-color: var(--apa-blue);
	color: #fff;
	box-shadow: 0 10px 22px rgba(37, 99, 235, 0.3);
}

.ap-acc__btn--primary:hover,
.ap-acc__btn--primary:focus-visible {
	color: #fff;
	filter: brightness(1.05);
	transform: translateY(-1px);
	box-shadow: 0 14px 28px rgba(37, 99, 235, 0.4);
}

.ap-acc__btn--ghost {
	background: #fff;
	color: var(--apa-ink-2);
	border-color: var(--apa-line-2);
	font-weight: 500;
}

.ap-acc__btn--ghost:hover,
.ap-acc__btn--ghost:focus-visible {
	background: var(--apa-cream);
	border-color: var(--apa-ink-3);
	color: var(--apa-ink);
}


/* ==========================================================================
   2. SPLIT-SCREEN SIGN-IN  (body.apex-login-screen / .apex-password-screen)

   The source hides the site header on these two screens and keeps the footer.
   `header[role="banner"]` is the source's own header signature (`.ap-hdr`), so
   both selectors are listed — whichever the P1 header ships, it is covered.
   ========================================================================== */
body.apex-login-screen header[role="banner"],
body.apex-password-screen header[role="banner"],
body.apex-login-screen .ap-hdr,
body.apex-password-screen .ap-hdr,
body.apex-login-screen .ap-promo,
body.apex-password-screen .ap-promo,
body.apex-login-screen .ap-hdr-spacer,
body.apex-password-screen .ap-hdr-spacer,
body.apex-login-screen #wpadminbar,
body.apex-password-screen #wpadminbar {
	display: none !important;
}

body.apex-login-screen,
body.apex-password-screen {
	--ap-fixed-header-offset: 0px;
	--ap-promo-h: 0px;
	margin-top: 0 !important;
	background: #fff;
	font-family: var(--ap-font, 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

/* Blow out any centred page wrapper the theme puts around a Woo screen, so the
   dark panel really does reach the viewport edge. Two belts:
   (a) a named list covering the usual suspects,
   (b) `:has()` for whatever wrapper actually ends up being the parent. */
/* ⚠ `.al-right` IS a <main>, so it MUST be excluded or this rule zeroes the white
   pane's own gutters. Measured 2026-10-27: it did, and the card went edge-to-edge
   at 390 (source has an 18px gutter) and lost its 57.6px gutter at 1440. */
body.apex-login-screen :is(main, article, .entry-content, .site-main, .content-area,
	.ap-main, .ap-container, .ap-wrap, .container):not(.al-right):not(.al-left),
body.apex-password-screen :is(main, article, .entry-content, .site-main, .content-area,
	.ap-main, .ap-container, .ap-wrap, .container):not(.al-right):not(.al-left) {
	max-width: none !important;
	width: auto !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.apex-login-screen *:has(> .ap-login),
body.apex-password-screen *:has(> .ap-login) {
	max-width: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* ---- Shell ---- */
.ap-login.al-shell {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	min-height: 100vh;
	/* the hard colour split the source makes at 51.2% */
	background: linear-gradient(
		to right,
		var(--apa-dark) 0%,
		var(--apa-dark) 51.2%,
		#fff 51.2%,
		#fff 100%
	);
	position: relative;
	/* The source's own login block declares body 15/1.5, but its sitewide sheet
	   loads later and wins with 16/1.65 — which is what actually renders
	   (measured: bodyFs 16px, bodyLh 26.4px). Reproduce the RENDERED value. */
	font-size: 16px;
	line-height: 1.65;
	color: var(--apa-ink);
}

/* ---- Left dark panel ---- */
.ap-login .al-left {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 56px clamp(40px, 5vw, 80px) 36px;
	color: var(--apa-dark-ink);
	background-color: var(--apa-dark);
	background-image: url("../img/ap-login-bg-dna.webp");
	background-size: cover;
	background-position: center right;
	background-repeat: no-repeat;
	overflow: hidden;
	isolation: isolate;
}

.ap-login .al-left::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		105deg,
		rgba(7, 15, 30, 0.92) 0%,
		rgba(7, 15, 30, 0.65) 38%,
		rgba(7, 15, 30, 0.2) 70%,
		rgba(7, 15, 30, 0) 100%
	);
	pointer-events: none;
	z-index: 1;
}

.ap-login .al-left > * {
	position: relative;
	z-index: 3;
}

.ap-login .al-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	align-self: flex-start;
	text-decoration: none;
	color: inherit;
	margin-bottom: clamp(36px, 6vh, 76px);
}

.ap-login .al-brand__logo {
	display: block;
	height: 70px;
	width: auto;
	max-width: 360px;
}

/* Fallback when only the colour logo exists — whiten it on the dark panel. */
.ap-login .al-brand__logo[src*="side-color"] {
	filter: brightness(0) invert(1);
}

.ap-login .al-brand__text {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--apa-dark-ink);
}

.ap-login .al-stock {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 7px 14px 7px 12px;
	margin: 0 0 22px;
	border: 1px solid rgba(31, 171, 87, 0.22);
	border-radius: 999px;
	background: rgba(31, 171, 87, 0.08);
	color: var(--apa-dark-ink-2);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.ap-login .al-stock__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--apa-green);
	box-shadow: 0 0 0 4px rgba(31, 171, 87, 0.18);
	animation: apaPulse 2.2s ease-in-out infinite;
	flex: none;
}

.ap-login .al-stock em {
	font-style: normal;
	color: var(--apa-green);
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 0.04em;
}

@keyframes apaPulse {
	0% { box-shadow: 0 0 0 0 rgba(31, 171, 87, 0.45); }
	70% { box-shadow: 0 0 0 10px rgba(31, 171, 87, 0); }
	100% { box-shadow: 0 0 0 0 rgba(31, 171, 87, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.ap-login .al-stock__dot { animation: none; }
}

.ap-login .al-eyebrow {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--apa-dark-ink-2);
	margin-bottom: 18px;
}

.ap-login .al-headline {
	font-size: clamp(38px, 4.8vw, 60px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--apa-dark-ink);
	margin: 0 0 18px;
	max-width: 460px;
}

.ap-login .al-headline em {
	color: var(--apa-green);
	font-style: italic;
	font-weight: 600;
}

.ap-login .al-sub {
	color: var(--apa-dark-ink-2);
	font-size: 17.5px;
	/* No line-height: the source inherits 1.65 here (measured 26.4px at 16px).
	   Declaring 1.5 made the paragraph 7px short of the source at every width. */
	margin: 0 0 36px;
	max-width: 420px;
}

/* ---- Researchers stat tile ---- */
.ap-login .al-stat {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 22px;
	margin: 0 0 36px;
	padding: 16px 22px;
	background: rgba(255, 255, 255, 0.025);
	border: 1px solid var(--apa-dark-line);
	border-radius: var(--apa-radius-sm);
	max-width: 480px;
	position: relative;
	overflow: hidden;
}

.ap-login .al-stat::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: linear-gradient(180deg, var(--apa-green), rgba(31, 171, 87, 0.2));
}

.ap-login .al-stat__num {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	padding-right: 22px;
	border-right: 1px solid var(--apa-dark-line);
}

.ap-login .al-stat__big {
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--apa-dark-ink);
	line-height: 1;
}

.ap-login .al-stat__big em {
	font-style: normal;
	color: var(--apa-green);
	font-weight: 800;
}

.ap-login .al-stat__spark {
	width: 60px;
	height: 18px;
	color: var(--apa-green);
	margin-bottom: 4px;
}

/* ⚠ The SOURCE renders this one label in the system stack, not Outfit — its own
   `b` never inherits the brand face — so 13.5px/600 fits on one line there. In
   real Outfit the same string needs 200.7px against 199.7px of column: it misses
   by ONE pixel and wraps, making the tile 17px taller than the source's 69px.
   We keep the brand face and the 13.5px scale and buy the pixel back with a
   slightly tighter track. Measured, not guessed. */
.ap-login .al-stat__lbl b {
	display: block;
	color: var(--apa-dark-ink);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.25;
	margin-bottom: 3px;
	letter-spacing: -0.014em;
}

.ap-login .al-stat__lbl span {
	display: block;
	color: var(--apa-dark-ink-2);
	font-size: 11.5px;
	line-height: 1.4;
}

/* ---- Pillars ---- */
.ap-login .al-pillars {
	list-style: none;
	padding: 0;
	margin: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 480px;
}

.ap-login .al-pillars li {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px;
	background: var(--apa-dark-3);
	border: 1px solid var(--apa-dark-line);
	border-radius: var(--apa-radius-sm);
	position: relative;
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.35s ease,
		border-color 0.35s ease, box-shadow 0.35s ease;
}

.ap-login .al-pillars li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--apa-green);
	border-top-left-radius: var(--apa-radius-sm);
	border-bottom-left-radius: var(--apa-radius-sm);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ap-login .al-pillars li:hover {
	transform: translateX(6px);
	background: linear-gradient(180deg, rgba(31, 171, 87, 0.1), rgba(31, 171, 87, 0.04)),
		var(--apa-dark-3);
	border-color: rgba(31, 171, 87, 0.42);
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(31, 171, 87, 0.18);
}

.ap-login .al-pillars li:hover::before { transform: scaleY(1); }

.ap-login .al-pillars__head {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ap-login .al-pillars__chk {
	position: relative;
	display: inline-block;
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	background: rgba(31, 171, 87, 0.18);
	border: 1px solid rgba(31, 171, 87, 0.36);
	color: var(--apa-green);
	transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.ap-login .al-pillars li:hover .al-pillars__chk {
	background: rgba(31, 171, 87, 0.3);
	border-color: rgba(31, 171, 87, 0.65);
	transform: scale(1.08);
}

.ap-login .al-pillars__chk svg {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	transform: translate(-50%, -50%);
	display: block;
	overflow: visible;
}

.ap-login .al-pillars b {
	flex: 1;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.015em;
	color: var(--apa-dark-ink);
	line-height: 1.18;
}

.ap-login .al-pillars__body {
	margin: 0;
	padding-left: 48px;
	font-size: 14px;
	color: var(--apa-dark-ink-2);
	line-height: 1.55;
}

.ap-login .al-foot {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--apa-dark-line);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 12px;
	color: var(--apa-dark-ink-3);
}

/* ---- Right white pane ---- */
.ap-login .al-right {
	background: #fff;
	padding: clamp(40px, 6vw, 84px) clamp(32px, 5vw, 80px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.ap-login .al-card {
	width: 100%;
	max-width: 540px;
}

.ap-login .al-card--boxed {
	padding: clamp(30px, 4vw, 52px);
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius-sm);
	background: #fff;
	box-shadow: 0 18px 48px rgba(7, 15, 30, 0.14);
}

.ap-login .al-card--confirm { text-align: center; }

.ap-login .al-tick {
	display: inline-grid;
	place-items: center;
	width: 54px;
	height: 54px;
	margin: 0 auto 18px;
	border-radius: 999px;
	background: rgba(31, 171, 87, 0.12);
	border: 1px solid rgba(31, 171, 87, 0.32);
	color: var(--apa-green-2);
}

.ap-login .al-tick svg { width: 26px; height: 26px; }

.ap-login .al-kicker {
	margin: 0 0 8px;
	color: var(--apa-blue);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.ap-login .al-card__title {
	margin: 0 0 18px;
	color: var(--apa-ink);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.ap-login .al-lede {
	margin: 0 0 22px;
	color: var(--apa-ink-2);
	font-size: 15px;
	line-height: 1.6;
}

/* ---- Notices inside the card ---- */
.ap-login .al-notices:empty { display: none; }

.ap-login .al-notices .woocommerce-error,
.ap-login .al-notices .woocommerce-message,
.ap-login .al-notices .woocommerce-info {
	list-style: none;
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: var(--apa-radius-sm);
	border: 1px solid transparent;
	font-size: 14px;
	line-height: 1.5;
	background: rgba(31, 171, 87, 0.06);
	border-color: rgba(31, 171, 87, 0.3);
	color: #166534;
}

.ap-login .al-notices .woocommerce-error {
	background: rgba(220, 38, 38, 0.06);
	border-color: rgba(220, 38, 38, 0.32);
	color: #991b1b;
}

.ap-login .al-notices li { margin: 0 0 4px; }
.ap-login .al-notices li:last-child { margin-bottom: 0; }
.ap-login .al-notices .button { display: none; }

/* ---- Pill tabs ---- */
.ap-login .al-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 0 0 28px;
	padding: 6px;
	background: var(--apa-cream);
	border-radius: 999px;
	position: relative;
	isolation: isolate;
}

.ap-login .al-tabs::before {
	content: "";
	position: absolute;
	top: 6px;
	bottom: 6px;
	left: 6px;
	width: calc(50% - 6px);
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 1px 2px rgba(7, 15, 30, 0.06), 0 6px 14px rgba(7, 15, 30, 0.1);
	transform: translateX(0);
	transition: transform 0.42s cubic-bezier(0.2, 0.85, 0.3, 1);
	z-index: 0;
}

.ap-login .al-tabs[data-active="signin"]::before { transform: translateX(100%); }

.ap-login .al-tab {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	padding: 16px 0;
	font: inherit;
	font-weight: 600;
	font-size: 17px;
	color: var(--apa-ink-3);
	cursor: pointer;
	border-radius: 999px;
	position: relative;
	z-index: 1;
	transition: color 0.35s ease, transform 0.25s ease;
}

.ap-login .al-tab[aria-selected="true"] { color: var(--apa-ink); }
.ap-login .al-tab:hover:not([aria-selected="true"]) { color: var(--apa-ink-2); }
.ap-login .al-tab:active { transform: scale(0.98); }

.ap-login .al-pane[hidden] { display: none; }

/* ---- Forms ---- */
.ap-login .al-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ap-login .al-field {
	display: flex;
	flex-direction: column;
	width: 100%;
	float: none;
	margin: 0;
	padding: 0;
}

.ap-login .al-form label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--apa-ink-2);
	margin-bottom: 8px;
}

.ap-login .al-opt,
.ap-login .al-form .al-opt {
	font-weight: 500;
	color: var(--apa-ink-3);
}

/* ⚠ FIELD HEIGHT IS PINNED, not padding-derived.
   The source declares `padding: 17px 18px` but Blocksy's `--theme-form-field-height`
   clamps every text field to a hard 40px border-box, so 40px is what actually
   renders at BOTH 1440 and 390 (measured: cssHeight 40px, clientH 39, padding
   14px/13px — i.e. the declared padding overflows its own box). We reproduce the
   RENDERED 40px with honest zero vertical padding instead of inheriting a broken
   box from a theme we do not ship. Horizontal padding stays the source's. */
.ap-login .al-input {
	width: 100%;
	height: 40px;
	padding: 0 18px;
	background: var(--apa-cream);
	border: 1px solid transparent;
	border-radius: 12px;
	font: inherit;
	font-size: 16px;
	color: var(--apa-ink);
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ap-login .al-input::placeholder { color: var(--apa-ink-3); }
.ap-login .al-input:hover { background: var(--apa-cream-2); }

.ap-login .al-input:focus {
	outline: none;
	background: #fff;
	border-color: var(--apa-blue);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 1px 2px rgba(7, 15, 30, 0.04);
}

.ap-login .al-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 0;
	margin-top: 4px;
}

.ap-login .al-check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
	font-size: 15px;
	font-weight: 500;
	color: var(--apa-ink-2);
	line-height: 1;
	margin: 0;
}

.ap-login .al-check input {
	width: 18px;
	height: 18px;
	accent-color: var(--apa-blue);
	margin: 0;
	flex: none;
}

.ap-login .al-link {
	color: var(--apa-blue);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.ap-login .al-link:hover { text-decoration: underline; }

.ap-login .al-age,
.ap-login .al-optin {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	border-radius: var(--apa-radius-sm);
	font-size: 13px;
	line-height: 1.45;
	color: var(--apa-ink-2);
	cursor: pointer;
	font-weight: 500;
	margin: 0;
}

.ap-login .al-age {
	padding: 14px 16px;
	background: rgba(37, 99, 235, 0.05);
	border: 1px solid rgba(37, 99, 235, 0.18);
	margin: 6px 0 4px;
}

.ap-login .al-optin {
	padding: 12px 16px;
	background: rgba(15, 23, 42, 0.03);
	border: 1px solid rgba(15, 23, 42, 0.1);
	margin: 0 0 4px;
}

.ap-login .al-age input,
.ap-login .al-optin input {
	margin-top: 2px;
	width: 18px;
	height: 18px;
	accent-color: var(--apa-blue);
	flex: none;
}

.ap-login .al-submit {
	display: block;
	width: 100%;
	padding: 19px 26px;
	border: 0;
	cursor: pointer;
	background: var(--apa-blue-grad);
	color: #fff;
	font-family: var(--apa-font);
	font-weight: 700;
	font-size: 17px;
	/* Buttons do not inherit line-height — the source's does (measured 25.575px
	   = 15.5 x 1.65). Declare it or the CTA renders ~6px shorter than the source. */
	line-height: 1.65;
	letter-spacing: 0.01em;
	border-radius: 16px;
	margin-top: 14px;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34), 0 2px 6px rgba(37, 99, 235, 0.14),
		inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.ap-login .al-submit:hover {
	color: #fff;
	filter: brightness(1.07);
	transform: translateY(-1px);
	box-shadow: 0 16px 38px rgba(37, 99, 235, 0.44), 0 2px 6px rgba(37, 99, 235, 0.18),
		inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.ap-login .al-submit:active { transform: translateY(0); }

/* ---- Trust row + fine print ---- */
.ap-login .al-trust {
	list-style: none;
	margin: 26px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--apa-line);
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px 22px;
}

.ap-login .al-trust li {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	font-weight: 500;
	color: var(--apa-ink-3);
}

.ap-login .al-trust svg {
	width: 14px;
	height: 14px;
	color: var(--apa-ink-3);
	opacity: 0.85;
	flex: none;
}

.ap-login .al-fine {
	font-size: 13px;
	color: var(--apa-ink-3);
	text-align: center;
	margin-top: 16px;
	line-height: 1.6;
}

.ap-login .al-fine a {
	color: var(--apa-blue);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.ap-login .al-fine a:hover { color: var(--apa-blue-2); text-decoration-thickness: 2px; }
.ap-login .al-fine--back { margin-top: 20px; }

.ap-login .al-submit--link { margin-top: 22px; }

/* ---- Desktop fit-to-viewport (source behaviour: the panel fits one screen,
        but the page still scrolls to the sitewide footer) ---- */
@media (min-height: 720px) and (min-width: 881px) {
	body.apex-login-screen,
	body.apex-password-screen {
		overflow-x: hidden;
	}

	.ap-login.al-shell {
		min-height: 100vh;
		height: 100vh;
		max-height: 100vh;
		overflow: hidden;
	}

	.ap-login .al-left {
		padding: clamp(20px, 2.5vh, 36px) clamp(36px, 4.5vw, 72px) clamp(16px, 2vh, 28px);
		overflow: hidden;
		min-height: 0;
	}

	.ap-login .al-right {
		padding: clamp(24px, 3vh, 48px) clamp(28px, 4vw, 64px);
		overflow-y: auto;
		min-height: 0;
	}

	.ap-login .al-input { padding: 0 16px; font-size: 15px; }
	.ap-login .al-brand { margin-bottom: clamp(12px, 2vh, 28px); }
	.ap-login .al-brand__logo { height: clamp(46px, 6vh, 60px); }
	.ap-login .al-eyebrow { margin-bottom: clamp(8px, 1vh, 14px); }
	.ap-login .al-headline {
		font-size: clamp(30px, 3.6vw, 50px);
		margin: 0 0 clamp(8px, 1.2vh, 14px);
	}
	.ap-login .al-sub { margin: 0 0 clamp(14px, 2vh, 26px); font-size: 16px; }
	.ap-login .al-stat { margin-bottom: clamp(12px, 2vh, 22px); }
	.ap-login .al-pillars { gap: clamp(6px, 0.9vh, 10px); }
	.ap-login .al-pillars li { padding: clamp(10px, 1.5vh, 16px) clamp(14px, 1.6vw, 18px); }
	.ap-login .al-pillars b { font-size: clamp(15px, 1.4vw, 18px); }
	.ap-login .al-pillars__body { font-size: 13px; line-height: 1.5; padding-left: 44px; }
	.ap-login .al-foot { margin-top: clamp(12px, 2vh, 24px); padding-top: clamp(10px, 1.5vh, 20px); }
	.ap-login .al-card { max-width: 480px; }
	.ap-login .al-tabs { margin: 0 0 clamp(14px, 2vh, 22px); }
	.ap-login .al-tab { padding: clamp(11px, 1.4vh, 14px) 0; font-size: 16px; }
	.ap-login .al-form { gap: clamp(10px, 1.4vh, 14px); }
	.ap-login .al-age { padding: clamp(10px, 1.4vh, 14px) 14px; font-size: 13px; }
	.ap-login .al-submit { padding: clamp(14px, 1.8vh, 16px) 22px; font-size: 15.5px; margin-top: 6px; }
	.ap-login .al-trust {
		margin-top: clamp(10px, 1.4vh, 16px);
		padding-top: clamp(10px, 1.4vh, 16px);
	}
	.ap-login .al-fine { font-size: 11.5px; margin-top: clamp(8px, 1.2vh, 14px); }
}

/* ---- Mobile: dark hero band, white sheet pulled up over it ---- */
@media (max-width: 880px) {
	/* ⚠ min-height STAYS 100vh. The two auto rows then share the leftover space
	   equally (align-content: stretch), which is exactly how the source gets its
	   300px dark band above a 558px white sheet at 390x844. Dropping it collapsed
	   the shell to 615px and left the page white below the fold. */
	.ap-login.al-shell {
		grid-template-columns: 1fr;
		background: var(--apa-dark);
		min-height: 100vh;
		height: auto;
		max-height: none;
		overflow: visible;
	}

	body.apex-login-screen,
	body.apex-password-screen { background: var(--apa-dark); }

	.ap-login .al-left {
		padding: 14px 20px 12px;
		min-height: auto;
	}

	.ap-login .al-brand { margin: 0 0 10px; }
	.ap-login .al-brand__logo { height: 38px; }

	.ap-login .al-stock,
	.ap-login .al-eyebrow,
	.ap-login .al-pillars,
	.ap-login .al-foot,
	.ap-login .al-stat { display: none; }

	.ap-login .al-headline {
		font-size: 30px;
		line-height: 1.15;
		margin: 0 0 6px;
	}

	.ap-login .al-headline em { font-size: 22px; line-height: 1.2; }

	.ap-login .al-sub {
		font-size: 15px;
		line-height: 1.45;
		margin: 0 0 4px;
		max-width: none;
	}

	.ap-login .al-right {
		background: #fff;
		border-top-left-radius: 22px;
		border-top-right-radius: 22px;
		margin-top: -14px;
		position: relative;
		z-index: 1;
		padding: 18px 18px 28px;
		justify-content: flex-start;
	}

	.ap-login .al-card { max-width: 100%; }
	.ap-login .al-card--boxed {
		padding: 22px 18px;
		border: 0;
		box-shadow: none;
	}

	.ap-login .al-tabs { margin: 0 0 14px; padding: 4px; }
	.ap-login .al-tab { padding: 11px 0; font-size: 15px; }

	.ap-login .al-form { gap: 12px; }
	.ap-login .al-form label { font-size: 13px; margin-bottom: 5px; }
	.ap-login .al-input { padding: 0 14px; font-size: 16px; }
	.ap-login .al-row { padding: 0; margin-top: 2px; }
	.ap-login .al-submit { padding: 15px 22px; font-size: 15.5px; margin-top: 8px; }
	.ap-login .al-age { padding: 11px 14px; font-size: 12.5px; }
	.ap-login .al-optin { padding: 10px 14px; font-size: 12.5px; }
	.ap-login .al-trust { display: none; }
	.ap-login .al-fine { font-size: 12px; margin-top: 14px; line-height: 1.45; }
}


/* ==========================================================================
   3. LOGGED-IN ACCOUNT — grid, rail, content
   ========================================================================== */
.ap-acc {
	display: grid;
	grid-template-columns: var(--apa-rail) minmax(0, 1fr);
	gap: 30px;
	align-items: start;
	max-width: var(--ap-max, 1280px);
	margin: clamp(26px, 4vw, 48px) auto clamp(48px, 7vw, 86px);
	padding: 0 var(--ap-gut, clamp(20px, 4vw, 56px));
	font-family: var(--apa-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--apa-ink-2);
}

/* 769–991px: Woo's smallscreen reset has NOT kicked in here. The rail stacks,
   but as a real full-width block — not an 84px shrink-wrapped stub. This is the
   band that is always missed. */
@media (max-width: 991px) {
	.ap-acc {
		grid-template-columns: minmax(0, 1fr);
		gap: 26px;
	}
}

/* ---- Rail ---- */
.ap-acc__nav {
	position: sticky;
	top: calc(var(--ap-fixed-header-offset, 94px) + 16px);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

@media (max-width: 991px) {
	.ap-acc__nav { position: static; top: auto; }
}

.ap-acc__who {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	background: var(--apa-cream);
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
}

.ap-acc__who-avatar {
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 999px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--apa-line);
	display: inline-grid;
	place-items: center;
}

.ap-acc__who-img,
.ap-acc__who-avatar img {
	width: 46px;
	height: 46px;
	display: block;
	border-radius: 999px;
}

.ap-acc__who-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 1px;
}

.ap-acc__who-hi {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--apa-ink-4);
}

.ap-acc__who-name {
	font-size: 15px;
	font-weight: 700;
	color: var(--apa-ink);
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ap-acc__who-biz,
.ap-acc__who-mail {
	font-size: 12px;
	color: var(--apa-ink-3);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---- Nav menu ---- */
.ap-acc__menu {
	list-style: none;
	margin: 0;
	padding: 6px;
	background: #fff;
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	box-shadow: 0 6px 18px rgba(12, 24, 48, 0.05);
}

.ap-acc__menu li { margin: 0; list-style: none; }

.ap-acc__menu li + li { border-top: 1px solid var(--apa-line); }

.ap-acc__menu a {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 13px 14px;
	border-radius: 10px;
	color: var(--apa-ink-2);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	/* Labels NEVER wrap — a wrapped label is the second symptom of the rail bug. */
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ap-acc__menu-ico {
	flex: none;
	width: 20px;
	height: 20px;
	display: inline-grid;
	place-items: center;
	color: var(--apa-ink-4);
	transition: color 0.15s ease;
}

.ap-acc__menu-ico svg { width: 20px; height: 20px; display: block; }

.ap-acc__menu-label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ap-acc__menu-chev {
	flex: none;
	width: 15px;
	height: 15px;
	opacity: 0.45;
	transform: translateX(0);
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.ap-acc__menu-chev svg { width: 15px; height: 15px; display: block; }

.ap-acc__menu a:hover {
	background: var(--apa-cream);
	color: var(--apa-blue);
}

.ap-acc__menu a:hover .ap-acc__menu-ico { color: var(--apa-blue); }
.ap-acc__menu a:hover .ap-acc__menu-chev { opacity: 0.9; transform: translateX(2px); }

.ap-acc__menu .is-active > a,
.ap-acc__menu li.woocommerce-MyAccount-navigation-link.is-active > a,
.ap-acc__menu a[aria-current="page"] {
	background-image: var(--apa-blue-grad);
	background-color: var(--apa-blue);
	color: #fff;
	box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.ap-acc__menu .is-active > a .ap-acc__menu-ico,
.ap-acc__menu a[aria-current="page"] .ap-acc__menu-ico { color: #fff; }

.ap-acc__menu .is-active > a .ap-acc__menu-chev,
.ap-acc__menu a[aria-current="page"] .ap-acc__menu-chev { opacity: 0.85; }

.ap-acc__nav-item--customer-logout > a { color: #b42318; }
.ap-acc__nav-item--customer-logout > a:hover { background: #fdecea; color: #b42318; }
.ap-acc__nav-item--customer-logout > a:hover .ap-acc__menu-ico { color: #b42318; }

/* ---- Help card ---- */
.ap-acc__help {
	padding: 16px;
	background: #fff;
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
}

.ap-acc__help-title {
	display: block;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--apa-ink-4);
	margin-bottom: 8px;
}

.ap-acc__help-body {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--apa-ink-3);
}

.ap-acc__help-row {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--apa-blue);
	text-decoration: none;
	word-break: break-word;
}

.ap-acc__help-row + .ap-acc__help-row { margin-top: 5px; }
.ap-acc__help-row:hover { text-decoration: underline; }


/* ==========================================================================
   4. Content column — headings, panels, empties
   ========================================================================== */
.ap-acc__content { min-width: 0; }

.ap-acc__head {
	margin: 0 0 6px;
	font-size: clamp(24px, 2.6vw, 30px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.12;
	color: var(--apa-ink);
}

.ap-acc__lede {
	margin: 0 0 22px;
	font-size: 15px;
	color: var(--apa-ink-3);
	line-height: 1.6;
}

/* ---- Dashboard greeting band ---- */
.ap-acc__hello {
	position: relative;
	padding: clamp(22px, 3vw, 32px);
	border-radius: var(--apa-radius);
	background-color: var(--apa-dark);
	background-image: linear-gradient(
			105deg,
			rgba(7, 15, 30, 0.93) 0%,
			rgba(7, 15, 30, 0.72) 48%,
			rgba(7, 15, 30, 0.3) 100%
		),
		url("../img/ap-login-bg-dna.webp");
	background-size: cover;
	background-position: center right;
	color: var(--apa-dark-ink);
	overflow: hidden;
	margin: 0 0 18px;
}

.ap-acc__hello-eyebrow {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--apa-green);
}

.ap-acc__hello-title {
	margin: 0 0 8px;
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--apa-dark-ink);
}

.ap-acc__hello-sub {
	margin: 0;
	max-width: 56ch;
	font-size: 15px;
	line-height: 1.6;
	color: var(--apa-dark-ink-2);
}

.ap-acc__hello-meta {
	margin: 12px 0 0;
	font-size: 13px;
	color: var(--apa-dark-ink-3);
}

.ap-acc__hello-meta a { color: var(--apa-green); font-weight: 600; text-decoration: none; }
.ap-acc__hello-meta a:hover { text-decoration: underline; }

/* ---- Stat tiles ---- */
.ap-acc__stats {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

@media (max-width: 600px) {
	.ap-acc__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ap-acc__stats li:last-child { grid-column: 1 / -1; }
}

.ap-acc__stat a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ap-acc__stat a:hover {
	border-color: var(--apa-line-2);
	box-shadow: 0 12px 26px rgba(12, 24, 48, 0.08);
	transform: translateY(-1px);
}

.ap-acc__stat-n {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.05;
	color: var(--apa-ink);
}

.ap-acc__stat-n .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; }

.ap-acc__stat-l {
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--apa-ink-3);
}

/* ---- Panels ---- */
.ap-acc__panel { margin: 0 0 24px; }

.ap-acc__panel-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	margin: 0 0 12px;
}

.ap-acc__panel-title {
	margin: 0;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--apa-ink);
}

.ap-acc__panel-more {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--apa-blue);
	text-decoration: none;
	white-space: nowrap;
}

.ap-acc__panel-more:hover { text-decoration: underline; }

/* ---- Quick links ---- */
.ap-acc__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

@media (max-width: 600px) {
	.ap-acc__links { grid-template-columns: minmax(0, 1fr); }
}

.ap-acc__links a {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 15px 18px;
	background: #fff;
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ap-acc__links a:hover {
	border-color: var(--apa-blue);
	box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.ap-acc__links span {
	font-size: 15px;
	font-weight: 700;
	color: var(--apa-ink);
}

.ap-acc__links small {
	font-size: 12.5px;
	color: var(--apa-ink-3);
	line-height: 1.45;
}

/* ---- Empty states ---- */
.ap-acc__empty {
	padding: clamp(26px, 4vw, 40px);
	background: var(--apa-cream);
	border: 1px dashed var(--apa-line-2);
	border-radius: var(--apa-radius);
	text-align: center;
}

.ap-acc__empty-title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 800;
	color: var(--apa-ink);
}

.ap-acc__empty-sub {
	margin: 0 0 18px;
	font-size: 14.5px;
	color: var(--apa-ink-3);
	line-height: 1.6;
}


/* ==========================================================================
   5. ORDER CARDS — the source's own order-history look
      (restyle target of its `apex-account-css`: .wcmam-order-card /
       .wcmam-order-header .status / .product-thumb / .order-arrow)
   ========================================================================== */
.ap-ord-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 22px;
	padding: 0;
}

.ap-ord-filters__btn {
	appearance: none;
	-webkit-appearance: none;
	font-family: var(--apa-font);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: var(--apa-ink-2);
	background: #fff;
	border: 1px solid var(--apa-line);
	border-radius: 999px;
	padding: 9px 16px;
	margin: 0;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.15s ease;
}

.ap-ord-filters__btn:hover {
	border-color: var(--apa-blue);
	color: var(--apa-blue);
}

.ap-ord-filters__btn.is-active {
	background: var(--apa-blue);
	border-color: var(--apa-blue);
	color: #fff;
	box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.ap-ord-list { width: 100%; }

.ap-ord {
	background: #fff;
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	box-shadow: 0 6px 18px rgba(12, 24, 48, 0.05);
	margin: 0 0 16px;
	overflow: hidden;
	transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.ap-ord:hover {
	border-color: var(--apa-line-2);
	box-shadow: 0 14px 30px rgba(12, 24, 48, 0.1);
}

.ap-ord__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 18px;
	background: var(--apa-cream);
	border-bottom: 1px solid var(--apa-line);
}

.ap-ord__status {
	display: inline-flex;
	align-items: center;
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	padding: 6px 12px;
	border-radius: 999px;
	color: var(--apa-ink-2);
	background: var(--apa-cream-2);
	border: 1px solid var(--apa-line);
}

/* Status colours — exactly the source's set. */
.ap-ord__status--completed { color: #0e7a38; background: #e7f6ed; border-color: #bbe6c9; }
.ap-ord__status--processing { color: #1d4ed8; background: #e7eefe; border-color: #c3d4fb; }
.ap-ord__status--pending,
.ap-ord__status--on-hold { color: #92610a; background: #fef3da; border-color: #f6dfa6; }
.ap-ord__status--cancelled,
.ap-ord__status--failed { color: #b42318; background: #fdecea; border-color: #f7c7c1; }
.ap-ord__status--refunded,
.ap-ord__status--checkout-draft { color: #475467; background: #eef1f5; border-color: #dce1e9; }

.ap-ord__date {
	font-size: 13px;
	font-weight: 500;
	color: var(--apa-ink-3);
	white-space: nowrap;
}

.ap-ord__body {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 16px 18px;
}

/* THE SOURCE'S CORE FIX: cap the runaway product thumbnails at 66px. */
.ap-ord__thumb {
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: 66px;
	gap: 6px;
	align-items: start;
	align-content: start;
	width: 66px;
}

.ap-ord__thumb img {
	width: 66px;
	height: 66px;
	min-width: 66px;
	max-width: 66px;
	box-sizing: border-box;
	object-fit: contain;
	background: var(--apa-cream);
	border: 1px solid var(--apa-line);
	border-radius: 12px;
	padding: 4px;
	display: block;
	margin: 0;
}

.ap-ord__details { flex: 1 1 auto; min-width: 0; }

.ap-ord__details h4 {
	margin: 0 0 2px;
	padding: 0;
	line-height: 1.2;
	font-size: 15px;
	font-weight: 700;
}

.ap-ord__details h4 a {
	color: var(--apa-blue);
	text-decoration: none;
	font-weight: 700;
}

.ap-ord__details h4 a:hover { text-decoration: underline; }

.ap-ord__total {
	margin: 0;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--apa-ink-3);
}

.ap-ord__total .amount,
.ap-ord__total .woocommerce-Price-amount {
	color: var(--apa-ink);
	font-weight: 700;
}

.ap-ord__go { flex: 0 0 auto; margin-left: auto; }

.ap-ord__go a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	background: #fff;
	color: var(--apa-blue);
	border: 1px solid var(--apa-line);
	text-decoration: none;
	transition: all 0.15s ease;
}

.ap-ord__go a:hover {
	background: var(--apa-blue);
	color: #fff;
	border-color: var(--apa-blue);
	box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.ap-ord__go svg { width: 16px; height: 16px; display: block; }

.ap-ord__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0 18px 16px;
}

.ap-ord__actions .ap-acc__btn { font-size: 13.5px; padding: 10px 20px; }

.ap-ord-empty-filter {
	margin: 0 0 16px;
	padding: 18px;
	border: 1px dashed var(--apa-line-2);
	border-radius: var(--apa-radius);
	text-align: center;
	color: var(--apa-ink-3);
	font-size: 14px;
}

.ap-acc__pager {
	display: flex;
	gap: 10px;
	justify-content: flex-start;
	padding: 0;
	margin-top: 6px;
	border: 0;
}

.ap-acc__pager::before,
.ap-acc__pager::after { display: none; }

@media (max-width: 600px) {
	.ap-ord__head { padding: 11px 14px; }
	.ap-ord__body { flex-wrap: wrap; gap: 10px; padding: 14px; }
	.ap-ord__thumb { grid-template-columns: 56px; width: 56px; }
	.ap-ord__thumb img { width: 56px; height: 56px; min-width: 56px; max-width: 56px; }
	.ap-ord__details { flex: 1 1 120px; min-width: 0; }
	.ap-ord__details h4 { font-size: 14px; }
	.ap-ord__go { margin-left: auto; }
	.ap-ord__go a { width: 36px; height: 36px; }
	.ap-ord-filters { gap: 6px; }
	.ap-ord-filters__btn { font-size: 12px; padding: 7px 12px; }
}


/* ==========================================================================
   6. View order
   ========================================================================== */
.ap-ord-view__meta {
	margin: 0 0 22px;
	padding: 14px 18px;
	background: var(--apa-cream);
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	font-size: 15px;
	color: var(--apa-ink-2);
	line-height: 1.6;
}

.ap-ord-view__meta mark {
	background: none;
	color: var(--apa-ink);
	font-weight: 700;
}

.ap-ord-view__meta mark.order-status {
	font-size: 11.5px;
	vertical-align: 1px;
}

.ap-ord-view__notelist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ap-ord-view__notelist li {
	padding: 14px 18px;
	background: #fff;
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	margin: 0 0 10px;
}

.ap-ord-view__notelist .meta {
	margin: 0 0 4px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--apa-ink-4);
}

.ap-ord-view__notelist .description p { margin: 0 0 6px; font-size: 14.5px; color: var(--apa-ink-2); }
.ap-ord-view__notelist .description p:last-child { margin-bottom: 0; }

.ap-ord-view__back { margin: 24px 0 0; }

/* Woo's order-details table / addresses, kept in the house language. The
   checkout plugin's STANDARDS #12 overrides still win where they exist; this is
   the floor, so an un-overridden table never ships bare. */
.ap-acc__content .woocommerce-order-details,
.ap-acc__content .woocommerce-customer-details { margin: 0 0 24px; }

.ap-acc__content .woocommerce-order-details__title,
.ap-acc__content .woocommerce-column__title {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--apa-ink);
	margin: 0 0 12px;
}

.ap-acc__content table.woocommerce-table--order-details,
.ap-acc__content table.shop_table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	overflow: hidden;
	font-size: 14.5px;
	margin: 0 0 18px;
}

.ap-acc__content table.shop_table th,
.ap-acc__content table.shop_table td {
	padding: 13px 16px;
	text-align: left;
	border: 0;
	border-bottom: 1px solid var(--apa-line);
	vertical-align: top;
}

.ap-acc__content table.shop_table thead th {
	background: var(--apa-cream);
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--apa-ink-3);
}

.ap-acc__content table.shop_table tfoot th { font-weight: 700; color: var(--apa-ink); }
.ap-acc__content table.shop_table tr:last-child th,
.ap-acc__content table.shop_table tr:last-child td { border-bottom: 0; }

.ap-acc__content .woocommerce-columns--addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

@media (max-width: 600px) {
	.ap-acc__content .woocommerce-columns--addresses { grid-template-columns: minmax(0, 1fr); }
}

.ap-acc__content .woocommerce-columns--addresses .woocommerce-column {
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	width: auto;
	float: none;
}

.ap-acc__content .woocommerce-columns--addresses address {
	font-style: normal;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--apa-ink-2);
	border: 0;
	padding: 0;
}


/* ==========================================================================
   7. Addresses
   ========================================================================== */
.ap-acc__addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	width: auto;
}

@media (max-width: 600px) {
	.ap-acc__addresses { grid-template-columns: minmax(0, 1fr); }
}

.ap-acc__addresses::before,
.ap-acc__addresses::after { display: none; }

.ap-acc .ap-addr {
	float: none;
	width: auto;
	margin: 0;
	background: #fff;
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(12, 24, 48, 0.05);
}

.ap-addr__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 18px;
	background: var(--apa-cream);
	border-bottom: 1px solid var(--apa-line);
}

.ap-addr__head h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--apa-ink);
}

.ap-addr__edit {
	font-size: 13px;
	font-weight: 600;
	color: var(--apa-blue);
	text-decoration: none;
	white-space: nowrap;
}

.ap-addr__edit:hover { text-decoration: underline; }

.ap-addr__body {
	display: block;
	padding: 16px 18px;
	font-style: normal;
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--apa-ink-2);
}

.ap-addr__empty { color: var(--apa-ink-3); }


/* ==========================================================================
   8. Forms — edit address / account details
   ========================================================================== */
.ap-form {
	background: #fff;
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	padding: clamp(20px, 3vw, 28px);
	box-shadow: 0 6px 18px rgba(12, 24, 48, 0.05);
}

.ap-form--address .ap-acc__head { margin-bottom: 18px; }

.ap-form__set {
	border: 0;
	margin: 0 0 22px;
	padding: 0;
}

.ap-form__set > legend {
	padding: 0;
	margin: 0 0 14px;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--apa-ink-4);
}

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

@media (max-width: 600px) {
	.ap-form__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Neutralise Woo's form-row floats inside the grid. */
.ap-form .form-row,
.ap-form .woocommerce-form-row,
.ap-form .ap-form__row {
	float: none;
	width: auto;
	margin: 0 0 16px;
	padding: 0;
	display: block;
}

.ap-form .form-row-wide { grid-column: 1 / -1; }

.ap-form label {
	display: block;
	margin: 0 0 7px;
	font-size: 13px;
	font-weight: 700;
	color: var(--apa-ink-2);
}

.ap-form__opt,
.ap-form label .ap-form__opt {
	font-weight: 500;
	color: var(--apa-ink-3);
}

.ap-form .required { color: #b42318; border: 0; text-decoration: none; }

.ap-form input[type="text"],
.ap-form input[type="email"],
.ap-form input[type="tel"],
.ap-form input[type="password"],
.ap-form input[type="number"],
.ap-form textarea,
.ap-form select,
.ap-form .select2-container .select2-selection--single {
	width: 100%;
	min-height: 50px;
	padding: 13px 15px;
	background: var(--apa-cream);
	border: 1px solid transparent;
	border-radius: 12px;
	font-family: var(--apa-font);
	font-size: 15px;
	color: var(--apa-ink);
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ap-form input:hover,
.ap-form select:hover,
.ap-form textarea:hover { background: var(--apa-cream-2); }

.ap-form input:focus,
.ap-form select:focus,
.ap-form textarea:focus {
	outline: none;
	background: #fff;
	border-color: var(--apa-blue);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.ap-form .select2-container--default .select2-selection--single {
	height: auto;
	min-height: 50px;
	display: flex;
	align-items: center;
}

.ap-form .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 1.4;
	padding: 0;
	color: var(--apa-ink);
}

.ap-form .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100%;
	right: 10px;
}

.ap-form__hint,
.ap-form__hint em {
	display: block;
	margin-top: 6px;
	font-size: 12.5px;
	font-style: normal;
	color: var(--apa-ink-3);
	line-height: 1.5;
}

.ap-form__check {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 12px 15px;
	margin: 0 0 14px;
	background: rgba(15, 23, 42, 0.03);
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: var(--apa-radius-sm);
	font-size: 13.5px;
	font-weight: 500;
	color: var(--apa-ink-2);
	cursor: pointer;
	line-height: 1.45;
}

.ap-form__check input {
	margin-top: 2px;
	width: 18px;
	height: 18px;
	accent-color: var(--apa-blue);
	flex: none;
}

.ap-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin: 0;
	padding: 12px 15px;
	background: rgba(31, 171, 87, 0.06);
	border: 1px solid rgba(31, 171, 87, 0.22);
	border-radius: var(--apa-radius-sm);
	font-size: 13px;
	line-height: 1.5;
	color: #166534;
}

.ap-form__consent-ico {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 999px;
	background: rgba(31, 171, 87, 0.18);
	color: var(--apa-green-2);
}

.ap-form__consent-ico svg { width: 12px; height: 12px; }
.ap-form__consent em { font-style: normal; color: var(--apa-ink-3); }

.ap-form__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin: 6px 0 0;
}

.ap-form__cancel {
	font-size: 14px;
	font-weight: 600;
	color: var(--apa-ink-3);
	text-decoration: none;
}

.ap-form__cancel:hover { color: var(--apa-ink); text-decoration: underline; }

/* Woo prints its own notices at the top of edit-account / edit-address. */
.ap-acc__content .woocommerce-notices-wrapper:empty { display: none; }

.ap-acc__content .woocommerce-message,
.ap-acc__content .woocommerce-info,
.ap-acc__content .woocommerce-error {
	list-style: none;
	margin: 0 0 18px;
	padding: 13px 16px;
	border-radius: var(--apa-radius-sm);
	border: 1px solid rgba(31, 171, 87, 0.26);
	background: #f0fdf4;
	color: #14532d;
	font-size: 14.5px;
	line-height: 1.5;
}

.ap-acc__content .woocommerce-error {
	border-color: rgba(220, 38, 38, 0.26);
	background: #fef2f2;
	color: #991b1b;
}

.ap-acc__content .woocommerce-message::before,
.ap-acc__content .woocommerce-info::before,
.ap-acc__content .woocommerce-error::before { display: none; }

.ap-acc__content .woocommerce-message .button,
.ap-acc__content .woocommerce-info .button { display: none; }


/* ==========================================================================
   9. The checkout sign-in note (OQ-1 — a LINK, never a gate)
   ========================================================================== */
.ap-checkout-signin {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 22px;
	padding: 13px 18px;
	background: var(--apa-cream);
	border: 1px solid var(--apa-line);
	border-radius: var(--apa-radius);
	font-family: var(--apa-font);
	font-size: 14.5px;
	color: var(--apa-ink-2);
	line-height: 1.5;
}

.ap-checkout-signin__ico {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--apa-line);
	color: var(--apa-blue);
}

.ap-checkout-signin__ico svg { width: 18px; height: 18px; }

.ap-checkout-signin a {
	color: var(--apa-blue);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ap-checkout-signin em {
	font-style: normal;
	color: var(--apa-ink-3);
	font-size: 13px;
}

@media (max-width: 600px) {
	.ap-checkout-signin { padding: 11px 14px; font-size: 13.5px; }
	.ap-checkout-signin em { display: block; }
}


/* ==========================================================================
   10. Accessibility
   ========================================================================== */
.ap-acc a:focus-visible,
.ap-acc button:focus-visible,
.ap-login a:focus-visible,
.ap-login button:focus-visible {
	outline: 2px solid var(--apa-blue);
	outline-offset: 2px;
}

.ap-login .screen-reader-text,
.ap-acc .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
