/* Custom Pro LMS — student dashboard ([lms_student_dashboard]). Mobile-first responsive. */

.cplms-dash { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; margin: 0 0 32px; color: #1e293b; }

/* ---------- Sidebar ---------- */
.cplms-dash__side { position: sticky; top: 24px; background: var(--cplms-navy); color: #fff; border-radius: 14px; overflow: hidden; }
.admin-bar .cplms-dash__side { top: 56px; }
.cplms-dash__profile { display: flex; align-items: center; gap: 12px; padding: 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.cplms-dash__profile img { border-radius: 50%; flex: none; }
.cplms-dash__profile div { min-width: 0; display: flex; flex-direction: column; }
.cplms-dash__profile strong, .cplms-dash__profile small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cplms-dash__profile small { opacity: .65; }
.cplms-dash__nav { display: flex; flex-direction: column; padding: 10px; gap: 2px; }
.cplms-dash__link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 500; }
.cplms-dash__link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.cplms-dash__link.is-active { background: rgba(34, 197, 94, .18); color: #fff; box-shadow: inset 3px 0 0 var(--cplms-green); }
.cplms-dash__link .dashicons { color: var(--cplms-green); }
.cplms-dash__badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: .75rem; text-align: center; }
.cplms-dash__link--logout { margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); border-radius: 0 0 8px 8px; padding-top: 14px; }

/* ---------- Main ---------- */
.cplms-dash__main { min-width: 0; }
.cplms-dash__title { margin: 0 0 18px; font-size: 1.6rem; }

.cplms-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.cplms-stat { display: flex; flex-direction: column; padding: 16px; background: #fff; border: 1px solid var(--cplms-border); border-top: 3px solid var(--cplms-green); border-radius: 10px; }
.cplms-stat strong { font-size: 1.6rem; line-height: 1.1; }
.cplms-stat span { color: var(--cplms-muted); font-size: .85rem; }

.cplms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* ---------- Course card ---------- */
.cplms-ccard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--cplms-border); border-radius: 12px; overflow: hidden; transition: box-shadow .15s ease, transform .15s ease; }
.cplms-ccard:hover { box-shadow: 0 10px 28px rgba(15, 23, 42, .1); transform: translateY(-2px); }
.cplms-ccard__thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--cplms-navy), var(--cplms-charcoal)); color: rgba(255, 255, 255, .5); }
.cplms-ccard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cplms-ccard__thumb .dashicons { font-size: 42px; width: 42px; height: 42px; }
.cplms-ccard__body { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1; }
.cplms-ccard__title { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.cplms-ccard__title a { color: var(--cplms-navy); text-decoration: none; }
.cplms-ccard__title a:hover { color: var(--cplms-green-dark); }
.cplms-ccard__meta { margin: 0; color: var(--cplms-muted); font-size: .88rem; }
.cplms-ccard__hint { margin: 0; color: #92400e; font-size: .82rem; }
.cplms-ccard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.cplms-ccard .cplms-progress { margin: 6px 0 2px; height: 10px; }
.cplms-ccard .cplms-progress__label { display: none; }
.cplms-ccard .cplms-btn { padding: 8px 14px; font-size: .9rem; }

.cplms-badge { align-self: flex-start; display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: #e2e8f0; color: #334155; }
.cplms-badge--enrolled { background: #dbeafe; color: #1e40af; }
.cplms-badge--completed { background: #dcfce7; color: #166534; }
.cplms-badge--pending { background: #fef3c7; color: #92400e; }

/* ---------- Certificates ---------- */
.cplms-cert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cplms-cert { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--cplms-border); border-left: 4px solid var(--cplms-green); border-radius: 10px; }
.cplms-cert > .dashicons { color: var(--cplms-green-dark); font-size: 30px; width: 30px; height: 30px; flex: none; }
.cplms-cert__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cplms-cert__info small { color: var(--cplms-muted); }

/* ---------- Empty state / alerts / form ---------- */
.cplms-empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed var(--cplms-border); border-radius: 12px; }
.cplms-empty .dashicons { font-size: 44px; width: 44px; height: 44px; color: var(--cplms-muted); }
.cplms-alert { padding: 12px 16px; margin-bottom: 16px; border-radius: 8px; font-weight: 600; }
.cplms-alert--success { background: #dcfce7; color: #166534; }
.cplms-alert--error { background: #fee2e2; color: #991b1b; }
.cplms-form { max-width: 640px; padding: 22px; background: #fff; border: 1px solid var(--cplms-border); border-radius: 12px; }
.cplms-form label { display: block; margin-bottom: 4px; font-weight: 600; }
.cplms-form input[type="text"], .cplms-form input[type="email"], .cplms-form input[type="password"] { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; box-sizing: border-box; }
.cplms-form input:focus { outline: 2px solid var(--cplms-green); outline-offset: 1px; border-color: var(--cplms-green); }
.cplms-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cplms-form__heading { margin: 22px 0 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.cplms-dash { grid-template-columns: minmax(0, 1fr); }
	.cplms-dash__side { position: static; }
	.cplms-dash__profile { padding: 14px 16px; }
	/* Navigation becomes a horizontally scrollable tab bar */
	.cplms-dash__nav { flex-direction: row; overflow-x: auto; padding: 8px; gap: 6px; -webkit-overflow-scrolling: touch; }
	.cplms-dash__link { flex: none; white-space: nowrap; padding: 9px 12px; }
	.cplms-dash__link.is-active { box-shadow: inset 0 -3px 0 var(--cplms-green); }
	.cplms-dash__link--logout { margin: 0; border-top: 0; border-radius: 8px; padding-top: 9px; }
}
@media (max-width: 600px) {
	.cplms-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cplms-form__row { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.cplms-cert { flex-wrap: wrap; }
	.cplms-cert .cplms-btn { width: 100%; text-align: center; }
	.cplms-dash__title { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
	.cplms-ccard { transition: none; }
	.cplms-ccard:hover { transform: none; }
}
