/* Customer portal — order history, status and tracking. */

.account-container {
	max-width: 860px;
	padding-top: 2rem;
	padding-bottom: 4rem;
}

/* Test-mode banner. Deliberately loud: it marks a state where anyone can read
   a customer's order history, and must not survive to launch. */
.account-testmode {
	background: #fff4cc;
	border: 3px solid #e8a020;
	border-radius: 8px;
	padding: 0.875rem 1.25rem;
	margin-bottom: 1.5rem;
	font-size: 0.9rem;
	color: #7a4d00;
}

.account-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}

.account-header .page-title {
	margin-bottom: 0.25rem;
}

.account-signout {
	font-family: var(--font-heading);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text-secondary);
	text-decoration: underline;
	white-space: nowrap;
}

.account-signout:hover {
	color: var(--color-red);
}

.account-card {
	background: var(--bg-card);
	border: 3px solid var(--retro-navy);
	border-radius: 12px;
	box-shadow: 4px 4px 0 var(--retro-navy);
	padding: 1.75rem;
	margin-bottom: 1.5rem;
}

.account-card--centered {
	text-align: center;
	max-width: 520px;
	margin-left: auto;
	margin-right: auto;
}

.account-card h2 {
	font-family: var(--font-heading);
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 0.875rem;
}

.account-icon {
	font-size: 3rem;
	line-height: 1;
	margin-bottom: 0.5rem;
}

.account-lead {
	color: var(--text-secondary);
	margin-bottom: 1.25rem;
}

.account-muted {
	color: var(--text-muted);
	font-size: 0.875rem;
	margin-top: 0.75rem;
}

.account-error {
	background: #fee2e2;
	border: 2px solid #991b1b;
	color: #991b1b;
	border-radius: 8px;
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

/* --- sign-in form ------------------------------------------------------- */

.account-form {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	text-align: left;
}

.account-form label {
	font-family: var(--font-heading);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.account-form input {
	padding: 0.75rem 1rem;
	border: 3px solid var(--retro-navy);
	border-radius: 8px;
	font-family: var(--font-body);
	font-size: 1rem;
}

.account-form button {
	margin-top: 0.5rem;
	width: 100%;
}

/* --- order list --------------------------------------------------------- */

.account-orders {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.account-order {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.75rem 1rem;
	padding: 1.25rem 1.5rem;
	background: var(--bg-card);
	border: 3px solid var(--retro-navy);
	border-radius: 12px;
	box-shadow: 4px 4px 0 var(--retro-navy);
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.account-order:hover {
	transform: translateY(-2px);
	box-shadow: 6px 6px 0 var(--retro-navy);
	color: inherit;
}

.account-order__main {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.account-order__number {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.05rem;
}

.account-order__date,
.account-order__items {
	font-size: 0.85rem;
	color: var(--text-muted);
}

.account-order__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.4rem;
}

.account-order__total {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.1rem;
}

.account-order__tracking {
	grid-column: 1 / -1;
	border-top: 2px dashed var(--color-gray-200);
	padding-top: 0.75rem;
	font-size: 0.85rem;
	color: var(--text-secondary);
}

.account-order__tracking code,
.account-tracking code {
	background: var(--color-gray-100);
	padding: 0.15rem 0.45rem;
	border-radius: 4px;
	font-size: 0.85em;
}

/* --- status pill -------------------------------------------------------- */

.account-status {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	border: 2px solid var(--retro-navy);
	font-family: var(--font-heading);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #fff;
	white-space: nowrap;
}

.account-status--pending   { background: var(--retro-yellow); color: #4a3200; }
.account-status--paid      { background: var(--retro-teal); }
.account-status--shipped   { background: #3b82f6; }
.account-status--cancelled { background: var(--retro-red); }

.account-status-note {
	color: var(--text-secondary);
	margin-bottom: 1.5rem;
}

/* --- progress ----------------------------------------------------------- */

.account-progress {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem;
}

.account-progress__step {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	text-align: center;
	position: relative;
	color: var(--text-muted);
	font-size: 0.8rem;
}

/* Connector between steps, drawn behind the dots. */
.account-progress__step::before {
	content: '';
	position: absolute;
	top: 14px;
	left: -50%;
	width: 100%;
	height: 3px;
	background: var(--color-gray-200);
	z-index: 0;
}

.account-progress__step:first-child::before {
	display: none;
}

.account-progress__step.is-done::before {
	background: var(--retro-teal);
}

.account-progress__dot {
	position: relative;
	z-index: 1;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 3px solid var(--color-gray-300);
	background: var(--bg-card);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.85rem;
}

.account-progress__step.is-done .account-progress__dot {
	border-color: var(--retro-teal);
	background: var(--retro-teal);
	color: #fff;
}

.account-progress__step.is-done .account-progress__label {
	color: var(--text-primary);
	font-weight: 600;
}

/* --- items + totals ----------------------------------------------------- */

.account-items {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1rem;
}

.account-items td {
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--color-gray-200);
	font-size: 0.925rem;
}

.account-items .numeric {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.account-totals {
	margin: 0;
	font-size: 0.925rem;
}

.account-totals div {
	display: flex;
	justify-content: space-between;
	padding: 0.35rem 0;
}

.account-totals dt,
.account-totals dd {
	margin: 0;
}

.account-totals__total {
	border-top: 2px solid var(--retro-navy);
	margin-top: 0.4rem;
	padding-top: 0.6rem !important;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.05rem;
}

@media (max-width: 560px) {
	.account-order {
		grid-template-columns: 1fr;
	}

	.account-order__side {
		align-items: flex-start;
		flex-direction: row;
		justify-content: space-between;
	}

	.account-progress__label {
		font-size: 0.7rem;
	}
}

/* ---------------------------------------------------------------------------
   Affiliate invitation
   ---------------------------------------------------------------------------
   Shown on the order list to customers who have not enrolled. Deliberately the
   same shop-sign language as /affiliates — striped awning, navy field, gold
   roundel — so arriving there feels like the same place rather than a different
   site. Compressed to a single band: this is a utility page and the invitation
   is a guest on it.
   ------------------------------------------------------------------------- */

.aff-invite {
	position: relative;
	margin: 3rem 0 1rem;
	overflow: hidden;
	background:
		radial-gradient(ellipse 70% 90% at 85% 0%, rgba(40, 80, 212, 0.5), transparent 70%),
		linear-gradient(135deg, #18120c 0%, #0a1a5c 100%);
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(15, 37, 128, 0.25);
}

.aff-invite-awning {
	height: 22px;
	background: repeating-linear-gradient(90deg, #d21e2a 0 26px, #fdf6e8 26px 52px);
	-webkit-mask: radial-gradient(circle at 13px 100%, transparent 7px, #000 8px) repeat-x 0 0 / 26px 100%;
	mask: radial-gradient(circle at 13px 100%, transparent 7px, #000 8px) repeat-x 0 0 / 26px 100%;
}

.aff-invite-body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.75rem 2rem 2rem;
}

.aff-invite-eyebrow {
	margin: 0 0 0.5rem;
	font-family: var(--font-heading);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #fbbf24;
}

.aff-invite-title {
	margin: 0 0 0.6rem;
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 3.4vw, 2.1rem);
	line-height: 1.05;
	color: #fdf6e8;
}

.aff-invite-text {
	max-width: 34rem;
	margin: 0 0 1.25rem;
	font-family: var(--font-body);
	font-size: 0.95rem;
	line-height: 1.65;
	color: rgba(253, 246, 232, 0.85);
}

.aff-invite-text strong { color: #fbbf24; }

.aff-invite-cta {
	display: inline-block;
	padding: 0.8rem 1.8rem;
	font-family: var(--font-heading);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	color: #fdf6e8;
	background: #d21e2a;
	border-radius: 8px;
	box-shadow: 0 4px 0 #a3121f;
	transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.aff-invite-cta:hover,
.aff-invite-cta:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 6px 0 #a3121f;
}

.aff-invite-cta:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 #a3121f;
}

/* The price-sticker roundel from the affiliate page, shrunk. */
.aff-invite-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 6.5rem;
	height: 6.5rem;
	background: #fbbf24;
	color: #18120c;
	border: 4px solid #fdf6e8;
	border-radius: 50%;
	box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
	transform: rotate(-9deg);
}

.aff-invite-num {
	font-family: var(--font-display);
	font-size: 2.9rem;
	line-height: 1;
}

.aff-invite-pct {
	align-self: center;
	margin-top: 0.5rem;
	font-family: var(--font-display);
	font-size: 1.5rem;
	line-height: 1;
}

@media (max-width: 720px) {
	.aff-invite-body {
		flex-direction: column-reverse;
		align-items: flex-start;
		padding: 1.5rem 1.25rem 1.75rem;
	}

	.aff-invite-badge {
		width: 5rem;
		height: 5rem;
		align-self: flex-end;
		margin-top: -0.5rem;
	}

	.aff-invite-num { font-size: 2.2rem; }
	.aff-invite-pct { font-size: 1.1rem; margin-top: 0.35rem; }
}
