/* ========== My Account — Modern Layout ========== */

/* Account page wrapper */
.account-page {
	background: #f8fafc;
	padding: 40px 0 60px;
	min-height: 70vh;
}

/* Flex layout: sidebar + content */
.account-page .woocommerce {
	display: flex;
	gap: 30px;
	align-items: flex-start;
}

/* ========== Navigation Sidebar ========== */
.account-nav {
	width: 260px;
	flex-shrink: 0;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
	overflow: hidden;
	position: sticky;
	top: 84px;
}

/* User section */
.account-nav__user {
	text-align: center;
	padding: 28px 20px 20px;
	border-bottom: 1px solid #f0f4f8;
}
.account-nav__avatar {
	margin-bottom: 10px;
}
.account-nav__avatar-img,
.account-nav__avatar img {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #e6f4ea;
}
.account-nav__name {
	font-size: 16px;
	font-weight: 700;
	color: #032d60;
}
.account-nav__email {
	font-size: 13px;
	color: #718096;
	margin-top: 2px;
	word-break: break-all;
}

/* Menu */
.account-nav__menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
}
.account-nav__item {
	margin: 0;
}
.account-nav__item a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 20px;
	font-size: 14px;
	font-weight: 600;
	color: #4a5568;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
	border-left: 3px solid transparent;
}
.account-nav__item a:hover {
	background: #f8fafc;
	color: #032d60;
}
.account-nav__item.is-active a,
.account-nav__item a[aria-current="page"] {
	background: #e6f4ea;
	color: #2e844a;
	font-weight: 700;
	border-left-color: #2e844a;
}
.account-nav__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: inherit;
}
.account-nav__icon svg {
	width: 18px;
	height: 18px;
}

/* Logout item */
.account-nav__item--logout {
	border-top: 1px solid #f0f4f8;
	margin-top: 4px;
	padding-top: 4px;
}
.account-nav__item--logout a {
	color: #718096;
}
.account-nav__item--logout a:hover {
	color: #e53e3e;
	background: #fef2f2;
}

/* ========== Content Area ========== */
.account-page .woocommerce-MyAccount-content {
	flex: 1;
	min-width: 0;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
	padding: 32px;
}

/* ========== Dashboard ========== */
.account-dashboard__welcome {
	margin-bottom: 28px;
}
.account-dashboard__greeting {
	font-size: 24px;
	font-weight: 800;
	color: #032d60;
	margin: 0 0 6px;
}
.account-dashboard__subtitle {
	font-size: 15px;
	color: #718096;
	margin: 0;
}

/* Metric tiles */
.account-dashboard__tiles {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-bottom: 32px;
}
.account-tile {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 20px;
	background: #f8fafc;
	border-radius: 12px;
	text-decoration: none;
	transition: background 0.2s, box-shadow 0.2s;
	border: 1px solid #e2e8f0;
}
.account-tile:hover {
	background: #fff;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	border-color: #cbd5e0;
}
.account-tile__icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.account-tile__icon--blue {
	background: #dbeafe;
	color: #2563eb;
}
.account-tile__icon--green {
	background: #dcfce7;
	color: #16a34a;
}
.account-tile__icon--purple {
	background: #f3e8ff;
	color: #7c3aed;
}
.account-tile__data {
	display: flex;
	flex-direction: column;
}
.account-tile__count {
	font-size: 22px;
	font-weight: 800;
	color: #032d60;
	line-height: 1;
}
.account-tile__label {
	font-size: 13px;
	color: #718096;
	font-weight: 500;
	margin-top: 2px;
}

/* Recent orders section */
.account-dashboard__section-title {
	font-size: 17px;
	font-weight: 700;
	color: #032d60;
	margin: 0 0 14px;
}
.account-dashboard__orders-table table {
	width: 100%;
	border-collapse: collapse;
}
.account-dashboard__orders-table th {
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	color: #718096;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 8px 12px;
	border-bottom: 2px solid #e2e8f0;
}
.account-dashboard__orders-table td {
	padding: 12px;
	font-size: 14px;
	color: #4a5568;
	border-bottom: 1px solid #f0f4f8;
}
.account-order-link {
	font-weight: 700;
	color: #2e844a;
	text-decoration: none;
}
.account-order-link:hover {
	text-decoration: underline;
}

/* Order statuses */
.account-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
}
.account-status--completed {
	background: #dcfce7;
	color: #166534;
}
.account-status--processing {
	background: #dbeafe;
	color: #1e40af;
}
.account-status--on-hold {
	background: #fef3c7;
	color: #92400e;
}
.account-status--pending {
	background: #f3f4f6;
	color: #6b7280;
}
.account-status--cancelled,
.account-status--refunded,
.account-status--failed {
	background: #fee2e2;
	color: #991b1b;
}

/* ========== Downloads ========== */
.account-downloads__title {
	font-size: 20px;
	font-weight: 800;
	color: #032d60;
	margin: 0 0 20px;
}
.account-downloads__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

/* Download card */
.download-card {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	border-top: 3px solid var(--card-accent, #2e844a);
	transition: box-shadow 0.2s;
}
.download-card:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.download-card__header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 20px 14px;
}
.download-card__icon {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	background: #f0fdf4;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.download-card__name {
	font-size: 16px;
	font-weight: 700;
	color: #032d60;
	margin: 0;
}
.download-card__version {
	font-size: 12px;
	color: #718096;
	background: #f0f4f8;
	padding: 1px 8px;
	border-radius: 8px;
	font-weight: 600;
}
.download-card__files {
	padding: 0 20px 16px;
}
.download-card__file {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-top: 1px solid #f0f4f8;
}
.download-card__file-name {
	font-size: 14px;
	color: #4a5568;
	font-weight: 500;
}
.download-card__remaining {
	font-size: 12px;
	color: #718096;
	display: block;
}
.download-card__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 16px;
	background: #2e844a;
	color: #fff;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.2s;
	white-space: nowrap;
}
.download-card__btn:hover {
	background: #276b3e;
	color: #fff;
}
.download-card__expires {
	padding: 10px 20px;
	background: #fefce8;
	font-size: 12px;
	color: #854d0e;
	font-weight: 500;
}

/* Empty downloads */
.account-downloads-empty {
	text-align: center;
	padding: 50px 20px;
}
.account-downloads-empty__icon {
	margin-bottom: 16px;
}
.account-downloads-empty h3 {
	font-size: 18px;
	font-weight: 700;
	color: #032d60;
	margin: 0 0 8px;
}
.account-downloads-empty p {
	font-size: 14px;
	color: #718096;
	margin: 0 0 20px;
}
.account-downloads-empty__btn {
	display: inline-block;
	padding: 10px 24px;
	background: #2e844a;
	color: #fff;
	border-radius: 8px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	transition: background 0.2s;
}
.account-downloads-empty__btn:hover {
	background: #276b3e;
	color: #fff;
}

/* ========== Licenses (moved from inline) ========== */
.itlife-my-licenses table {
	width: 100%;
	border-collapse: collapse;
}
.itlife-my-licenses th,
.itlife-my-licenses td {
	padding: 10px 14px;
	border-bottom: 1px solid #f0f4f8;
	text-align: left;
}
.itlife-my-licenses th {
	background: #f8fafc;
	font-weight: 600;
	font-size: 12px;
	color: #718096;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 2px solid #e2e8f0;
}
.itlife-my-licenses td {
	font-size: 14px;
	color: #4a5568;
}
.itlife-my-licenses code {
	background: #f0f4f8;
	padding: 3px 10px;
	font-size: 13px;
	letter-spacing: 0.5px;
	border-radius: 6px;
	font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.itlife-my-licenses .itlife-status {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
}
.itlife-my-licenses .itlife-status-active {
	background: #dcfce7;
	color: #166534;
}
.itlife-my-licenses .itlife-status-inactive {
	background: #f3f4f6;
	color: #6b7280;
}
.itlife-my-licenses .itlife-status-expired {
	background: #fef3c7;
	color: #92400e;
}
.itlife-my-licenses .itlife-status-revoked {
	background: #fee2e2;
	color: #991b1b;
}
.itlife-my-licenses .itlife-status-suspended {
	background: #fef3c7;
	color: #78350f;
}
.itlife-deactivate-btn {
	background: #e53e3e;
	color: #fff;
	border: none;
	padding: 6px 14px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	transition: background 0.2s;
}
.itlife-deactivate-btn:hover {
	background: #c53030;
}
.itlife-deactivate-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ========== WC Forms Override (inside account) ========== */
.account-page .woocommerce form h3 {
	font-size: 18px;
	font-weight: 700;
	color: #032d60;
	margin-bottom: 16px;
}
.account-page .woocommerce form .form-row {
	margin-bottom: 16px;
}
.account-page .woocommerce form .form-row label {
	font-size: 13px;
	font-weight: 600;
	color: #4a5568;
	margin-bottom: 4px;
	display: block;
}
.account-page .woocommerce form .form-row input.input-text,
.account-page .woocommerce form .form-row select {
	width: 100%;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 14px;
	font-family: 'Nunito Sans', sans-serif;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.account-page .woocommerce form .form-row input.input-text:focus,
.account-page .woocommerce form .form-row select:focus {
	border-color: #2e844a;
	outline: none;
	box-shadow: 0 0 0 3px rgba(46,132,74,0.1);
}

/* WC Orders table inside account */
.account-page .woocommerce-orders-table {
	border-radius: 12px;
	overflow: hidden;
}
.account-page .woocommerce-orders-table th {
	background: #f8fafc;
	font-size: 12px;
	font-weight: 600;
	color: #718096;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* ========== Responsive ========== */
@media (max-width: 860px) {
	.account-page .woocommerce {
		flex-direction: column;
	}
	.account-nav {
		width: 100%;
		position: static;
	}
	.account-nav__user {
		display: flex;
		align-items: center;
		gap: 14px;
		text-align: left;
		padding: 16px 20px;
	}
	.account-nav__avatar {
		margin-bottom: 0;
	}
	.account-nav__avatar img {
		width: 48px;
		height: 48px;
	}
	.account-nav__menu {
		display: flex;
		overflow-x: auto;
		padding: 0 8px;
		gap: 0;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.account-nav__menu::-webkit-scrollbar {
		display: none;
	}
	.account-nav__item a {
		padding: 10px 14px;
		white-space: nowrap;
		font-size: 13px;
		border-left: none;
		border-bottom: 3px solid transparent;
	}
	.account-nav__item.is-active a {
		border-left-color: transparent;
		border-bottom-color: #2e844a;
	}
	.account-nav__item--logout {
		border-top: none;
		margin-top: 0;
		padding-top: 0;
		margin-left: auto;
	}
	.account-page .woocommerce-MyAccount-content {
		padding: 20px;
	}
	.account-dashboard__tiles {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	.account-downloads__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.account-page {
		padding: 20px 0 40px;
	}
	.account-page .woocommerce-MyAccount-content {
		padding: 16px;
		border-radius: 12px;
	}
	.account-nav__user {
		padding: 12px 16px;
	}
	.itlife-my-licenses {
		overflow-x: auto;
	}
	.download-card__file {
		flex-direction: column;
		align-items: flex-start;
	}
}
