/* ==========================================================================
   Sassy Pharma replica — My Account + auth screens
   Phase 7. Owns: .sp-acct (logged-in shell), .sp-auth (login/register/reset).

   Colour + type values are the MEASURED source tokens from
   E:\sassypharma\scrape\source-cdp\design-tokens.json and RECON-DESIGN.md §1.
   Every one is written as var(--theme-token, <measured fallback>) so this sheet
   is correct whether or not the theme's base token layer has loaded yet.

   TWO CASCADE TRAPS ARE FIXED HERE ON PURPOSE — see §1 and §3. Do not "tidy"
   either of them away.
   ========================================================================== */

.sp-acct,
.sp-auth {
	--spa-bg:        var(--b1, #050505);
	--spa-surface:   var(--b3, #0E0E0E);
	--spa-surface-2: var(--b4, #131313);
	--spa-raise:     var(--b5, #1A1A1A);

	--spa-gold:      var(--gold-mid, #B9965A);
	--spa-gold-hi:   var(--gold-hi, #D4C49A);
	--spa-gold-deep: var(--gold-deep, #745527);
	--spa-gold-rgb:  var(--gold-rgb, 185, 150, 90);

	--spa-silver:    var(--silver-mid, #C2C8D0);
	--spa-silver-hi: var(--silver-hi, #ECEEF0);

	--spa-tx:        var(--tx, rgba(238, 238, 240, 0.94));
	--spa-tx2:       var(--tx2, rgba(238, 238, 240, 0.60));
	--spa-tx3:       var(--tx3, rgba(238, 238, 240, 0.36));

	--spa-good:      var(--tone-good, rgba(90, 195, 140, 0.95));
	--spa-bad:       var(--tone-bad, rgba(210, 100, 100, 0.95));

	--spa-line:      rgba(255, 255, 255, 0.10);
	--spa-line-soft: rgba(255, 255, 255, 0.06);
	/* The card chrome gold is hard-coded #D4AF37 in the source and is NOT
	   --gold-mid. Recon §1.2 flags this explicitly: unifying them dulls the cards. */
	--spa-chrome:    rgba(212, 175, 55, 0.28);

	--spa-ff-body:   var(--font-body, 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif);
	--spa-ff-disp:   var(--font-display, 'Cormorant Garamond', Georgia, serif);

	--spa-r-card:    16px;
	--spa-r-btn:     12px;
	--spa-r-input:   12px;

	--spa-sh-card:   0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 44px rgba(0, 0, 0, 0.46);
	--spa-sh-inset:  0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 -8px 14px rgba(0, 0, 0, 0.24) inset;

	--spa-nav-w:     268px;

	font-family: var(--spa-ff-body);
	color: var(--spa-tx);
}


/* ==========================================================================
   1. LAYOUT — and the sidebar-collapse trap
   --------------------------------------------------------------------------
   WooCommerce ships:
       .woocommerce-MyAccount-navigation { float: left;  width: 30%; }
       .woocommerce-MyAccount-content    { float: right; width: 70%; }
   Inside a grid container the FLOAT is ignored but the PERCENTAGE is not, so the
   nav resolves against the grid TRACK rather than the row and collapses to ~78px
   — labels wrap to two or three lines and the tab list looks broken.
   Both declarations must be neutralised; killing only the float is not enough.
   (Same bug class as div.summary{float:right;width:48%} on the PDP.)
   ========================================================================== */

.sp-acct {
	display: grid;
	grid-template-columns: var(--spa-nav-w) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	width: 100%;
	max-width: 1180px;
	margin-inline: auto;
}

.sp-acct > .woocommerce-MyAccount-navigation,
.sp-acct > .woocommerce-MyAccount-content,
.woocommerce-account .sp-acct .woocommerce-MyAccount-navigation,
.woocommerce-account .sp-acct .woocommerce-MyAccount-content {
	float: none;      /* trap fix, part 1 */
	width: auto;      /* trap fix, part 2 — the percentage is the real culprit */
	max-width: none;
	margin: 0;
	min-width: 0;     /* lets a wide order table shrink instead of blowing the grid out */
}

.sp-acct::after {
	content: none;    /* Woo's float clearfix is meaningless in grid and adds a row */
}

.sp-acct__content > *:first-child {
	margin-top: 0;
}


/* ==========================================================================
   2. SIDEBAR NAVIGATION
   ========================================================================== */

.sp-acct__nav {
	position: sticky;
	top: 84px;
	padding: 14px;
	border-radius: var(--spa-r-card);
	border: 1px solid var(--spa-line);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)), var(--spa-surface);
	box-shadow: var(--spa-sh-card);
}

.sp-acct__id {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 4px 6px 14px;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--spa-line-soft);
}

.sp-acct__avatar {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--spa-gold-hi);
	background: linear-gradient(168deg, #1c1c22 0%, #16161a 48%, #101014 100%);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 0 0 1px var(--spa-chrome);
}

.sp-acct__idtext {
	display: grid;
	min-width: 0;
}

.sp-acct__idname {
	font-size: 14px;
	font-weight: 600;
	color: var(--spa-silver-hi);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sp-acct__idmail {
	font-size: 11.5px;
	color: var(--spa-tx3);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sp-acct__nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sp-acct__nav li {
	margin: 0 0 3px;
	padding: 0;
	border: 0;
	list-style: none;
}

.sp-acct__nav li::before,
.sp-acct__nav li::marker {
	content: none;
}

.sp-acct__nav li a {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 12px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1.2;
	color: var(--spa-tx2);
	text-decoration: none;
	transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

/* THE KNOWN PRIOR DEFECT: labels wrapping onto a second line. The sidebar track is
   a fixed 268px (not a percentage) and every label is held on one line. */
.sp-acct__navlabel {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sp-acct__nav .sp-ico {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	opacity: 0.8;
}

.sp-acct__nav li a:hover,
.sp-acct__nav li a:focus-visible {
	color: var(--spa-silver-hi);
	background: rgba(255, 255, 255, 0.045);
	border-color: var(--spa-line);
}

.sp-acct__nav li a:focus-visible {
	outline: 2px solid rgba(var(--spa-gold-rgb), 0.55);
	outline-offset: 2px;
}

.sp-acct__nav li.is-active > a,
.sp-acct__nav li.woocommerce-MyAccount-navigation-link--active > a {
	color: var(--spa-gold-hi);
	background: linear-gradient(180deg, rgba(var(--spa-gold-rgb), 0.16), rgba(var(--spa-gold-rgb), 0.05));
	border-color: rgba(var(--spa-gold-rgb), 0.34);
	font-weight: 600;
}

.sp-acct__nav li.is-active > a .sp-ico,
.sp-acct__nav li.woocommerce-MyAccount-navigation-link--active > a .sp-ico {
	opacity: 1;
}

.sp-acct__navitem--customer-logout {
	margin-top: 10px !important;
	padding-top: 10px;
	border-top: 1px solid var(--spa-line-soft) !important;
}

.sp-acct__navitem--customer-logout > a {
	color: var(--spa-tx3);
}

.sp-acct__navitem--customer-logout > a:hover {
	color: var(--spa-bad);
}


/* ==========================================================================
   3. BUTTONS — and the Woo grey-repaint trap
   --------------------------------------------------------------------------
   WooCommerce ships `.woocommerce:where(body:not(...)) a.button`, which computes
   at (0,2,1) because :where() contributes nothing. A plain `.sp-btn` at (0,1,0)
   loses, so every CTA silently repaints as Woo's grey pill on any page whose
   <body> carries `woocommerce`. Every selector below is prefixed with `body` and
   scoped to a wrapper class to land at (0,2,2) and outrank it outright rather
   than relying on source order.
   ========================================================================== */

body .sp-acct .sp-btn,
body .sp-acct a.button,
body .sp-acct button.button,
body .sp-acct input[type="submit"],
body .sp-auth .sp-btn,
body .sp-auth a.button,
body .sp-auth button.button,
body .sp-auth input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 11px 20px;
	border: 1px solid var(--spa-line);
	border-radius: var(--spa-r-btn);
	font-family: var(--spa-ff-body);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.09em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	text-shadow: none;
	cursor: pointer;
	color: var(--spa-gold-hi);
	background: linear-gradient(168deg, #1c1c22 0%, #16161a 48%, #101014 100%);
	box-shadow: var(--spa-sh-inset), 0 8px 20px rgba(0, 0, 0, 0.30);
	transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

body .sp-acct .sp-btn:hover,
body .sp-acct a.button:hover,
body .sp-acct button.button:hover,
body .sp-auth .sp-btn:hover,
body .sp-auth a.button:hover,
body .sp-auth button.button:hover {
	color: #f2df9b;
	border-color: rgba(var(--spa-gold-rgb), 0.40);
	background: linear-gradient(168deg, #1c1c22 0%, #1a1a1e 48%, #141418 100%);
	transform: translateY(-1px);
}

body .sp-acct .sp-btn:focus-visible,
body .sp-auth .sp-btn:focus-visible,
body .sp-acct button.button:focus-visible,
body .sp-auth button.button:focus-visible {
	outline: 2px solid rgba(var(--spa-gold-rgb), 0.65);
	outline-offset: 2px;
}

body .sp-acct .sp-btn--primary,
body .sp-auth .sp-btn--primary,
body .sp-acct a.sp-btn--primary,
body .sp-auth a.sp-btn--primary {
	color: #1a1206;
	border-color: rgba(var(--spa-gold-rgb), 0.55);
	background: linear-gradient(180deg, var(--spa-gold-hi) 0%, var(--spa-gold) 52%, var(--spa-gold-deep) 100%);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 10px 26px rgba(0, 0, 0, 0.42);
}

body .sp-acct .sp-btn--primary:hover,
body .sp-auth .sp-btn--primary:hover {
	color: #100b03;
	border-color: rgba(var(--spa-gold-rgb), 0.75);
	background: linear-gradient(180deg, #efe3c2 0%, #cfae74 52%, #8a672f 100%);
}

body .sp-acct .sp-btn--ghost,
body .sp-auth .sp-btn--ghost,
body .sp-acct a.sp-btn--ghost,
body .sp-auth a.sp-btn--ghost {
	min-height: 38px;
	padding: 8px 14px;
	font-size: 11.5px;
	letter-spacing: 0.08em;
	color: var(--spa-silver);
	background: rgba(255, 255, 255, 0.035);
	box-shadow: none;
}

body .sp-acct .sp-btn--ghost:hover,
body .sp-auth .sp-btn--ghost:hover {
	color: var(--spa-silver-hi);
	background: rgba(255, 255, 255, 0.07);
}

body .sp-acct .sp-btn--block,
body .sp-auth .sp-btn--block {
	display: flex;
	width: 100%;
}

.sp-acct .sp-link,
.sp-auth .sp-link,
.sp-acct a:not(.sp-btn):not(.button),
.sp-auth a:not(.sp-btn):not(.button) {
	color: rgba(226, 188, 91, 0.92);
	text-decoration: none;
}

.sp-acct .sp-link:hover,
.sp-auth .sp-link:hover,
.sp-acct a:not(.sp-btn):not(.button):hover,
.sp-auth a:not(.sp-btn):not(.button):hover {
	color: #f2df9b;
	text-decoration: underline;
}


/* ==========================================================================
   4. CARDS + SHARED TYPE
   ========================================================================== */

.sp-card {
	padding: 22px 22px 20px;
	margin: 0 0 20px;
	border-radius: var(--spa-r-card);
	border: 1px solid var(--spa-line);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)), var(--spa-surface);
	box-shadow: var(--spa-sh-card);
}

.sp-card__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 14px;
}

.sp-card__title {
	margin: 0;
	font-family: var(--spa-ff-disp);
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--spa-silver-hi);
}

.sp-gold {
	color: var(--spa-gold);
	background: linear-gradient(180deg, #f2df9b 0%, #d4af37 55%, #a47b18 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.sp-eyebrow {
	margin: 0 0 6px;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.20em;
	text-transform: uppercase;
	color: rgba(var(--spa-gold-rgb), 0.95);
}

.sp-muted {
	color: var(--spa-tx2);
	font-size: 13.5px;
	line-height: 1.6;
}

.sp-acct .sp-hint,
.sp-auth .sp-hint {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-style: italic;
	color: var(--spa-tx3);
}

.sp-req {
	margin-left: 3px;
	color: rgba(var(--spa-gold-rgb), 0.85);
}

.sp-optional {
	margin-left: 4px;
	opacity: 0.5;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}


/* ==========================================================================
   5. DASHBOARD
   ========================================================================== */

.sp-card--hello .sp-card__title {
	font-size: 27px;
	letter-spacing: 0.02em;
	text-transform: none;
	margin-bottom: 8px;
}

.sp-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 20px;
}

.sp-stat {
	padding: 16px 14px;
	border-radius: 14px;
	border: 1px solid var(--spa-line-soft);
	background: var(--spa-surface-2);
	text-align: center;
}

.sp-stat__num {
	display: block;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.1;
	color: var(--spa-silver-hi);
}

.sp-stat__label {
	display: block;
	margin-top: 5px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--spa-tx3);
}

.sp-stat--wait .sp-stat__num   { color: var(--spa-gold-hi); }
.sp-stat--active .sp-stat__num { color: var(--spa-silver); }
.sp-stat--good .sp-stat__num   { color: var(--spa-good); }

.sp-quick {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 12px;
}

.sp-quick__tile {
	display: grid;
	gap: 3px;
	padding: 16px;
	border-radius: 14px;
	border: 1px solid var(--spa-line-soft);
	background: var(--spa-surface-2);
	text-decoration: none;
	transition: border-color 180ms ease, transform 180ms ease;
}

.sp-quick__tile:hover {
	border-color: rgba(var(--spa-gold-rgb), 0.34);
	transform: translateY(-2px);
	text-decoration: none;
}

.sp-quick__tile .sp-ico {
	width: 22px;
	height: 22px;
	margin-bottom: 6px;
	color: var(--spa-gold);
}

.sp-quick__label {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: var(--spa-silver-hi);
}

.sp-quick__hint {
	font-size: 12px;
	color: var(--spa-tx3);
}


/* ==========================================================================
   6. STATUS PILLS + NOTICE PANELS
   --------------------------------------------------------------------------
   This store is manual-crypto: an order sits ON-HOLD until a human confirms a
   TXID. On-hold is therefore the NORMAL state and is styled gold ("wait"),
   deliberately NOT red. Only cancelled/failed get the bad tone.
   ========================================================================== */

.sp-status {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 11px;
	border-radius: 999px;
	border: 1px solid var(--spa-line);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.10em;
	line-height: 1.4;
	text-transform: uppercase;
	white-space: nowrap;
}

.sp-status__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	flex: 0 0 auto;
}

.sp-status--wait {
	color: #ffe2a0;
	border-color: rgba(255, 195, 80, 0.38);
	background: linear-gradient(180deg, rgba(34, 22, 5, 0.96) 0%, rgba(17, 10, 3, 0.98) 58%, #090502 100%);
}

.sp-status--active {
	color: var(--spa-silver-hi);
	border-color: rgba(194, 200, 208, 0.30);
	background: linear-gradient(180deg, rgba(24, 26, 30, 0.96), rgba(12, 13, 15, 0.98));
}

.sp-status--good {
	color: var(--spa-good);
	border-color: rgba(90, 195, 140, 0.34);
	background: linear-gradient(180deg, rgba(10, 26, 18, 0.96), rgba(5, 14, 10, 0.98));
}

.sp-status--bad {
	color: var(--spa-bad);
	border-color: rgba(210, 100, 100, 0.34);
	background: linear-gradient(180deg, rgba(30, 12, 12, 0.96), rgba(15, 6, 6, 0.98));
}

.sp-status--muted {
	color: var(--spa-tx2);
	background: rgba(255, 255, 255, 0.035);
}

.sp-note {
	display: flex;
	gap: 14px;
	padding: 18px 20px;
	margin: 0 0 20px;
	border-radius: var(--spa-r-card);
	border: 1px solid var(--spa-line);
	background: var(--spa-surface);
}

.sp-note--wait {
	border-color: rgba(var(--spa-gold-rgb), 0.32);
	background: linear-gradient(180deg, rgba(var(--spa-gold-rgb), 0.09), rgba(var(--spa-gold-rgb), 0.02)), var(--spa-surface);
}

.sp-note--good   { border-color: rgba(90, 195, 140, 0.30); }
.sp-note--active { border-color: rgba(194, 200, 208, 0.24); }
.sp-note--bad    { border-color: rgba(210, 100, 100, 0.32); }

.sp-note__icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	color: var(--spa-gold-hi);
}

.sp-note--good .sp-note__icon { color: var(--spa-good); }
.sp-note--bad .sp-note__icon  { color: var(--spa-bad); }

.sp-note__icon .sp-ico {
	width: 20px;
	height: 20px;
}

.sp-note__body {
	min-width: 0;
}

.sp-note__title {
	margin: 0 0 6px;
	font-family: var(--spa-ff-disp);
	font-size: 19px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--spa-silver-hi);
}

.sp-note__meta,
.sp-note__text {
	margin: 0 0 8px;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--spa-tx2);
}

.sp-note__actions {
	margin: 12px 0 0;
}


/* ==========================================================================
   7. ORDERS — table (desktop) that becomes cards (mobile)
   ========================================================================== */

.sp-acct .sp-table {
	width: 100%;
	margin: 0 0 20px;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--spa-line);
	border-radius: var(--spa-r-card);
	overflow: hidden;
	background: var(--spa-surface);
	font-size: 13.5px;
}

.sp-acct .sp-table thead th {
	padding: 13px 16px;
	border: 0;
	border-bottom: 1px solid var(--spa-line);
	background: rgba(255, 255, 255, 0.035);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-align: left;
	color: var(--spa-tx3);
}

.sp-acct .sp-table tbody th,
.sp-acct .sp-table tbody td {
	padding: 15px 16px;
	border: 0;
	border-bottom: 1px solid var(--spa-line-soft);
	vertical-align: middle;
	text-align: left;
	font-weight: 400;
	color: var(--spa-tx);
}

.sp-acct .sp-table tbody tr:last-child th,
.sp-acct .sp-table tbody tr:last-child td {
	border-bottom: 0;
}

.sp-acct .sp-table tbody tr:hover {
	background: rgba(255, 255, 255, 0.022);
}

.sp-ordernum {
	font-weight: 700;
	letter-spacing: 0.02em;
}

.sp-total {
	display: block;
	font-weight: 700;
	color: var(--spa-silver-hi);
}

.sp-total__items {
	display: block;
	font-size: 11.5px;
}

.woocommerce-orders-table__cell-order-actions {
	text-align: right !important;
	white-space: nowrap;
}

.sp-pager {
	display: flex;
	gap: 10px;
	justify-content: space-between;
}

.sp-orderlist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sp-orderlist__row {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 0.9fr) auto;
	align-items: center;
	gap: 12px;
	padding: 13px 0;
	border-bottom: 1px solid var(--spa-line-soft);
}

.sp-orderlist__row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.sp-orderlist__id {
	display: grid;
	gap: 2px;
	font-size: 14px;
	font-weight: 700;
}

.sp-orderlist__id .sp-muted {
	font-size: 11.5px;
	font-weight: 400;
}

.sp-orderlist__total {
	display: grid;
	gap: 2px;
	justify-items: end;
	font-weight: 700;
	color: var(--spa-silver-hi);
}

.sp-orderlist__total .sp-muted {
	font-size: 11.5px;
	font-weight: 400;
}

.sp-orderlist__go {
	justify-self: end;
}

.sp-card--empty {
	text-align: center;
}

.sp-empty__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin: 4px auto 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.04);
	color: var(--spa-gold);
}

.sp-empty__icon .sp-ico {
	width: 24px;
	height: 24px;
}

.sp-empty {
	display: grid;
	gap: 12px;
	justify-items: start;
	color: var(--spa-tx2);
}


/* View order — WooCommerce's own order-details table lives inside .sp-card. */
.sp-card--orderdetails .woocommerce-table--order-details,
.sp-card--orderdetails .woocommerce-table--customer-details,
.sp-card--orderdetails table.shop_table {
	width: 100%;
	margin: 0 0 18px;
	border: 1px solid var(--spa-line);
	border-radius: 12px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	font-size: 13.5px;
	background: rgba(0, 0, 0, 0.22);
}

.sp-card--orderdetails table.shop_table th,
.sp-card--orderdetails table.shop_table td {
	padding: 12px 15px;
	border: 0;
	border-bottom: 1px solid var(--spa-line-soft);
	text-align: left;
	color: var(--spa-tx);
}

.sp-card--orderdetails table.shop_table tfoot th,
.sp-card--orderdetails table.shop_table tfoot td {
	font-weight: 700;
	color: var(--spa-silver-hi);
}

.sp-card--orderdetails h2,
.sp-card--orderdetails h3 {
	font-family: var(--spa-ff-disp);
	font-size: 19px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--spa-silver-hi);
}

.sp-updates {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sp-updates__item {
	padding: 12px 0;
	border-bottom: 1px solid var(--spa-line-soft);
}

.sp-updates__item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}


/* ==========================================================================
   8. ADDRESSES
   ========================================================================== */

.sp-addresses__intro {
	margin: 0 0 16px;
}

.sp-addresses__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 18px;
}

.sp-addresses__grid::before,
.sp-addresses__grid::after {
	content: none;   /* Woo's col2-set clearfix would occupy a grid cell */
}

.sp-address {
	margin: 0;
	display: flex;
	flex-direction: column;
}

.sp-address__body {
	font-style: normal;
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--spa-tx2);
	flex: 1 1 auto;
}

.sp-address__actions {
	margin: 16px 0 0;
}

.sp-acct .u-column1,
.sp-acct .u-column2 {
	width: auto;
	float: none;
}


/* ==========================================================================
   9. FORMS
   ========================================================================== */

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

.sp-acct .sp-field,
.sp-auth .sp-field,
.sp-acct .form-row,
.sp-auth .form-row {
	display: block;
	width: auto;
	float: none;
	margin: 0 0 14px;
	padding: 0;
}

/* The :not() guards matter: a checkbox's label is NOT a field label. Without them
   the "Keep me signed in" label inherits the uppercase gold block style, which
   forces its text onto a second line and breaks the inline checkbox row. */
.sp-acct .sp-label,
.sp-auth .sp-label,
.sp-acct .form-row > label:not(.sp-check):not(.woocommerce-form__label-for-checkbox),
.sp-auth .form-row > label:not(.sp-check):not(.woocommerce-form__label-for-checkbox) {
	display: block;
	margin-bottom: 7px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(var(--spa-gold-rgb), 0.95);
}

.sp-acct .sp-input,
.sp-auth .sp-input,
.sp-acct .input-text,
.sp-auth .input-text,
.sp-acct input[type="text"],
.sp-acct input[type="email"],
.sp-acct input[type="tel"],
.sp-acct input[type="password"],
.sp-acct select,
.sp-acct textarea,
.sp-auth input[type="text"],
.sp-auth input[type="email"],
.sp-auth input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	min-height: 46px;
	padding: 12px 14px;
	border: 1px solid var(--spa-line);
	border-radius: var(--spa-r-input);
	font-family: var(--spa-ff-body);
	font-size: 14.5px;
	color: rgba(245, 240, 230, 0.96);
	background: linear-gradient(168deg, #1c1c22 0%, #16161a 48%, #101014 100%);
	box-shadow: var(--spa-sh-inset);
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.sp-acct select,
.sp-auth select {
	background-image: linear-gradient(168deg, #1c1c22 0%, #16161a 48%, #101014 100%);
}

.sp-acct .sp-input::placeholder,
.sp-auth .sp-input::placeholder,
.sp-acct input::placeholder,
.sp-auth input::placeholder {
	color: rgba(238, 230, 214, 0.34);
}

.sp-acct .sp-input:focus,
.sp-auth .sp-input:focus,
.sp-acct input:focus,
.sp-acct select:focus,
.sp-acct textarea:focus,
.sp-auth input:focus {
	border-color: rgba(var(--spa-gold-rgb), 0.45);
	box-shadow: 0 0 0 3px rgba(var(--spa-gold-rgb), 0.16), var(--spa-sh-inset);
}

.sp-acct .sp-fieldset,
.sp-auth .sp-fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}

.sp-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 4px 0 0;
}

/* Woo ships `.woocommerce-form__label-for-checkbox{display:inline-block}`, so this
   needs the body prefix to win and keep the row on one line. */
body .sp-acct .sp-check,
body .sp-auth .sp-check,
body .sp-acct .form-row label.sp-check,
body .sp-auth .form-row label.sp-check {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 0;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.01em;
	text-transform: none;
	color: var(--spa-tx2);
	cursor: pointer;
}

body .sp-acct .sp-check > span,
body .sp-auth .sp-check > span {
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.01em;
	text-transform: none;
	color: var(--spa-tx2);
}

/* Must outrank the generic input sizing below (and its 600px override), or the
   checkbox inherits min-height:50px and renders as a tall white slab. */
body .sp-acct .sp-check input[type="checkbox"],
body .sp-auth .sp-check input[type="checkbox"],
body .sp-acct input[type="checkbox"],
body .sp-auth input[type="checkbox"],
body .sp-acct input[type="radio"],
body .sp-auth input[type="radio"] {
	width: 17px;
	height: 17px;
	min-height: 0;
	padding: 0;
	margin: 0;
	flex: 0 0 auto;
	border-radius: 4px;
	box-shadow: none;
	accent-color: var(--spa-gold);
	-webkit-appearance: auto;
	appearance: auto;
}

.sp-remember {
	margin-bottom: 16px !important;
}

/* Honeypot. Kept out of the layout without display:none, which some bots skip. */
.sp-hp {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.sp-acct .required,
.sp-auth .required {
	color: rgba(var(--spa-gold-rgb), 0.85);
	text-decoration: none;
	border: 0;
}


/* ==========================================================================
   10. AUTH CARDS — /login/, /register/, /forgot-password/
   ========================================================================== */

.sp-auth {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	width: 100%;
	padding: 8px 0 12px;
}

.sp-authcard {
	width: min(100%, 440px);
	margin: 0 auto;
	padding: 30px 26px 28px;
	border-radius: 18px;
	border: 1px solid var(--spa-line);
	background:
		radial-gradient(120% 70% at 50% -14%, rgba(255, 255, 255, 0.055) 0%, transparent 48%),
		linear-gradient(180deg, #141418 0%, #101014 52%, #0c0c0e 100%);
	box-shadow:
		0 34px 72px rgba(0, 0, 0, 0.58),
		0 12px 24px rgba(0, 0, 0, 0.34),
		0 1px 0 rgba(255, 255, 255, 0.07) inset;
}

/* WooCommerce skins the login/register forms themselves —
   `.woocommerce form.login, .woocommerce form.register { border:1px solid #cfc8d8;
   padding:20px; border-radius:5px }` — which draws a second, light-grey frame
   INSIDE our card. Measured on this build as rgb(207,200,216). Strip it. */
body .sp-auth form.login,
body .sp-auth form.register,
body .sp-auth form.lost_reset_password,
body .sp-auth .sp-form,
body .sp-acct form.login,
body .sp-acct form.register,
body .sp-acct .sp-form {
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
	background: transparent;
}

.sp-authcard__head {
	text-align: center;
	margin-bottom: 18px;
}

.sp-authcard__title {
	margin: 0;
	font-family: var(--spa-ff-body);
	font-size: clamp(1.55rem, 4.2vw, 1.85rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
	text-transform: none;
}

.sp-authcard__sub {
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--spa-tx2);
}

.sp-authcard__actions {
	margin: 18px 0 0 !important;
}

.sp-authcard__forgot {
	margin: 14px 0 0;
	text-align: center;
	font-size: 13px;
	font-style: italic;
}

.sp-authcard__divider {
	height: 1px;
	margin: 22px 0 18px;
	border: 0;
	background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.24), transparent);
}

/* "New here?" / "Already have an account?" — two-column hint block, exactly the
   source's authHint grid: copy left, CTA right, vertically centred. */
.sp-authhint {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
	gap: 10px 14px;
	align-items: center;
	text-align: left;
}

.sp-authhint__title {
	grid-column: 1;
	grid-row: 1;
	align-self: end;
	margin: 0;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(201, 166, 96, 0.95);
}

.sp-authhint__copy {
	grid-column: 1;
	grid-row: 2;
	margin: 0;
	font-size: 12.5px;
	font-style: italic;
	line-height: 1.45;
	color: var(--spa-silver);
}

.sp-authhint__cta {
	grid-column: 2;
	grid-row: 1 / span 2;
	margin: 0;
	display: flex;
	align-items: center;
	width: 100%;
}

.sp-authcard--confirm {
	text-align: center;
}

.sp-authcard__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border-radius: 50%;
	color: var(--spa-gold-hi);
	background: linear-gradient(168deg, #1c1c22 0%, #16161a 48%, #101014 100%);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 10px 22px rgba(0, 0, 0, 0.32);
}

.sp-authcard__icon .sp-ico {
	width: 26px;
	height: 26px;
}

.sp-auth__flash {
	width: min(100%, 440px);
	margin: 0 auto 16px;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid rgba(var(--spa-gold-rgb), 0.28);
	background: rgba(var(--spa-gold-rgb), 0.07);
	font-size: 13px;
	text-align: center;
	color: var(--spa-tx2);
}


/* ==========================================================================
   11. WOOCOMMERCE NOTICES inside the account / auth areas
   ========================================================================== */

.sp-auth-page .woocommerce-notices-wrapper,
.sp-auth-page .woocommerce-error,
.sp-auth-page .woocommerce-message,
.sp-auth-page .woocommerce-info {
	width: min(100%, 440px);
	margin-left: auto;
	margin-right: auto;
}

.sp-account-page .woocommerce-error,
.sp-account-page .woocommerce-message,
.sp-account-page .woocommerce-info,
.sp-auth-page .woocommerce-error,
.sp-auth-page .woocommerce-message,
.sp-auth-page .woocommerce-info {
	list-style: none;
	margin: 0 auto 18px;
	padding: 14px 16px;
	border: 1px solid var(--spa-line);
	border-top-width: 1px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.035);
	font-size: 13px;
	line-height: 1.5;
	color: var(--tx, rgba(238, 238, 240, 0.94));
}

.sp-account-page .woocommerce-error,
.sp-auth-page .woocommerce-error {
	border-color: rgba(210, 100, 100, 0.38);
	background: linear-gradient(180deg, rgba(60, 18, 22, 0.92), rgba(28, 8, 10, 0.96));
	color: rgba(255, 205, 208, 0.95);
}

.sp-account-page .woocommerce-message,
.sp-auth-page .woocommerce-message {
	border-color: rgba(90, 195, 140, 0.34);
	background: linear-gradient(180deg, rgba(10, 30, 20, 0.92), rgba(5, 16, 11, 0.96));
	color: rgba(190, 240, 214, 0.95);
}

.sp-account-page .woocommerce-error li,
.sp-account-page .woocommerce-message li,
.sp-account-page .woocommerce-info li,
.sp-auth-page .woocommerce-error li,
.sp-auth-page .woocommerce-message li,
.sp-auth-page .woocommerce-info li {
	margin: 0 0 6px;
	padding: 0;
	list-style: none;
}

.sp-account-page .woocommerce-error li:last-child,
.sp-auth-page .woocommerce-error li:last-child {
	margin-bottom: 0;
}

.sp-account-page .woocommerce-error::before,
.sp-account-page .woocommerce-message::before,
.sp-account-page .woocommerce-info::before,
.sp-auth-page .woocommerce-error::before,
.sp-auth-page .woocommerce-message::before,
.sp-auth-page .woocommerce-info::before {
	content: none;
}


/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
	.sp-acct {
		grid-template-columns: 232px minmax(0, 1fr);
		gap: 20px;
	}

	.sp-acct {
		--spa-nav-w: 232px;
	}

	.sp-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	/* Sidebar becomes a horizontal rail above the content. Labels still never wrap. */
	.sp-acct {
		display: block;
	}

	.sp-acct__nav {
		position: static;
		margin-bottom: 18px;
		padding: 12px;
	}

	.sp-acct__nav ul {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 2px;
	}

	.sp-acct__nav li {
		margin: 0;
		flex: 0 0 auto;
	}

	.sp-acct__nav li a {
		padding: 9px 14px;
		border-color: var(--spa-line-soft);
		background: rgba(255, 255, 255, 0.03);
	}

	.sp-acct__navitem--customer-logout {
		margin-top: 0 !important;
		padding-top: 0;
		border-top: 0 !important;
	}

	.sp-orderlist__row {
		grid-template-columns: minmax(0, 1fr) auto;
		row-gap: 8px;
	}

	.sp-orderlist__total {
		justify-items: start;
	}

	.sp-orderlist__go {
		justify-self: end;
	}
}

@media (max-width: 600px) {
	.sp-card {
		padding: 18px 16px 16px;
	}

	.sp-card__head {
		flex-wrap: wrap;
	}

	.sp-card__title {
		font-size: 19px;
	}

	.sp-card--hello .sp-card__title {
		font-size: 23px;
	}

	.sp-fields--2col {
		grid-template-columns: minmax(0, 1fr);
	}

	.sp-note {
		flex-direction: column;
		gap: 12px;
		padding: 16px;
	}

	.sp-authcard {
		padding: 22px 16px 20px;
		border-radius: 16px;
	}

	/* 16px minimum stops iOS zooming the field on focus.
	   Checkboxes and radios are excluded — a bare `input` selector here gave the
	   "Keep me signed in" box a 50px height and rendered it as a white slab. */
	.sp-acct .sp-input,
	.sp-auth .sp-input,
	.sp-acct input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
	.sp-acct select,
	.sp-auth input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
		font-size: 16px;
		min-height: 50px;
	}

	.sp-authhint {
		grid-template-columns: minmax(0, 1fr);
	}

	.sp-authhint__cta {
		grid-column: 1;
		grid-row: 3;
		margin-top: 4px;
	}

	/* Orders table -> stacked cards. Woo's shop_table_responsive gives us the
	   data-title attributes; we just re-lay it out. */
	.sp-acct .sp-table,
	.sp-acct .sp-table tbody,
	.sp-acct .sp-table tr,
	.sp-acct .sp-table tbody th,
	.sp-acct .sp-table tbody td {
		display: block;
		width: auto;
	}

	.sp-acct .sp-table thead {
		display: none;
	}

	.sp-acct .sp-table {
		border: 0;
		background: transparent;
		overflow: visible;
	}

	.sp-acct .sp-table tbody tr {
		margin-bottom: 14px;
		padding: 6px 14px;
		border: 1px solid var(--spa-line);
		border-radius: 14px;
		background: var(--spa-surface);
	}

	.sp-acct .sp-table tbody th,
	.sp-acct .sp-table tbody td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		padding: 11px 0;
		text-align: right;
	}

	.sp-acct .sp-table tbody th::before,
	.sp-acct .sp-table tbody td::before {
		content: attr(data-title);
		flex: 0 0 auto;
		font-size: 10.5px;
		font-weight: 800;
		letter-spacing: 0.12em;
		text-transform: uppercase;
		color: var(--spa-tx3);
		text-align: left;
	}

	.woocommerce-orders-table__cell-order-actions {
		text-align: right !important;
	}

	.sp-total,
	.sp-total__items {
		text-align: right;
	}

	.sp-pager {
		flex-direction: column;
	}

	.sp-quick {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sp-acct *,
	.sp-auth * {
		transition: none !important;
	}

	body .sp-acct .sp-btn:hover,
	body .sp-auth .sp-btn:hover,
	.sp-quick__tile:hover {
		transform: none;
	}
}
