.wpllms-course-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 26px;
	margin: 20px 0;
}
.wpllms-course-card {
	border: 1px solid var(--wpllms-border, #e2e2e2);
	border-radius: 16px;
	padding: 18px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(16,24,40,0.04);
	transition: transform .2s ease, box-shadow .2s ease;
}
.wpllms-course-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(16,24,40,0.09); }
.wpllms-course-card img { width: 100%; height: auto; border-radius: 10px; display: block; }
.wpllms-course-card h3 { margin: 14px 0 6px; font-size: 17px; }
.wpllms-course-card h3 a { text-decoration: none; }
.wpllms-price { font-weight: 700; color: var(--wpllms-button, #D97757); }
.wpllms-enrolled-badge { color: #1a7a2e; font-weight: 700; background: #eafaf0; border-radius: 20px; padding: 4px 12px; font-size: 13px; display: inline-block; }
.wpllms-button { display: inline-block; margin-top: 10px; }
.wpllms-payment-methods { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.wpllms-message { color: #a00; margin-top: 8px; }
.wpllms-enroll-gate {
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	background: #f8f8f8;
}
.wpllms-lesson-list li { margin-bottom: 6px; }
.wpllms-quiz-list li { margin-bottom: 6px; }
.wpllms-lesson-complete-badge { color: #1a7a2e; font-weight: 600; }
.wpllms-dashboard-link { font-size: 13px; }
.wpllms-dashboard-link a { text-decoration: none; }

.wpllms-cart { max-width: 700px; }
.wpllms-cart-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.wpllms-cart-table th, .wpllms-cart-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #eee; vertical-align: middle; }
.wpllms-cart-item-title { display: flex; align-items: center; gap: 12px; }
.wpllms-cart-item-title img { width: 60px; height: auto; border-radius: 4px; }
.wpllms-cart-total { font-size: 18px; margin: 16px 0; }
.wpllms-cart-checkout { display: flex; gap: 10px; flex-wrap: wrap; }
.wpllms-in-cart { color: #1a7a2e; font-weight: 600; }

.wpllms-student-dashboard { padding: 32px 40px; box-sizing: border-box; }
.wpllms-dashboard-course-card {
	border: 1px solid var(--wpllms-border, #e2e2e2); border-radius: 16px; padding: 22px; margin-bottom: 20px;
	background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,0.04); transition: transform .2s ease, box-shadow .2s ease;
}
.wpllms-dashboard-course-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(16,24,40,0.08); }
.wpllms-dashboard-course-card h3 { margin-top: 0; }
.wpllms-progress-bar-track { background: #eef0f2; border-radius: 20px; height: 10px; overflow: hidden; margin: 10px 0 6px; }
.wpllms-progress-bar-fill { background: linear-gradient(90deg, var(--wpllms-button, #D97757), color-mix(in srgb, var(--wpllms-button, #D97757) 70%, #fff)); height: 100%; border-radius: 20px; }
.wpllms-progress-label { font-size: 13px; color: #666; margin-bottom: 12px; font-weight: 500; }
.wpllms-dashboard-quiz-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; background: #fff; border: 1px solid var(--wpllms-border, #e2e2e2); border-radius: 12px; overflow: hidden; }
.wpllms-dashboard-quiz-table th, .wpllms-dashboard-quiz-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #f0f0f2; }
.wpllms-dashboard-quiz-table th { background: #fafafb; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: #666; }
.wpllms-dashboard-quiz-table tr:last-child td { border-bottom: none; }
.wpllms-pass { color: #1a7a2e; font-weight: 700; background: #eafaf0; border-radius: 20px; padding: 4px 12px; font-size: 12.5px; display: inline-block; }
.wpllms-fail { color: #a00; font-weight: 600; background: #fdeaea; border-radius: 20px; padding: 4px 12px; font-size: 12.5px; display: inline-block; }
.wpllms-admin-student-view { max-width: 1000px; margin-top: 10px; }
.wpllms-admin-student-view .wpllms-dashboard-course-card { background: #fff; }

.wpllms-dashboard-layout {
	display: flex;
	gap: 28px;
	align-items: flex-start;
}
.wpllms-dashboard-sidebar {
	flex: 0 0 230px;
	background: color-mix(in srgb, var(--wpllms-button, #D97757) 7%, #fff);
	border: 1px solid var(--wpllms-border, #e2e2e2);
	border-radius: 16px;
	padding: 18px 0;
	position: sticky;
	top: 20px;
	box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.wpllms-sidebar-greeting {
	font-weight: 700;
	font-size: 15px;
	padding: 0 22px 16px;
	margin: 0 0 8px;
	border-bottom: 1px solid rgba(0,0,0,0.06);
}
.wpllms-dashboard-sidebar ul { list-style: none; margin: 0; padding: 0; }
.wpllms-dashboard-sidebar a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 22px;
	margin: 2px 10px;
	border-radius: 10px;
	text-decoration: none;
	color: var(--wpllms-heading, #1d2327);
	font-weight: 600;
	width: calc(100% - 20px);
	box-sizing: border-box;
	transition: background .15s ease;
}
.wpllms-dashboard-sidebar a:hover { background: rgba(0,0,0,0.045); }
.wpllms-dashboard-sidebar a.wpllms-sidebar-active {
	background: var(--wpllms-button, #D97757);
	color: #fff;
	box-shadow: 0 4px 12px color-mix(in srgb, var(--wpllms-button, #D97757) 35%, transparent);
}
.wpllms-dashboard-sidebar a.wpllms-sidebar-active:hover { background: var(--wpllms-button, #D97757); }
.wpllms-dashboard-sidebar a.wpllms-sidebar-active svg { color: #fff; }
.wpllms-dashboard-sidebar svg { flex-shrink: 0; color: var(--wpllms-link, #D97757); }
.wpllms-sidebar-logout {
	display: flex; align-items: center; gap: 12px; padding: 11px 22px; margin: 10px 10px 0;
	text-decoration: none; color: #a00; font-weight: 600; border-top: 1px solid rgba(0,0,0,0.06); padding-top: 16px;
}
.wpllms-sidebar-logout svg { color: #a00; }

.wpllms-dashboard-content { flex: 1; min-width: 0; }
.wpllms-dashboard-content h2 { font-size: 24px; margin-top: 0; }

.wpllms-account-table { border-collapse: collapse; margin-bottom: 12px; background: #fff; border: 1px solid var(--wpllms-border, #e2e2e2); border-radius: 12px; overflow: hidden; width: 100%; max-width: 560px; }
.wpllms-account-table th, .wpllms-account-table td { text-align: left; padding: 12px 18px; border-bottom: 1px solid #f0f0f2; }
.wpllms-account-table tr:last-child th, .wpllms-account-table tr:last-child td { border-bottom: none; }
.wpllms-account-table th { color: #666; font-weight: 600; width: 160px; background: #fafafb; }

@media (max-width: 700px) {
	.wpllms-dashboard-layout { flex-direction: column; }
	.wpllms-dashboard-sidebar { position: static; width: 100%; flex: none; box-sizing: border-box; }
	.wpllms-dashboard-sidebar ul { display: flex; overflow-x: auto; }
	.wpllms-dashboard-sidebar a { white-space: nowrap; }
	.wpllms-sidebar-greeting { display: none; }
}

@media (max-width: 480px) {
	.wpllms-student-dashboard { padding: 20px 16px; }
	.wpllms-cart-table th, .wpllms-cart-table td { padding: 8px 4px; font-size: 14px; }
	.wpllms-cart-item-title img { width: 42px; }
	.wpllms-cart-item-title { gap: 8px; }
	.wpllms-account-table th { width: auto; }
}

.wpllms-quiz-header { margin-bottom: 16px; font-size: 1.1em; }
.wpllms-timer { padding: 6px 12px; border-radius: 6px; background: #eef; }
.wpllms-timer-warning { color: #a00; }
.wpllms-question { margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid #eee; }
.wpllms-question-prompt { font-weight: 600; margin-bottom: 8px; }
.wpllms-option { display: block; margin-bottom: 4px; }
.wpllms-quiz-results h3 { margin-bottom: 4px; }
.wpllms-error { color: #a00; }

/* ===== Dark / Light mode toggle (Student Dashboard only) ===== */
.wpllms-theme-toggle {
	display: flex; align-items: center; gap: 12px; width: calc(100% - 20px); box-sizing: border-box;
	padding: 11px 22px; margin: 6px 10px; border-radius: 10px; border: none; background: transparent;
	color: var(--wpllms-heading, #1d2327); font-weight: 600; font-size: 14px; font-family: inherit; cursor: pointer;
	text-align: left; transition: background .15s ease;
}
.wpllms-theme-toggle:hover { background: rgba(0,0,0,0.045); }
.wpllms-theme-toggle-icon-dark { display: none; }
[data-wpllms-theme="dark"] .wpllms-theme-toggle-icon-light { display: none; }
[data-wpllms-theme="dark"] .wpllms-theme-toggle-icon-dark { display: inline-flex; }

/* Scoped specifically to the dashboard rather than the whole site —
   the admin's own theme colors (button/link/background/heading) stay
   exactly as configured everywhere else; only this one page gets a
   dark palette, and only when the viewer has actually turned it on. */
[data-wpllms-theme="dark"] .wpllms-student-dashboard {
	background: #14141f;
	color: #c7c7d6;
	min-height: 100vh;
}
[data-wpllms-theme="dark"] .wpllms-dashboard-sidebar {
	background: #1b1b2b;
	border-color: #2c2c40;
}
[data-wpllms-theme="dark"] .wpllms-sidebar-greeting { border-bottom-color: rgba(255,255,255,0.08); }
[data-wpllms-theme="dark"] .wpllms-dashboard-sidebar a,
[data-wpllms-theme="dark"] .wpllms-theme-toggle { color: #dcdce8; }
[data-wpllms-theme="dark"] .wpllms-dashboard-sidebar a:hover,
[data-wpllms-theme="dark"] .wpllms-theme-toggle:hover { background: rgba(255,255,255,0.06); }
[data-wpllms-theme="dark"] .wpllms-sidebar-logout { border-top-color: rgba(255,255,255,0.08); }
[data-wpllms-theme="dark"] .wpllms-dashboard-content h2,
[data-wpllms-theme="dark"] .wpllms-dashboard-course-card h3 { color: #f1f1f8; }
[data-wpllms-theme="dark"] .wpllms-dashboard-course-card,
[data-wpllms-theme="dark"] .wpllms-dashboard-quiz-table,
[data-wpllms-theme="dark"] .wpllms-account-table {
	background: #1e1e2e;
	border-color: #2c2c40;
}
[data-wpllms-theme="dark"] .wpllms-dashboard-quiz-table th,
[data-wpllms-theme="dark"] .wpllms-account-table th {
	background: #23233590;
	color: #a8a8ba;
}
[data-wpllms-theme="dark"] .wpllms-dashboard-quiz-table td,
[data-wpllms-theme="dark"] .wpllms-dashboard-quiz-table th,
[data-wpllms-theme="dark"] .wpllms-account-table td,
[data-wpllms-theme="dark"] .wpllms-account-table th {
	border-bottom-color: #2c2c40;
}
[data-wpllms-theme="dark"] .wpllms-progress-bar-track { background: #2c2c40; }
[data-wpllms-theme="dark"] .wpllms-account-table th { color: #a8a8ba; }
/* Button/link/heading colors deliberately untouched here — the
   admin's chosen accent color is typically vibrant enough to read
   fine against both a light and a dark background, so there's no
   need to override --wpllms-button/--wpllms-link/--wpllms-heading
   specifically for dark mode. */
