/* Therapy Store — Account panel. Soft UI Evolution on brand tokens. Prefixed .thc-account. */

.thc-account {
	/* Account brand: #3f3f79 */
	--thc-primary: #3f3f79;
	--thc-primary-dark: #31315e;
	--thc-soft: #efeff5;
	--thc-border: #d8d8e6;
	--thc-account-aside: 260px;
	--thc-account-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--thc-account-dur: 240ms;
	--thc-account-surface: var(--thc-account-card-bg, var(--thc-surface, #fff));
	--thc-account-soft-shadow: 0 1px 2px rgba(63, 63, 121, 0.05), 0 10px 28px rgba(63, 63, 121, 0.07);
	--thc-account-active-bg: #3f3f79;
	max-width: var(--thc-account-content-width, 1400px);
	width: 100%;
	margin: 0 auto;
	padding: 8px 0 56px;
	box-sizing: border-box;
}

.thc-account-hero {
	margin-bottom: 18px;
}

.thc-account-welcome {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 18px;
	padding: 14px 16px;
	border-radius: 16px;
	background: color-mix(in srgb, var(--thc-soft, #e8f2ef) 70%, #fff);
	border: 1px solid var(--thc-border, #e2e8e5);
}

.thc-account-welcome-user {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.thc-account-avatar {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1rem;
	color: var(--thc-primary-dark, #0d5f59);
	background: linear-gradient(145deg, #fff 0%, var(--thc-soft, #e8f2ef) 100%);
	border: 1px solid var(--thc-border, #e2e8e5);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.thc-account-hello {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 650;
	color: var(--thc-text, #14241f);
	line-height: 1.35;
}

.thc-account-welcome-hint {
	margin: 2px 0 0;
	font-size: 0.82rem;
	color: var(--thc-muted, #5b6b66);
	line-height: 1.4;
}

.thc-account-flash {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 13px 16px;
	border-radius: 14px;
	margin-bottom: 16px;
	font-size: 0.94rem;
	line-height: 1.65;
	animation: thc-account-flash-in var(--thc-account-dur) var(--thc-account-ease) both;
}

.thc-account-flash.is-ok {
	background: color-mix(in srgb, #10b981 10%, #fff);
	color: #0f5c4a;
	border: 1px solid color-mix(in srgb, #10b981 28%, #fff);
}

.thc-account-flash.is-error {
	background: color-mix(in srgb, #ef4444 9%, #fff);
	color: #8f2f2f;
	border: 1px solid color-mix(in srgb, #ef4444 26%, #fff);
}

@keyframes thc-account-flash-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.thc-account-layout {
	display: grid;
	grid-template-columns: var(--thc-account-aside, 260px) minmax(0, 1fr);
	gap: 22px;
	align-items: start;
}

/* ——— Nav ——— */
.thc-account-nav {
	background: var(--thc-account-aside-bg, var(--thc-account-surface));
	border: 1px solid var(--thc-border, #e2e8e5);
	border-radius: 18px;
	box-shadow: var(--thc-account-soft-shadow);
	padding: 14px 12px;
	position: sticky;
	top: 24px;
}

.thc-account-nav-label {
	margin: 0 10px 10px;
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--thc-muted, #5b6b66);
}

.thc-account-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--thc-account-nav-gap, 8px);
}

.thc-account-nav a {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 12px;
	border-radius: 12px;
	text-decoration: none;
	color: var(--thc-text, #14241f);
	font-weight: 520;
	font-size: 0.94rem;
	line-height: 1.3;
	border: 1px solid transparent;
	border-inline-start: 3px solid transparent;
	cursor: pointer;
	transition:
		background var(--thc-account-dur) var(--thc-account-ease),
		color var(--thc-account-dur) var(--thc-account-ease),
		border-color var(--thc-account-dur) var(--thc-account-ease),
		transform 160ms var(--thc-account-ease),
		box-shadow var(--thc-account-dur) var(--thc-account-ease);
}

.thc-account-nav a:hover {
	background: var(--thc-soft, #e8f2ef);
	color: var(--thc-primary-dark, #0d5f59);
}

.thc-account-nav a:focus-visible {
	outline: 2px solid var(--thc-primary, #0f766e);
	outline-offset: 2px;
}

.thc-account-nav a.is-active {
	background: color-mix(in srgb, var(--thc-account-active-bg, var(--thc-primary, #0f766e)) 12%, #fff);
	color: var(--thc-primary-dark, #0d5f59);
	border-color: color-mix(in srgb, var(--thc-primary, #0f766e) 18%, var(--thc-border, #e2e8e5));
	border-inline-start-color: var(--thc-account-active-bg, var(--thc-primary, #0f766e));
	font-weight: 650;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.thc-account-nav a.is-logout {
	margin-top: 6px;
	color: #8a3b3b;
}

.thc-account-nav a.is-logout:hover {
	background: color-mix(in srgb, #ef4444 8%, #fff);
	color: #7a2e2e;
}

.thc-account-nav-icon {
	flex: 0 0 auto;
	opacity: 0.88;
}

.thc-account-nav a.is-active .thc-account-nav-icon {
	opacity: 1;
}

.thc-account-nav-text {
	min-width: 0;
}

/* ——— Main panel ——— */
.thc-account-main {
	min-width: 0;
	position: relative;
	background: var(--thc-account-surface);
	border: 1px solid var(--thc-border, #e2e8e5);
	border-radius: 20px;
	box-shadow: var(--thc-account-soft-shadow);
	padding: 22px 22px 26px;
	transition: opacity 160ms ease;
}

.thc-account-main.is-loading {
	opacity: 0.42;
	pointer-events: none;
}

.thc-account-main.is-loading::after {
	content: "";
	position: absolute;
	inset-inline-start: 50%;
	top: 2.8rem;
	width: 1.55rem;
	height: 1.55rem;
	margin-inline-start: -0.775rem;
	border: 2px solid var(--thc-border, #e2e8e5);
	border-top-color: var(--thc-primary, #0f766e);
	border-radius: 50%;
	animation: thc-account-spin 0.7s linear infinite;
	z-index: 2;
}

@keyframes thc-account-spin {
	to {
		transform: rotate(360deg);
	}
}

.thc-account-main.is-entering .thc-account-section > * {
	animation: thc-account-rise 420ms var(--thc-account-ease) both;
}

.thc-account-main.is-entering .thc-account-section > *:nth-child(1) { animation-delay: 0ms; }
.thc-account-main.is-entering .thc-account-section > *:nth-child(2) { animation-delay: 40ms; }
.thc-account-main.is-entering .thc-account-section > *:nth-child(3) { animation-delay: 80ms; }
.thc-account-main.is-entering .thc-account-section > *:nth-child(4) { animation-delay: 120ms; }
.thc-account-main.is-entering .thc-account-section > *:nth-child(5) { animation-delay: 160ms; }
.thc-account-main.is-entering .thc-account-section > *:nth-child(6) { animation-delay: 200ms; }
.thc-account-main.is-entering .thc-account-section > *:nth-child(n + 7) { animation-delay: 240ms; }

@keyframes thc-account-rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.thc-account-section {
	display: grid;
	gap: 0;
}

.thc-account-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px 16px;
	margin-bottom: 18px;
}

.thc-account-section h2,
.thc-account-head h2 {
	margin: 0;
	font-size: 1.28rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--thc-text, #14241f);
	line-height: 1.3;
}

.thc-account-section-desc {
	margin: 6px 0 0;
	font-size: 0.9rem;
	color: var(--thc-muted, #5b6b66);
	line-height: 1.6;
	max-width: 42rem;
}

.thc-account-section h3 {
	margin: 26px 0 12px;
	font-size: 1.02rem;
	font-weight: 650;
	color: var(--thc-text, #14241f);
}

.thc-account-lead {
	color: var(--thc-muted, #5b6b66);
	line-height: 1.8;
	margin: 0 0 16px;
	font-size: 0.95rem;
}

/* ——— Stats ——— */
.thc-account-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--thc-account-stat-gap, 14px);
	margin-bottom: 18px;
}

.thc-account-stat {
	background: var(--thc-account-stat-bg, linear-gradient(160deg, #ffffff 0%, #f3f9f7 100%));
	border: 1px solid var(--thc-border, #e2e8e5);
	border-radius: var(--thc-account-stat-radius, 16px);
	padding: 16px 16px 15px;
	display: grid;
	gap: 8px;
	transition: transform 200ms var(--thc-account-ease), box-shadow 200ms var(--thc-account-ease), border-color 200ms ease;
}

.thc-account-stat:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(20, 36, 31, 0.07);
	border-color: color-mix(in srgb, var(--thc-primary, #0f766e) 22%, var(--thc-border, #e2e8e5));
}

.thc-account-stat span {
	color: var(--thc-muted, #5b6b66);
	font-size: 0.86rem;
	font-weight: 500;
}

.thc-account-stat strong {
	font-size: 1.7rem;
	font-weight: 750;
	letter-spacing: -0.02em;
	color: var(--thc-primary-dark, #0d5f59);
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.thc-account-shortcuts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 6px;
}

.thc-account-shortcuts .thc-btn {
	min-height: 42px;
	transition: transform 160ms var(--thc-account-ease), box-shadow 160ms ease;
}

.thc-account-shortcuts .thc-btn:hover {
	transform: translateY(-1px);
}

/* ——— Cards / empty ——— */
.thc-account-card {
	background: var(--thc-account-surface);
	border: 1px solid var(--thc-border, #e2e8e5);
	border-radius: 16px;
	padding: 18px;
	box-shadow: 0 1px 2px rgba(20, 36, 31, 0.03);
	display: grid;
	gap: 12px;
	transition: border-color 200ms ease, box-shadow 200ms ease;
}

.thc-account-card--narrow {
	max-width: 420px;
}

.thc-account-card.is-default {
	border-color: color-mix(in srgb, var(--thc-primary, #0f766e) 35%, var(--thc-border, #e2e8e5));
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--thc-primary, #0f766e) 12%, transparent);
}

.thc-account-empty {
	padding: 36px 22px;
	text-align: center;
	color: var(--thc-muted, #5b6b66);
	background:
		radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--thc-soft, #e8f2ef) 80%, #fff), #fff);
	border-radius: 16px;
	border: 1px dashed color-mix(in srgb, var(--thc-primary, #0f766e) 22%, var(--thc-border, #e2e8e5));
	display: grid;
	justify-items: center;
	gap: 10px;
}

.thc-account-empty-icon {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--thc-primary, #0f766e);
	background: color-mix(in srgb, var(--thc-primary, #0f766e) 10%, #fff);
	border: 1px solid color-mix(in srgb, var(--thc-primary, #0f766e) 16%, #fff);
	margin-bottom: 2px;
}

.thc-account-empty p {
	margin: 0;
	max-width: 28rem;
	line-height: 1.7;
}

.thc-account-empty .thc-btn {
	margin-top: 6px;
}

/* ——— Tables (desktop grid; card-stack ≤900px, no horizontal scroll) ——— */
.thc-account-table-wrap {
	overflow: visible;
	max-width: 100%;
	border: 1px solid var(--thc-border, #e2e8e5);
	border-radius: 14px;
	background: #fff;
}

.thc-account-table,
.thc-data-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 0;
	table-layout: auto;
}

.thc-account-table th,
.thc-account-table td,
.thc-data-table th,
.thc-data-table td {
	padding: var(--thc-table-cell-pad, 13px 14px);
	text-align: right;
	border-bottom: 1px solid var(--thc-border, #e2e8e5);
	font-size: 0.92rem;
	vertical-align: middle;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.thc-account-table th,
.thc-data-table th {
	background: color-mix(in srgb, var(--thc-soft, #e8f2ef) 55%, #fff);
	color: var(--thc-muted, #5b6b66);
	font-weight: 650;
	font-size: 0.8rem;
	letter-spacing: 0.01em;
}

.thc-account-table tbody tr,
.thc-data-table tbody tr {
	transition: background 150ms ease;
}

.thc-account-table tbody tr:hover,
.thc-data-table tbody tr:hover {
	background: color-mix(in srgb, var(--thc-soft, #e8f2ef) 45%, #fff);
}

.thc-account-table tr:last-child td,
.thc-data-table tr:last-child td {
	border-bottom: 0;
}

.thc-account-table .thc-token,
.thc-data-table .thc-token {
	display: inline-block;
	max-width: 100%;
	min-inline-size: 0;
	overflow-wrap: anywhere;
	font-variant-numeric: tabular-nums;
}

.thc-account-table .is-actions .thc-link,
.thc-account-table .is-actions .thc-btn,
.thc-data-table .is-actions .thc-link,
.thc-data-table .is-actions .thc-btn {
	min-height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Downloads shortcode embedded in account */
.thc-account-main .thc-my-downloads {
	max-width: none;
	margin: 0;
	padding: 0;
}

.thc-account-main .thc-my-downloads > .thc-store-hero,
.thc-account-main .thc-my-downloads > .thc-sr-only {
	display: none;
}

.thc-account-main .thc-my-downloads .thc-section {
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	background: transparent;
}

.thc-account-main .thc-my-downloads .thc-front-empty {
	padding: 36px 22px;
	text-align: center;
	border-radius: 16px;
	border: 1px dashed color-mix(in srgb, var(--thc-primary, #0f766e) 22%, var(--thc-border, #e2e8e5));
	background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--thc-soft, #e8f2ef) 80%, #fff), #fff);
}

/* ——— Filters / forms ——— */
.thc-account-filters {
	display: grid;
	grid-template-columns: 1fr 1.5fr auto;
	gap: 12px;
	align-items: end;
	margin-bottom: 16px;
	background: color-mix(in srgb, var(--thc-soft, #e8f2ef) 35%, #fff);
	border: 1px solid var(--thc-border, #e2e8e5);
	border-radius: 14px;
	padding: 14px;
}

.thc-account .thc-field {
	display: grid;
	gap: 6px;
}

.thc-account .thc-field label {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--thc-muted, #5b6b66);
}

.thc-account .thc-input,
.thc-account input.thc-input,
.thc-account select.thc-input,
.thc-account textarea.thc-input {
	width: 100%;
	min-height: 44px;
	border: 1px solid var(--thc-border, #e2e8e5);
	border-radius: 12px;
	padding: 10px 12px;
	font: inherit;
	background: #fff;
	color: var(--thc-text, #14241f);
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.thc-account .thc-input:hover,
.thc-account input.thc-input:hover,
.thc-account select.thc-input:hover,
.thc-account textarea.thc-input:hover {
	border-color: color-mix(in srgb, var(--thc-primary, #0f766e) 28%, var(--thc-border, #e2e8e5));
}

.thc-account .thc-input:focus,
.thc-account input.thc-input:focus,
.thc-account select.thc-input:focus,
.thc-account textarea.thc-input:focus {
	outline: none;
	border-color: var(--thc-primary, #0f766e);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--thc-primary, #0f766e) 18%, transparent);
}

.thc-account textarea.thc-input {
	min-height: 96px;
	resize: vertical;
}

.thc-account .thc-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.thc-account .thc-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.92rem;
}

.thc-account .thc-help {
	margin: 4px 0 0;
	font-size: 0.8rem;
	color: var(--thc-muted, #5b6b66);
	line-height: 1.55;
}

.thc-account-meta {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 18px;
}

.thc-account-meta > div {
	background: color-mix(in srgb, var(--thc-soft, #e8f2ef) 28%, #fff);
	border: 1px solid var(--thc-border, #e2e8e5);
	border-radius: 12px;
	padding: 12px 13px;
	display: grid;
	gap: 5px;
	min-width: 0;
}

.thc-account-meta span {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--thc-muted, #5b6b66);
}

.thc-account-meta strong {
	font-size: 0.92rem;
	font-weight: 650;
	word-break: break-word;
}

.thc-account-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 14px;
}

.thc-account-pager a {
	min-width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 11px;
	border: 1px solid var(--thc-border, #e2e8e5);
	text-decoration: none;
	color: var(--thc-text, #14241f);
	background: #fff;
	font-weight: 550;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.thc-account-pager a:hover {
	border-color: var(--thc-primary, #0f766e);
	color: var(--thc-primary, #0f766e);
	transform: translateY(-1px);
}

.thc-account-pager a.is-active {
	background: var(--thc-primary, #0f766e);
	border-color: var(--thc-primary, #0f766e);
	color: #fff;
}

.thc-account-claim-cta {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--thc-border, #e2e8e5);
}

.thc-account-claim-cta a {
	color: var(--thc-primary-dark, #0d5f59);
	font-weight: 550;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: color 150ms ease;
}

.thc-account-claim-cta a:hover {
	color: var(--thc-primary, #0f766e);
}

.thc-account .thc-link {
	color: var(--thc-primary-dark, #0d5f59);
	text-decoration: none;
	font-weight: 550;
	transition: color 150ms ease;
}

.thc-account .thc-link:hover {
	color: var(--thc-primary, #0f766e);
}

.thc-account .thc-inline-form {
	display: inline;
	margin: 0;
}

.thc-account .thc-link-btn {
	background: none;
	border: 0;
	padding: 0;
	color: var(--thc-primary-dark, #0d5f59);
	cursor: pointer;
	font: inherit;
	font-weight: 550;
}

.thc-account .thc-link-btn.is-danger {
	color: #a33b3b;
}

.thc-account-address-list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: grid;
	gap: 12px;
}

.thc-account-address-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.thc-account-address-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 8px;
	padding-top: 10px;
	border-top: 1px dashed var(--thc-border, #e2e8e5);
}

.thc-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--thc-primary, #0f766e) 12%, #fff);
	color: var(--thc-primary-dark, #0d5f59);
	font-size: 0.72rem;
	font-weight: 700;
}

.thc-status {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.76rem;
	font-weight: 650;
	background: #eef2f1;
	color: #445;
	line-height: 1.3;
	white-space: nowrap;
}

.thc-status-paid,
.thc-pay-success {
	background: color-mix(in srgb, #10b981 14%, #fff);
	color: #0f5c4a;
}

.thc-status-pending_payment,
.thc-pay-pending,
.thc-pay-initiated {
	background: color-mix(in srgb, #f59e0b 16%, #fff);
	color: #8a6114;
}

.thc-status-failed,
.thc-pay-failed,
.thc-status-cancelled,
.thc-pay-cancelled {
	background: color-mix(in srgb, #ef4444 12%, #fff);
	color: #8f2f2f;
}

.thc-status-refunded,
.thc-pay-refunded,
.thc-pay-expired {
	background: color-mix(in srgb, #6366f1 12%, #fff);
	color: #3d4a7a;
}

.thc-account-auth {
	--thc-auth-flip-ms: 700ms;
	max-width: 520px;
	margin: 0 auto;
	padding-bottom: 48px;
}

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

.thc-password-wrap .thc-input {
	padding-inline-end: 44px;
}

.thc-password-toggle {
	position: absolute;
	inset-inline-end: 6px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--thc-muted, #5b6b66);
	cursor: pointer;
	line-height: 0;
	transition: color 0.15s ease, background 0.15s ease;
}

.thc-password-toggle:hover,
.thc-password-toggle:focus-visible,
.thc-password-toggle[aria-pressed="true"] {
	color: var(--thc-primary-dark, #31315e);
	background: var(--thc-soft, #efeff5);
	outline: none;
}

.thc-password-toggle svg {
	display: block;
	pointer-events: none;
}

/* Auth switcher (login ↔ register) */
.thc-auth-switch {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin-bottom: 16px;
	padding: 5px;
	border-radius: 14px;
	background: color-mix(in srgb, var(--thc-soft, #efeff5) 70%, #fff);
	border: 1px solid var(--thc-border, #d8d8e6);
}

.thc-auth-switch-btn {
	appearance: none;
	border: 0;
	margin: 0;
	padding: 11px 12px;
	border-radius: 11px;
	background: transparent;
	color: var(--thc-muted, #5b6b66);
	font: inherit;
	font-weight: 650;
	cursor: pointer;
	transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.thc-auth-switch-btn:hover {
	color: var(--thc-primary-dark, #31315e);
}

.thc-auth-switch-btn.is-active {
	background: var(--thc-primary, #3f3f79);
	color: #fff;
	box-shadow: 0 6px 16px rgba(63, 63, 121, 0.22);
}

.thc-auth-switch-btn:focus-visible {
	outline: 2px solid var(--thc-primary, #3f3f79);
	outline-offset: 2px;
}

/* Flip stage */
.thc-auth-stage {
	position: relative;
}

.thc-auth-flip {
	perspective: 1400px;
	perspective-origin: 50% 40%;
}

.thc-auth-flip-inner {
	position: relative;
	transform-style: preserve-3d;
	transition: transform var(--thc-auth-flip-ms) cubic-bezier(0.4, 0.05, 0.2, 1);
	will-change: transform;
}

.thc-auth-flip.is-register .thc-auth-flip-inner {
	transform: rotateY(-180deg);
}

.thc-auth-face {
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	width: 100%;
}

.thc-auth-face--login {
	position: relative;
	transform: rotateY(0deg);
}

.thc-auth-face--register {
	position: absolute;
	inset: 0 auto auto 0;
	width: 100%;
	transform: rotateY(180deg);
}

.thc-auth-card {
	margin: 0;
}

.thc-auth-forgot-row {
	margin: 4px 0 0;
	text-align: center;
}

.thc-auth-forgot-row .thc-link-btn {
	font-size: 0.9rem;
}

/* Lost password overlay box */
.thc-auth-lostpass {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: grid;
	align-items: start;
	justify-items: stretch;
	padding: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(10px) scale(0.98);
	transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear 220ms;
}

.thc-auth-lostpass.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	transition: opacity 220ms ease, transform 220ms ease, visibility 0s;
}

.thc-auth-stage.is-lostpass .thc-auth-flip {
	opacity: 0.18;
	filter: blur(1px);
	pointer-events: none;
	transform: scale(0.985);
	transition: opacity 220ms ease, filter 220ms ease, transform 220ms ease;
}

.thc-auth-lostpass-card {
	position: relative;
	box-shadow: 0 18px 48px rgba(63, 63, 121, 0.16);
	animation: thc-auth-lost-in 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.thc-auth-lostpass-card h2 {
	margin: 0 0 6px;
	font-size: 1.15rem;
	padding-inline-end: 36px;
}

.thc-auth-lostpass-close {
	position: absolute;
	inset-inline-end: 12px;
	top: 12px;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 10px;
	background: var(--thc-soft, #efeff5);
	color: var(--thc-primary-dark, #31315e);
	cursor: pointer;
}

.thc-auth-lostpass-close:hover,
.thc-auth-lostpass-close:focus-visible {
	background: color-mix(in srgb, var(--thc-primary, #3f3f79) 14%, #fff);
	outline: none;
}

@keyframes thc-auth-lost-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.thc-auth-flip-inner,
	.thc-auth-lostpass,
	.thc-auth-lostpass-card,
	.thc-auth-stage.is-lostpass .thc-auth-flip {
		transition: none !important;
		animation: none !important;
	}

	.thc-auth-flip.is-register .thc-auth-flip-inner {
		transform: none;
	}

	.thc-auth-flip.is-register .thc-auth-face--login {
		display: none;
	}

	.thc-auth-flip.is-login .thc-auth-face--register {
		display: none;
	}

	.thc-auth-face--register {
		position: relative;
		transform: none;
	}
}

.thc-account-pay-again {
	margin: 0 0 18px;
}

.thc-account-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 14px;
	font-size: 0.9rem;
}

.thc-bt-account-status {
	margin: 0 0 18px;
	padding: 16px;
	border-radius: 14px;
	border: 1px solid var(--thc-border, #e2e8e5);
	background: color-mix(in srgb, var(--thc-soft, #e8f2ef) 40%, #fff);
}

.thc-bt-account-status h3 {
	margin-top: 0;
}

@media (max-width: 900px) {
	.thc-account-layout {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.thc-account-nav {
		position: static;
		padding: 10px;
		border-radius: 16px;
	}

	.thc-account-nav-label {
		display: none;
	}

	.thc-account-nav ul {
		display: flex;
		flex-wrap: nowrap;
		gap: var(--thc-account-nav-gap, 8px);
		overflow-x: auto;
		padding-bottom: 2px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.thc-account-nav a {
		padding: 9px 12px;
		font-size: 0.86rem;
		white-space: nowrap;
		border-inline-start-width: 0;
		border-bottom: 2px solid transparent;
	}

	.thc-account-nav a.is-active {
		border-inline-start-color: transparent;
		border-bottom-color: var(--thc-primary, #0f766e);
	}

	.thc-account-main {
		padding: 16px 14px 20px;
		border-radius: 16px;
	}

	.thc-account-stats,
	.thc-account-meta,
	.thc-account-filters,
	.thc-account .thc-form-row {
		grid-template-columns: 1fr;
	}

	.thc-account-stats {
		grid-template-columns: 1fr;
	}

	/* Card-stack tables: tablet + mobile, no horizontal scroll */
	.thc-account-table-wrap {
		border: 0;
		background: transparent;
		border-radius: 0;
		overflow: visible;
	}

	.thc-account-table,
	.thc-data-table {
		min-width: 0 !important;
		width: 100%;
	}

	.thc-account-table thead,
	.thc-data-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.thc-account-table tbody,
	.thc-data-table tbody {
		display: grid;
		gap: 12px;
	}

	.thc-account-table tbody tr,
	.thc-data-table tbody tr {
		display: grid;
		gap: 0;
		padding: 12px 14px;
		border: 1px solid var(--thc-border, #e2e8e5);
		border-radius: 14px;
		background: var(--thc-account-card-bg, #fff);
		box-shadow: 0 1px 0 color-mix(in srgb, var(--thc-primary, #3f3f79) 6%, transparent);
	}

	.thc-account-table tbody tr:hover,
	.thc-data-table tbody tr:hover {
		background: var(--thc-account-card-bg, #fff);
	}

	.thc-account-table th,
	.thc-account-table td,
	.thc-data-table th,
	.thc-data-table td {
		display: grid;
		grid-template-columns: minmax(5.5rem, 36%) minmax(0, 1fr);
		gap: 10px;
		align-items: start;
		width: 100%;
		padding: 9px 0;
		border-bottom: 1px dashed color-mix(in srgb, var(--thc-border, #e2e8e5) 85%, transparent);
		text-align: start;
		font-size: 0.9rem;
	}

	.thc-account-table td:last-child,
	.thc-data-table td:last-child {
		border-bottom: 0;
		padding-bottom: 2px;
	}

	.thc-account-table td::before,
	.thc-data-table td::before {
		content: attr(data-label);
		color: var(--thc-muted, #5b6b66);
		font-size: 0.78rem;
		font-weight: 650;
		line-height: 1.45;
		padding-top: 0.15em;
	}

	.thc-account-table td:not([data-label])::before,
	.thc-account-table td[data-label=""]::before,
	.thc-data-table td:not([data-label])::before,
	.thc-data-table td[data-label=""]::before {
		content: none;
	}

	.thc-account-table td:not([data-label]),
	.thc-account-table td[data-label=""],
	.thc-account-table td.is-actions,
	.thc-data-table td:not([data-label]),
	.thc-data-table td[data-label=""],
	.thc-data-table td.is-actions {
		grid-template-columns: 1fr;
		padding-top: 12px;
	}

	.thc-account-table td.is-actions .thc-link,
	.thc-account-table td.is-actions .thc-btn,
	.thc-data-table td.is-actions .thc-link,
	.thc-data-table td.is-actions .thc-btn {
		width: 100%;
		min-height: 44px;
		box-sizing: border-box;
	}
}

@media (max-width: 560px) {
	.thc-account-welcome {
		flex-direction: column;
		align-items: flex-start;
	}

	.thc-account-nav-text {
		font-size: 0.82rem;
	}

	.thc-account-stat strong {
		font-size: 1.45rem;
	}

	.thc-account-table tbody,
	.thc-data-table tbody {
		gap: 10px;
	}

	.thc-account-table tbody tr,
	.thc-data-table tbody tr {
		padding: 12px;
		border-radius: 12px;
	}

	.thc-account-table th,
	.thc-account-table td,
	.thc-data-table th,
	.thc-data-table td {
		grid-template-columns: minmax(4.75rem, 34%) minmax(0, 1fr);
		font-size: 0.88rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.thc-account-flash,
	.thc-account-main.is-entering .thc-account-section > *,
	.thc-account-stat,
	.thc-account-nav a,
	.thc-account-pager a,
	.thc-account-shortcuts .thc-btn {
		animation: none !important;
		transition: none !important;
		transform: none !important;
	}

	.thc-account-main.is-loading::after {
		animation: none;
		border-top-color: var(--thc-border, #e2e8e5);
		opacity: 0.6;
	}
}
