.elc-dashboard,
.elc-voucher-form,
.elc-lesson {
	--elc-radius: 14px;
	--elc-border: #e5e7eb;
	--elc-bg: #ffffff;
	--elc-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
	--elc-primary: #4f46e5;
	--elc-primary-dark: #4338ca;
	--elc-text: #1f2937;
	--elc-muted: #6b7280;
	font-family: 'Lora', Georgia, serif;
	color: var(--elc-text);
	max-width: 900px;
	margin: 0 auto;
}

/* Dashboard */

.elc-dashboard-section {
	background: var(--elc-bg);
	border: 1px solid var(--elc-border);
	border-radius: var(--elc-radius);
	box-shadow: var(--elc-shadow);
	padding: 20px 24px;
	margin-bottom: 20px;
}

.elc-dashboard-section h3 {
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	color: var(--elc-text);
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--elc-border);
}

.elc-dashboard-notifications ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.elc-dashboard-notifications li {
	padding: 10px 14px;
	border-left: 3px solid var(--elc-primary);
	background: #f5f5ff;
	border-radius: 8px;
	margin-bottom: 8px;
	font-size: 14px;
}

.elc-dashboard-notifications li:last-child {
	margin-bottom: 0;
}

.elc-dashboard-notifications p {
	color: var(--elc-muted);
	font-size: 14px;
	margin: 0;
}

.elc-dashboard-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.elc-dashboard-table th {
	text-align: left;
	padding: 10px 12px;
	color: var(--elc-muted);
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-bottom: 1px solid var(--elc-border);
}

.elc-dashboard-table td {
	padding: 12px;
	border-bottom: 1px solid var(--elc-border);
	vertical-align: middle;
}

.elc-dashboard-table tr:last-child td {
	border-bottom: none;
}

.elc-dashboard-table a {
	color: var(--elc-primary);
	text-decoration: none;
	font-weight: 600;
}

.elc-dashboard-table a:hover {
	color: var(--elc-primary-dark);
	text-decoration: underline;
}

.elc-progress-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.elc-progress-bar {
	position: relative;
	background: #eef0f4;
	border-radius: 999px;
	height: 8px;
	width: 100px;
	overflow: hidden;
	flex-shrink: 0;
}

.elc-progress-bar > span {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	background: var(--elc-primary);
	border-radius: 999px;
}

.elc-progress-label {
	font-size: 13px;
	color: var(--elc-muted);
	min-width: 34px;
}

/* Voucher form */

.elc-voucher-form {
	max-width: 480px;
}

.elc-voucher-form form {
	background: var(--elc-bg);
	border: 1px solid var(--elc-border);
	border-radius: var(--elc-radius);
	box-shadow: var(--elc-shadow);
	padding: 24px;
}

.elc-voucher-form label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
}

.elc-voucher-form input[type="text"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--elc-border);
	border-radius: 10px;
	font-size: 15px;
	margin-bottom: 16px;
	box-sizing: border-box;
}

.elc-voucher-form input[type="text"]:focus {
	outline: none;
	border-color: var(--elc-primary);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.elc-voucher-form .button {
	background: var(--elc-primary);
	border-color: var(--elc-primary);
	border-radius: 10px;
	padding: 8px 20px;
	font-weight: 600;
	height: auto;
	color: #fff;
	text-shadow: none;
	box-shadow: none;
}

.elc-voucher-form .button:hover,
.elc-voucher-form .button:focus {
	background: var(--elc-primary-dark);
	border-color: var(--elc-primary-dark);
	color: #fff;
}

.elc-notice {
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 14px;
	margin-bottom: 16px;
}

.elc-notice-success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.elc-notice-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* Lesson (text/video/audio + hỏi đáp) */

.elc-lesson-media {
	margin-bottom: 20px;
	border-radius: var(--elc-radius);
	overflow: hidden;
	box-shadow: var(--elc-shadow);
	background: #000;
}

.elc-lesson-media iframe,
.elc-lesson-media video {
	width: 100%;
	aspect-ratio: 16 / 9;
	display: block;
	border: 0;
}

.elc-lesson-media audio {
	width: 100%;
	display: block;
}

.elc-lesson-content {
	background: var(--elc-bg);
	border: 1px solid var(--elc-border);
	border-radius: var(--elc-radius);
	box-shadow: var(--elc-shadow);
	padding: 20px 24px;
	margin-bottom: 20px;
	line-height: 1.7;
}

.elc-lesson-qa {
	background: var(--elc-bg);
	border: 1px solid var(--elc-border);
	border-radius: var(--elc-radius);
	box-shadow: var(--elc-shadow);
	padding: 20px 24px;
}

.elc-lesson-qa h3 {
	margin-top: 0;
	font-size: 18px;
	font-weight: 600;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--elc-border);
}

.elc-lesson-comment-list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.elc-lesson-comment-list .comment {
	padding: 14px 0;
	border-bottom: 1px solid var(--elc-border);
}

.elc-lesson-comment-list .comment:last-child {
	border-bottom: none;
}

.elc-lesson-qa textarea,
.elc-lesson-qa input[type="text"],
.elc-lesson-qa input[type="email"],
.elc-lesson-qa input[type="url"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--elc-border);
	border-radius: 10px;
	font-size: 14px;
	box-sizing: border-box;
	margin-bottom: 12px;
}

.elc-lesson-qa .submit input[type="submit"],
.elc-lesson-qa #submit {
	background: var(--elc-primary);
	border: none;
	color: #fff;
	padding: 8px 20px;
	border-radius: 10px;
	font-weight: 600;
	cursor: pointer;
}

.elc-lesson-qa .submit input[type="submit"]:hover,
.elc-lesson-qa #submit:hover {
	background: var(--elc-primary-dark);
}

/* Trang "Gói học đã đăng ký" / "Tiến độ học tập" (chung cho cả 4 module) */

.elc-account-panel {
	font-family: 'Lora', Georgia, serif;
	max-width: 900px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	padding: 24px 28px;
}

.elc-account-panel h2 {
	margin-top: 0;
}

.elc-account-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.elc-account-table th {
	text-align: left;
	color: #6b7280;
	font-size: 12px;
	text-transform: uppercase;
	padding: 10px;
	border-bottom: 1px solid #e5e7eb;
}

.elc-account-table td {
	padding: 12px 10px;
	border-bottom: 1px solid #f3f4f6;
}

.elc-account-progress-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #f3f4f6;
}

.elc-account-progress-title {
	flex: 0 0 260px;
	font-size: 14px;
}

.elc-account-progress-bar {
	flex: 1;
	background: #eef0f4;
	border-radius: 999px;
	height: 10px;
	overflow: hidden;
}

.elc-account-progress-bar span {
	display: block;
	height: 100%;
	background: #4f46e5;
	border-radius: 999px;
}

.elc-account-progress-pct {
	width: 42px;
	text-align: right;
	font-weight: 600;
	font-size: 13px;
	color: #4b5563;
}

/* Trang "Gói học đã đăng ký" - lưới thẻ khóa học kiểu MasterStudy */

.elc-account-panel-wide {
	max-width: 1600px;
	width: 100%;
	box-sizing: border-box;
}

.elc-account-back {
	margin: 0 0 16px;
	font-size: 14px;
}

/* Cổng giáo viên (Teacher Portal) */

.elc-teacher-portal-tabs {
	display: flex;
	gap: 6px;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.elc-teacher-portal-tab {
	padding: 10px 18px;
	font-weight: 600;
	font-size: 14px;
	color: #6b7280;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.elc-teacher-portal-tab:hover {
	color: #4f46e5;
}

.elc-teacher-portal-tab.active {
	color: #4f46e5;
	border-bottom-color: #4f46e5;
}

.elc-teacher-portal-modulenav {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.elc-teacher-portal-modulelink {
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	font-size: 13px;
	font-weight: 600;
	color: #4b5563;
	text-decoration: none;
}

.elc-teacher-portal-modulelink.active {
	background: #4f46e5;
	color: #fff;
	border-color: #4f46e5;
}

.elc-teacher-portal-studentpicker select {
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	min-width: 280px;
	font-family: inherit;
}

.elc-teacher-portal-studentdata h3 {
	margin: 24px 0 10px;
	font-size: 16px;
}

.elc-teacher-portal-progresstable {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 16px;
	font-size: 14px;
}

.elc-teacher-portal-progresstable th,
.elc-teacher-portal-progresstable td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #f3f4f6;
}

.elc-teacher-portal-progresstable th {
	color: #6b7280;
	font-size: 12px;
	text-transform: uppercase;
}

.elc-teacher-portal-mistakecount {
	font-size: 14px;
	color: #4b5563;
	margin: 4px 0 12px;
}

/* Nút "Tiếp tục với Google" chèn vào form đăng nhập/đăng ký gốc WooCommerce */

.elc-woo-social-login {
	margin: 0 0 16px;
}

.elc-woo-social-login-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 16px;
	border: 1px solid #dadce0;
	border-radius: 8px;
	background: #fff;
	color: #3c4043;
	font-weight: 600;
	text-decoration: none;
}

.elc-woo-social-login-btn:hover {
	background: #f8f9fa;
	color: #3c4043;
}

.elc-woo-social-login-btn img {
	width: 18px;
	height: 18px;
}

.elc-woo-social-login-sep {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #9ca3af;
	font-size: 13px;
	margin: 14px 0;
}

.elc-woo-social-login-sep::before,
.elc-woo-social-login-sep::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e5e7eb;
}

.elc-account-back a {
	color: #4f46e5;
	text-decoration: none;
	font-weight: 600;
}

.elc-account-back a:hover {
	text-decoration: underline;
}

.elc-account-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
}

@media (max-width: 1024px) {
	.elc-account-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

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

.elc-account-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 24px;
}

.elc-account-page-btn {
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	color: #4b5563;
	font-family: inherit;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
}

.elc-account-page-btn:hover {
	border-color: #4f46e5;
	color: #4f46e5;
}

.elc-account-page-btn.active {
	background: #4f46e5;
	border-color: #4f46e5;
	color: #fff;
}

.elc-account-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.elc-account-card:hover {
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
	color: inherit;
}

.elc-account-card-thumb {
	aspect-ratio: 16 / 10;
	background: #f3f4f6;
	overflow: hidden;
}

.elc-account-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.elc-account-card-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 28px;
}

.elc-account-card-body {
	padding: 11px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.elc-account-card-tag {
	align-self: flex-start;
	background: #eef2ff;
	color: #4338ca;
	font-size: 10px;
	font-weight: 700;
	border-radius: 999px;
	padding: 2px 8px;
}

.elc-account-card-title {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
}

.elc-account-card-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 10px;
	color: #6b7280;
}

.elc-account-card-btn {
	margin-top: auto;
	padding-top: 7px;
	font-weight: 700;
	color: #4f46e5;
	font-size: 12px;
}

.elc-account-card-progress {
	display: flex;
	align-items: center;
	gap: 8px;
}

.elc-account-card-progress .elc-account-progress-bar {
	flex: 1;
	background: #eef0f4;
	border-radius: 999px;
	height: 7px;
	overflow: hidden;
}

.elc-account-card-progress .elc-account-progress-bar span {
	display: block;
	height: 100%;
	background: #4f46e5;
	border-radius: 999px;
}

.elc-account-card-progress-pct {
	font-size: 9px;
	font-weight: 700;
	color: #6b7280;
	white-space: nowrap;
}

/* Banner trang "Gói học đã đăng ký" - cấu hình ở wp-admin > ELC Core > Banner.
   Banner nằm NGOÀI khung trắng .elc-account-panel (không chung nền/viền):
   banner dọc là 1 khối riêng cạnh khung, banner ngang nằm hẳn dưới khung. */

/* Khung + banner canh giữa trang nhưng rộng hơn nhiều so với trước (giới hạn
   ở elc-account-panel-wide/max-width bên trên) - KHÔNG dùng mẹo 100vw/margin
   âm vì site có sidebar/khung riêng của theme khiến nó bị lệch hẳn sang 1 bên. */
.elc-account-enrolled-outer,
.elc-account-banner-row {
	max-width: 1600px;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}

.elc-account-enrolled-outer {
	display: flex;
	align-items: stretch;
	gap: 24px;
}

.elc-account-enrolled-outer .elc-account-panel {
	flex: 1;
	min-width: 0;
	margin: 0;
}

.elc-account-side-banner {
	flex: 0 0 220px;
}

/* Ảnh banner tự cắt (object-fit: cover) theo đúng 1 khung hình cố định nên
   mọi banner luôn đối xứng kích thước với nhau, bất kể ảnh gốc to/nhỏ khác nhau. */
.elc-account-side-banner img {
	width: 100%;
	height: 100%;
	aspect-ratio: 9 / 16;
	object-fit: cover;
	border-radius: 14px;
	display: block;
}

.elc-account-banner-row {
	display: flex;
	gap: 16px;
	margin-top: 24px;
}

.elc-account-row-banner-item {
	flex: 1;
	min-width: 0;
}

.elc-account-row-banner-item img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
	border-radius: 14px;
}

@media (max-width: 782px) {
	.elc-account-enrolled-outer {
		flex-direction: column;
	}

	.elc-account-side-banner {
		flex-basis: auto;
		width: 100%;
	}

	.elc-account-side-banner img {
		aspect-ratio: 16 / 9;
	}

	.elc-account-banner-row {
		flex-wrap: wrap;
	}

	.elc-account-row-banner-item {
		flex: 1 1 calc(50% - 8px);
	}
}
