/* ============================================================
 *  ZT LMS Dashboard – [zt_dashboard] shortcode styles
 * ============================================================ */

/* ---------- Reset / base ---------- */
.zt-dashboard {
	max-width: 960px;
	margin: 0 auto 3rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
		Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #1e293b;
	line-height: 1.5;
}
.zt-dashboard hr {
	margin: 30px 0 !important;
	border: none;
	border-top: 1px solid #e2e8f0;
}
.zt-dashboard *,
.zt-dashboard *::before,
.zt-dashboard *::after {
	box-sizing: border-box;
}

/* ---------- Login notice ---------- */
.zt-dash-login-notice {
	text-align: center;
	padding: 3rem 1rem;
}

/* ---------- Error ---------- */
.zt-dash-error {
	background: #fef2f2;
	color: #991b1b;
	padding: 1rem;
	border-radius: 8px;
}

/* ============================================================
 *  Profile card
 * ============================================================ */
.zt-dash-profile {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem;
	background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
	color: #fff;
	padding: 1.75rem 2rem;
	border-radius: 12px;
	margin-bottom: 2rem;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.zt-dash-profile-left {
	width: 100%;
}
.zt-dash-profile-left {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.zt-dash-avatar {
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.3);
	width: 80px;
	height: 80px;
}
.zt-dash-profile-name {
	font-size: 1.35rem;
	margin: 0 0 0.15rem;
	font-weight: 700;
}
.zt-dash-profile-email {
	margin: 0;
	opacity: 0.85;
	font-size: 0.9rem;
}
.zt-dash-profile-bio {
	margin: 0.35rem 0 0;
	font-size: 0.85rem;
	opacity: 0.75;
}
.zt-dash-profile-stats {
	width: 100%;
	margin-top: 1rem;
}

/* Stats table */
.zt-dash-stats-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	overflow: hidden;
	backdrop-filter: blur(4px);
}
.zt-dash-stats-table th {
	padding: 0.5rem 1rem;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.8;
	font-weight: 600;
	text-align: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	white-space: nowrap;
	color: inherit;
	background: none;
}
.zt-dash-stats-table td {
	padding: 0.6rem 1rem;
	text-align: center;
	font-size: 1.35rem;
	font-weight: 700;
	color: inherit;
	background: none;
	vertical-align: middle;
}
.zt-dash-stats-table td:last-child {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

/* Mini progress bar inside stats table */
.zt-dash-stats-bar {
	height: 6px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 0.25rem;
}
.zt-dash-stats-bar-fill {
	height: 100%;
	background: #34d399;
	border-radius: 3px;
	transition: width 0.4s ease;
}
.zt-dash-stats-pct {
	font-size: 0.85rem;
	font-weight: 700;
	opacity: 0.9;
}

/* ============================================================
 *  Section headings
 * ============================================================ */
.zt-dash-section {
	margin-bottom: 2.5rem;
}
.zt-dash-section-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #e2e8f0;
}
.zt-dash-icon {
	font-size: 1.3rem;
}
.zt-dash-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	background: #2563eb;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	border-radius: 12px;
	padding: 0 8px;
}
.zt-dash-empty {
	color: #64748b;
	font-style: italic;
}

/* ============================================================
 *  Course cards
 * ============================================================ */
.zt-dash-courses {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}
.zt-dash-course {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.2s;
}
.zt-dash-course:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.zt-dash-course--completed {
	border-left: 4px solid #16a34a;
}
.zt-dash-course--active {
	border-left: 4px solid #2563eb;
}

/* ---- Course header ---- */
.zt-dash-course-header {
	display: flex;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
}
.zt-dash-course-thumb {
	width: 100px;
	height: 70px;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
}
.zt-dash-course-meta {
	flex: 1;
	min-width: 0;
}
.zt-dash-course-title {
	font-size: 1.05rem;
	margin: 0 0 0.35rem;
	font-weight: 600;
}
.zt-dash-course-title a {
	color: inherit;
	text-decoration: none;
}
.zt-dash-course-title a:hover {
	color: #2563eb;
}
.zt-dash-course-stats-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	font-size: 0.85rem;
	color: #475569;
	margin-bottom: 0.5rem;
}

/* Tags */
.zt-dash-tag--success {
	color: #16a34a;
	font-weight: 600;
}
.zt-dash-tag--progress {
	color: #2563eb;
	font-weight: 600;
}
.zt-dash-course-grade {
	font-weight: 600;
}

/* Progress bar */
.zt-dash-progress-bar {
	height: 6px;
	background: #e2e8f0;
	border-radius: 3px;
	overflow: hidden;
	margin-top: 0.35rem;
}
.zt-dash-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #2563eb, #3b82f6);
	border-radius: 3px;
	transition: width 0.4s ease;
}

/* ---- Course footer ---- */
.zt-dash-course-footer {
	padding: 0.75rem 1.5rem 1.25rem;
}

/* ============================================================
 *  Exam results table (Rezultat teoretičnega preizkusa)
 * ============================================================ */
.zt-dash-exam {
	padding: 0 1.5rem 0.5rem;
}
.zt-dash-exam-title {
	font-size: 0.95rem;
	font-weight: 700;
	text-transform: uppercase;
	color: #1e293b;
	margin: 0 0 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #e2e8f0;
}
.zt-dash-exam-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}
.zt-dash-exam-table thead {
	background: #f1f5f9;
}
.zt-dash-exam-table th {
	text-align: left;
	padding: 0.6rem 0.75rem;
	font-weight: 600;
	font-size: 0.8rem;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-bottom: 2px solid #cbd5e1;
	white-space: nowrap;
}
.zt-dash-exam-table td {
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid #e2e8f0;
	vertical-align: middle;
}
.zt-dash-exam-table tbody tr:last-child td {
	border-bottom: none;
}

/* Row colour hints */
.zt-dash-exam-pass {
	background: #f0fdf4;
}
.zt-dash-exam-fail {
	background: #fef2f2;
}

/* Pass / Fail badges */
.zt-dash-badge-pass {
	display: inline-block;
	background: #16a34a;
	color: #fff;
	font-weight: 700;
	font-size: 0.8rem;
	padding: 0.15rem 0.6rem;
	border-radius: 4px;
}
.zt-dash-badge-fail {
	display: inline-block;
	background: #dc2626;
	color: #fff;
	font-weight: 700;
	font-size: 0.8rem;
	padding: 0.15rem 0.6rem;
	border-radius: 4px;
}

/* ============================================================
 *  Button
 * ============================================================ */
.zt-dash-btn {
	display: inline-block;
	background: #2563eb;
	color: #fff !important;
	padding: 0.55rem 1.25rem;
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s;
}
.zt-dash-btn:hover {
	background: #1d4ed8;
	text-decoration: none;
}

/* ============================================================
 *  Responsive
 * ============================================================ */
@media (max-width: 640px) {
	.zt-dash-profile {
		flex-direction: column;
		text-align: center;
		padding: 1.5rem;
	}
	.zt-dash-profile-left {
		flex-direction: column;
	}
	.zt-dash-course-header {
		flex-direction: column;
	}
	.zt-dash-course-thumb {
		width: 100%;
		height: auto;
		max-height: 160px;
	}

	/* Responsive table: stack on mobile */
	.zt-dash-exam-table thead {
		display: none;
	}
	.zt-dash-exam-table,
	.zt-dash-exam-table tbody,
	.zt-dash-exam-table tr,
	.zt-dash-exam-table td {
		display: block;
		width: 100%;
	}
	.zt-dash-exam-table tr {
		margin-bottom: 0.75rem;
		border: 1px solid #e2e8f0;
		border-radius: 6px;
		overflow: hidden;
	}
	.zt-dash-exam-table td {
		display: flex;
		justify-content: space-between;
		padding: 0.5rem 0.75rem;
		border-bottom: 1px solid #f1f5f9;
	}
	.zt-dash-exam-table td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #475569;
		margin-right: 0.5rem;
	}
}
