/* =========================================================================
   HEC LMS — My Account app shell (sidebar + main) and learner dashboard.
   Loaded only on the WooCommerce account page.
   ========================================================================= */

.woocommerce-account .woocommerce { max-width: none; margin: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation { display: none !important; }
.woocommerce-account .woocommerce-MyAccount-content { width: 100% !important; float: none !important; margin: 0 !important; }
.woocommerce-account .woocommerce-notices-wrapper:empty { display: none; }

/* The --d-* tokens are also set on :root (tokens only — never the layout below): this stylesheet's unscoped
   .hec-btn rules reach buttons outside the dashboard shell (the mini-basket's Checkout). */
:root { --d-navy: #00247D; --d-navy-dk: #001A5C; --d-navy-lt: #1F4BB0; --d-gold: #F5B82E; --d-gold-soft: #F8CD6A; --d-ink: #1A1D21; --d-grey: #5C6672; --d-line: #E4E5E9; --d-pale: #EAF0FA; --d-wash: #F8FAFE; --d-card: #F3F6FC; }
.hec-dash {
	--d-navy: #00247D;
	--d-navy-dk: #001A5C;
	--d-navy-lt: #1F4BB0;
	--d-gold: #F5B82E;
	--d-gold-soft: #F8CD6A;
	--d-ink: #1A1D21;
	--d-grey: #5C6672;
	--d-line: #E4E5E9;
	--d-pale: #EAF0FA;
	--d-wash: #F8FAFE;
	--d-card: #F3F6FC;
	font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color: var(--d-ink);
	display: grid;
	grid-template-columns: 272px minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	margin: 0;
}

/* ---- Sidebar ---- */
.hec-dash-side {
	position: sticky; top: calc(var(--hec-header-h, 80px) + 24px);
	background: #fff; border: 1px solid var(--d-line); border-radius: 18px;
	padding: 22px 18px 20px; display: flex; flex-direction: column; gap: 18px;
}
.hec-dash-user { display: flex; align-items: center; gap: 12px; padding: 0 4px 18px; border-bottom: 1px solid var(--d-line); }
.hec-dash-avatar {
	flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
	background: linear-gradient(140deg, var(--d-navy-dk), var(--d-navy-lt)); color: var(--d-gold);
	font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 18px; letter-spacing: .03em;
	display: inline-flex; align-items: center; justify-content: center;
}
.hec-dash-user-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hec-dash-user-text strong { font-size: 15px; color: var(--d-navy); font-weight: 600; line-height: 1.25; }
.hec-dash-user-text span { font-size: 12.5px; color: var(--d-grey); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hec-dash-nav { display: flex; flex-direction: column; gap: 4px; }
.hec-dash-nav-item {
	display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
	color: var(--d-ink); text-decoration: none; font-size: 14.5px; font-weight: 500; line-height: 1.2;
	transition: background .15s ease, color .15s ease;
}
.hec-dash-nav-item svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--d-navy-lt); }
.hec-dash-nav-item:hover { background: var(--d-pale); color: var(--d-navy); }
.hec-dash-nav-item.is-active { background: var(--d-navy); color: #fff; }
.hec-dash-nav-item.is-active svg { color: var(--d-gold); }
.hec-dash-nav-n { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; background: var(--d-gold); color: var(--d-navy-dk); border-radius: 100px; padding: 2px 9px; }
.hec-dash-nav-item--out { margin-top: 6px; color: var(--d-grey); border-top: 1px solid var(--d-line); border-radius: 0 0 10px 10px; padding-top: 15px; }
.hec-dash-nav-item--out svg { color: var(--d-grey); }
.hec-dash-browse { width: 100%; }

/* ---- Main column ---- */
.hec-dash-main { min-width: 0; }
.hec-dash-head { margin: 4px 0 30px; }
.hec-dash-hello { font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--d-navy-lt); margin: 0 0 6px; }
.hec-dash-head h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(28px, 3.6vw, 40px); color: var(--d-navy); margin: 0 0 8px; font-weight: 600; line-height: 1.15; }
.hec-dash-sub-h { margin: 0; color: var(--d-grey); font-size: 15px; }

/* Stat tiles */
.hec-dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 44px; }
.hec-tile {
	position: relative; border-radius: 16px; padding: 24px 22px; overflow: hidden;
	background: #fff; border: 1px solid var(--d-line);
	display: flex; flex-direction: column; gap: 6px;
}
.hec-tile-num { font-family: 'Playfair Display', Georgia, serif; font-size: 40px; font-weight: 700; line-height: 1; color: var(--d-navy); }
.hec-tile-lbl { font-size: 13px; color: var(--d-grey); font-weight: 500; }
.hec-tile::after { content: ""; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; opacity: .14; }
.hec-tile--purchased::after { background: var(--d-navy); }
.hec-tile--prog::after { background: var(--d-gold); }
.hec-tile--done::after { background: var(--d-navy-lt); }
.hec-tile--cert { background: linear-gradient(140deg, var(--d-navy-dk), var(--d-navy-lt)); border-color: transparent; }
.hec-tile--cert .hec-tile-num { color: var(--d-gold); }
.hec-tile--cert .hec-tile-lbl { color: #CFD5E5; }
.hec-tile--cert::after { background: var(--d-gold); opacity: .25; }

/* Section heading */
.hec-dash-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 22px; }
.hec-dash-h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 26px; font-weight: 600; color: var(--d-navy); margin: 0; }
.hec-dash-more { color: var(--d-navy-lt); text-decoration: none; font-size: 14px; font-weight: 600; }
.hec-dash-more:hover { text-decoration: underline; }

/* Course grid */
.hec-dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.hec-dcard {
	background: #fff; border: 1px solid var(--d-line); border-radius: 16px; overflow: hidden;
	display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease;
}
.hec-dcard:hover { box-shadow: 0 16px 44px rgba(0,36,125,.13); transform: translateY(-2px); }
.hec-dcard-media { position: relative; aspect-ratio: 16/9; background: #00247D; }
/* The course icon is a square (the mark on green): show it whole inside the bar, on the same green, rather than cropping it. */
.hec-dcard-media img { width: 100%; height: 100%; object-fit: contain; object-position: right center; display: block; padding: 4px 14px 4px 0; box-sizing: border-box; }
.hec-dcard-ph { position: absolute; inset: 0; background: linear-gradient(135deg, var(--d-navy), var(--d-navy-lt)); }
.hec-dcard-flag {
	position: absolute; top: 12px; left: 12px; background: var(--d-gold); color: var(--d-navy-dk);
	font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 100px;
}
.hec-dcard-flag--lock { background: #fff; color: #b32d2e; }
.hec-dcard-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hec-dcard-title { font-size: 17px; line-height: 1.35; color: var(--d-navy); margin: 0; font-weight: 600; }
.hec-dcard-hours { font-size: 12.5px; color: var(--d-grey); margin: -4px 0 0; }

.hec-dcard-progline { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.hec-progress { height: 8px; background: var(--d-line); border-radius: 100px; overflow: hidden; flex: 1; }
.hec-progress > span { display: block; height: 100%; background: var(--d-gold); border-radius: 100px; transition: width .4s ease; }
.hec-dcard.is-complete .hec-progress > span { background: var(--d-navy-lt); }
.hec-dcard-pct { font-size: 12.5px; font-weight: 600; color: var(--d-grey); min-width: 34px; text-align: right; }
.hec-dcard-meta { font-size: 13px; color: var(--d-grey); margin: 0; }
.hec-dcard-lock { font-size: 13.5px; color: #b32d2e; font-weight: 500; margin: 4px 0 0; }

.hec-dcard-actions { margin-top: auto; padding-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.hec-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: inherit; font-weight: 600; font-size: 13.5px; line-height: 1;
	padding: 12px 18px; border-radius: 8px; border: 2px solid transparent;
	text-decoration: none; cursor: pointer; transition: background .18s ease, transform .08s ease;
}
.hec-btn svg { width: 16px; height: 16px; }
.hec-btn:hover { transform: translateY(-1px); }
.hec-btn--lg { padding: 15px 28px; font-size: 15px; }
.hec-btn--buy { background: var(--d-gold); color: var(--d-navy-dk); }
.hec-btn--buy:hover { background: var(--d-gold-soft); }
.hec-btn--start { background: var(--d-navy); color: #fff; }
.hec-btn--start:hover { background: var(--d-navy-dk); }
.hec-btn--cert { background: transparent; border-color: var(--d-navy); color: var(--d-navy); }
.hec-btn--cert:hover { background: var(--d-navy); color: #fff; }
.hec-dash a.hec-btn--start { color: #fff; }
.hec-dash a.hec-btn--buy { color: var(--d-navy-dk); }

/* Empty state */
.hec-dash-empty {
	text-align: center; padding: 64px 24px; background: var(--d-wash);
	border: 1px solid var(--d-line); border-radius: 18px; max-width: 640px;
}
.hec-dash-empty-ico { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; background: var(--d-pale); color: var(--d-navy-lt); align-items: center; justify-content: center; margin-bottom: 16px; }
.hec-dash-empty-ico svg { width: 28px; height: 28px; }
.hec-dash-empty h2 { font-family: 'Playfair Display', Georgia, serif; color: var(--d-navy); font-size: 24px; margin: 0 0 10px; font-weight: 600; }
.hec-dash-empty p { color: var(--d-grey); margin: 0 auto 24px; max-width: 46ch; }

/* ---- WooCommerce sub-pages inside the shell (orders / view order / account details) ---- */
.hec-dash-sub { background: #fff; border: 1px solid var(--d-line); border-radius: 18px; padding: 30px 32px 34px; }
.hec-dash-sub > h2, .hec-dash-sub .woocommerce-order-details__title, .hec-dash-sub .woocommerce-customer-details__title { font-family: 'Playfair Display', Georgia, serif; color: var(--d-navy); font-weight: 600; font-size: 24px; margin: 0 0 18px; }
.hec-dash-sub .woocommerce-EditAccountForm { max-width: 720px; }
.hec-dash-sub .woocommerce-EditAccountForm fieldset { border: 0; padding: 22px 0 0; margin: 22px 0 0; border-top: 1px solid var(--d-line); }
.hec-dash-sub .woocommerce-EditAccountForm legend { font-family: 'Playfair Display', Georgia, serif; color: var(--d-navy); font-size: 19px; margin-bottom: 10px; float: left; width: 100%; }
.hec-dash-sub .woocommerce-EditAccountForm .form-row { float: none; width: 100%; margin-bottom: 18px; }
.hec-dash-sub .woocommerce-EditAccountForm .form-row-first, .hec-dash-sub .woocommerce-EditAccountForm .form-row-last { width: 100%; }
.hec-dash-sub .woocommerce-EditAccountForm label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--d-ink); }
.hec-dash-sub .woocommerce-EditAccountForm input.input-text { width: 100%; }
.hec-dash-sub .woocommerce-EditAccountForm .description, .hec-dash-sub .woocommerce-EditAccountForm em { color: var(--d-grey); font-size: 13px; }
.hec-dash-sub .woocommerce-orders-table { width: 100%; border: 1px solid var(--d-line); border-radius: 14px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
.hec-dash-sub .woocommerce-orders-table th { background: var(--d-pale); color: var(--d-navy); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 14px; text-align: left; }
.hec-dash-sub .woocommerce-orders-table td { padding: 14px; border-top: 1px solid var(--d-line); font-size: 14.5px; vertical-align: middle; }
.hec-dash-sub .woocommerce-orders-table .button { padding: 9px 14px; font-size: 13px; }
.hec-dash-sub .woocommerce-info, .hec-dash-sub .woocommerce-message { margin-bottom: 18px; }
.hec-dash-sub .woocommerce-table--order-details { width: 100%; }
.hec-dash-sub .woocommerce-column--billing-address, .hec-dash-sub .woocommerce-column--shipping-address { margin-top: 20px; }

/* ---- Responsive ---- */
@media (max-width: 1080px) {
	.hec-dash { grid-template-columns: 240px minmax(0, 1fr); gap: 28px; }
	.hec-dash-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
	.hec-dash { grid-template-columns: 1fr; gap: 24px; }
	.hec-dash-side { position: static; padding: 18px 16px; }
	.hec-dash-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
	.hec-dash-nav-item { padding: 10px 14px; border-radius: 100px; font-size: 14px; }
	.hec-dash-nav-item--out { margin: 0; border: 0; padding-top: 10px; }
	.hec-dash-sub { padding: 22px 18px 26px; }
}
@media (max-width: 520px) {
	.hec-dash-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
	.hec-tile { padding: 18px 16px; }
	.hec-tile-num { font-size: 32px; }
	.hec-dash-grid { grid-template-columns: 1fr; }
	.hec-dash-user { padding-bottom: 14px; }
}

/* Face-to-face bookings and certificates lists (dashboard) */
.hec-dash-f2f, .hec-dash-certs { margin-top: 34px; }
.hec-dash-note { color: var(--grey, #5C6672); font-size: 14.5px; margin: 6px 0 0; }
.hec-dash-f2f-list, .hec-dash-cert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hec-dash-f2f-item, .hec-dash-cert-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--line, #D9E1EF); border-radius: 12px; padding: 14px 18px; }
.hec-dash-f2f-item .hec-dcard-title, .hec-dash-cert-item .hec-dcard-title { margin: 0 0 3px; }
.hec-dash-f2f-item .hec-dcard-hours, .hec-dash-cert-item .hec-dcard-hours { margin: 0; }
.hec-dash-f2f-item .hec-dcard-flag, .hec-dash-cert-item .hec-btn { position: static; flex: 0 0 auto; }
.hec-dcard-flag--upcoming { background: var(--gold, #F5B82E); color: #1A1D21; }
.hec-dash-f2f-item.is-past { opacity: .75; }
@media (max-width: 560px) { .hec-dash-f2f-item, .hec-dash-cert-item { flex-direction: column; align-items: flex-start; } }

/* Compact course cards (3 Oct 2026): a slim colour band instead of a 16:9 image block, tighter body, three or four to a row. */
.hec-dash-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.hec-dcard-media { aspect-ratio: auto; height: 52px; }
.hec-dcard-media img { height: 52px; padding: 3px 12px 3px 0; }
.hec-dcard-flag { top: 10px; left: 10px; font-size: 11px; padding: 3px 9px; }
.hec-dcard-body { padding: 14px 16px 16px; gap: 8px; }
.hec-dcard-title { font-size: 15px; line-height: 1.3; }
.hec-dcard-hours { font-size: 12px; }
.hec-dcard-meta { font-size: 12px; margin: 0; }
.hec-dcard-actions { gap: 8px; }
.hec-dcard-actions .hec-btn { padding: 8px 12px; font-size: 13px; }
@media (max-width: 760px) { .hec-dash-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .hec-dcard-body { padding: 12px 12px 14px; } .hec-dcard-title { font-size: 14px; } }
@media (max-width: 480px) { .hec-dash-grid { grid-template-columns: 1fr; } }
