/**
 * Progress Report Public Dashboard Stylesheet
 * Premium, state-of-the-art academic progress visualization dashboard.
 */

.progress-report-dashboard-container {
	--pr-primary: #6366f1; /* Indigo */
	--pr-primary-light: #e0e7ff;
	--pr-success: #10b981; /* Emerald */
	--pr-success-light: #d1fae5;
	--pr-warning: #f59e0b; /* Amber */
	--pr-warning-light: #fef3c7;
	--pr-danger: #ef4444; /* Rose */
	--pr-danger-light: #fee2e2;
	--pr-dark: #0f172a; /* Slate 900 */
	--pr-slate-600: #475569;
	--pr-slate-100: #f1f5f9;
	--pr-glass: rgba(255, 255, 255, 0.85);
	--pr-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
	--pr-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
	--pr-shadow-lg: 0 12px 40px rgba(99, 102, 241, 0.08);
	max-width: 1100px;
	margin: 24px auto;
	display: flex;
	flex-direction: column;
	gap: 24px;
	color: var(--pr-dark);
}

.progress-report-dashboard-container,
.progress-report-dashboard-container * {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}

/* Admin Selector Bar Styles */
.admin-frontend-selector-bar {
	background: #ffffff;
	border-radius: 16px;
	padding: 16px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: var(--pr-shadow);
	border: 1px dashed var(--pr-primary);
}

.admin-selector-title {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--pr-primary);
}

.admin-selector-title .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.frontend-student-select-form {
	display: flex;
	align-items: center;
	gap: 12px;
}

.frontend-student-select-form label {
	font-size: 14px;
	font-weight: 600;
	color: var(--pr-slate-600);
}

.frontend-student-select-form select {
	height: 38px;
	padding: 0 32px 0 12px;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	background-color: #f8fafc;
	font-size: 14px;
	color: var(--pr-dark);
	font-weight: 500;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
	outline: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px;
}

.frontend-student-select-form select:focus {
	border-color: var(--pr-primary);
	box-shadow: 0 0 0 2px var(--pr-primary-light);
}

.frontend-admin-icon {
	background-color: var(--pr-primary-light) !important;
}

.frontend-admin-icon .dashicons {
	color: var(--pr-primary) !important;
	font-size: 32px;
	width: 32px;
	height: 32px;
}

/* 1. Locked / Empty Cards (Authentication & No Data states) */
.progress-report-locked-card,
.progress-report-empty-card {
	max-width: 500px;
	margin: 40px auto;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	padding: 40px 32px;
	text-align: center;
	border: 1px solid rgba(0,0,0,0.05);
	transition: transform 0.3s;
}

.progress-report-locked-card:hover,
.progress-report-empty-card:hover {
	transform: translateY(-4px);
}

.locked-icon, .empty-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px auto;
}

.locked-icon {
	background-color: var(--pr-danger-light);
}

.locked-icon .dashicons {
	color: var(--pr-danger);
	font-size: 32px;
	width: 32px;
	height: 32px;
}

.empty-icon {
	background-color: var(--pr-warning-light);
}

.empty-icon .dashicons {
	color: var(--pr-warning);
	font-size: 32px;
	width: 32px;
	height: 32px;
}

.progress-report-locked-card h3,
.progress-report-empty-card h3 {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 10px 0;
	color: var(--pr-dark);
}

.progress-report-locked-card p,
.progress-report-empty-card p {
	color: var(--pr-slate-600);
	font-size: 15px;
	line-height: 1.6;
	margin: 0 0 24px 0;
}

.progress-report-login-btn {
	display: inline-block;
	background-color: var(--pr-primary);
	color: #ffffff;
	text-decoration: none;
	padding: 12px 28px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 15px;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
	transition: background-color 0.2s, transform 0.2s;
}

.progress-report-login-btn:hover {
	background-color: #4f46e5;
	transform: translateY(-2px);
	color: #ffffff;
}

/* 2. Header Banner */
.dashboard-header-card {
	background: linear-gradient(135deg, #4f46e5, #818cf8);
	border-radius: 20px;
	padding: 32px;
	color: #ffffff;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: var(--pr-shadow-lg);
	position: relative;
	overflow: hidden;
}

.dashboard-header-card::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -20%;
	width: 300px;
	height: 300px;
	background: rgba(255,255,255,0.1);
	border-radius: 50%;
	pointer-events: none;
}

.student-info-flex {
	display: flex;
	align-items: center;
	gap: 20px;
	z-index: 1;
}

.student-avatar-wrap img {
	border-radius: 50%;
	border: 4px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.student-details {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.report-badge {
	align-self: flex-start;
	background-color: rgba(255, 255, 255, 0.15);
	font-size: 11px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 12px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.student-name {
	font-size: 26px;
	font-weight: 700;
	margin: 4px 0 0 0;
	color: #ffffff;
}

.student-meta {
	margin: 0;
	font-size: 14px;
	opacity: 0.9;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.student-meta-separator {
	margin: 0 8px;
	opacity: 0.5;
}

/* Status Badges */
.final-grade-badge-wrap {
	text-align: center;
	background-color: rgba(255, 255, 255, 0.12);
	padding: 16px 24px;
	border-radius: 16px;
	backdrop-filter: blur(8px);
	z-index: 1;
	border: 1px solid rgba(255, 255, 255, 0.18);
	min-width: 160px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.course-status-badge {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #ffffff;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	border: 1px solid rgba(255,255,255,0.2);
}

.course-status-badge.status-completed {
	background-color: var(--pr-success);
}

.course-status-badge.status-in-progress {
	background-color: var(--pr-warning);
}

.grade-label {
	font-size: 10px;
	text-transform: uppercase;
	font-weight: 600;
	letter-spacing: 0.5px;
	opacity: 0.85;
}

.grade-value {
	font-size: 28px;
	font-weight: 800;
	margin-top: 2px;
	letter-spacing: -0.5px;
}

.grade-value-pending {
	font-size: 18px;
	font-weight: 700;
	margin-top: 4px;
}

.mt-8 {
	margin-top: 8px;
}

/* 3. Metrics Grid */
.metrics-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
}

.metric-card {
	background: #ffffff;
	border-radius: 18px;
	padding: 24px;
	border: 1px solid rgba(0, 0, 0, 0.03);
	box-shadow: var(--pr-shadow);
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: transform 0.3s, box-shadow 0.3s;
}

.metric-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.metric-card-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
	width: 100%;
}

.metric-card-header .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.attendance-card .metric-card-header .dashicons { color: var(--pr-success); }
.assignments-card .metric-card-header .dashicons { color: var(--pr-primary); }
.homework-card .metric-card-header .dashicons { color: #0284c7; } /* Cyan */
.papers-card .metric-card-header .dashicons { color: #db2777; } /* Pink */

.metric-card-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--pr-slate-600);
}

.metric-visual {
	margin-bottom: 24px;
}

/* Circular Progress using gradients */
.radial-progress-bar {
	width: 110px;
	height: 110px;
	border-radius: 50%;
	background: radial-gradient(closest-side, #ffffff 79%, transparent 80% 100%),
				conic-gradient(var(--pr-success) calc(var(--pct) * 1%), #f1f5f9 0);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.radial-progress-bar.bar-assignments {
	background: radial-gradient(closest-side, #ffffff 79%, transparent 80% 100%),
				conic-gradient(var(--pr-primary) calc(var(--pct) * 1%), #f1f5f9 0);
}

.radial-progress-bar.bar-homework {
	background: radial-gradient(closest-side, #ffffff 79%, transparent 80% 100%),
				conic-gradient(#0284c7 calc(var(--pct) * 1%), #f1f5f9 0);
}

.radial-progress-bar.bar-papers {
	background: radial-gradient(closest-side, #ffffff 79%, transparent 80% 100%),
				conic-gradient(#db2777 calc(var(--pct) * 1%), #f1f5f9 0);
}

.radial-value {
	font-size: 20px;
	font-weight: 700;
	color: var(--pr-dark);
}

.metric-footer-stats {
	display: flex;
	width: 100%;
	border-top: 1px solid #f8fafc;
	padding-top: 16px;
	justify-content: space-around;
	text-align: center;
}

.footer-stat-col {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.stat-num {
	font-size: 18px;
	font-weight: 700;
	color: var(--pr-dark);
}

.stat-lbl {
	font-size: 11px;
	color: var(--pr-slate-600);
	text-transform: uppercase;
	font-weight: 500;
}

/* 4. Breakdown & Remarks Layout */
.breakdown-remarks-grid {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 24px;
}

.table-card {
	background: #ffffff;
	border-radius: 18px;
	padding: 24px;
	box-shadow: var(--pr-shadow);
	border: 1px solid rgba(0, 0, 0, 0.03);
}

.table-card-title {
	margin: 0 0 16px 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--pr-dark);
}

.report-breakdown-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.report-breakdown-table th {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--pr-slate-600);
	padding: 12px 16px;
	border-bottom: 2px solid var(--pr-slate-100);
}

.report-breakdown-table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--pr-slate-100);
	font-size: 14px;
}

.report-breakdown-table tr:last-child td {
	border-bottom: none;
}

.align-right {
	text-align: right;
}

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.percentage-pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
}

.pill-high {
	background-color: var(--pr-success-light);
	color: var(--pr-success);
}

.pill-medium {
	background-color: var(--pr-warning-light);
	color: var(--pr-warning);
}

.pill-low {
	background-color: var(--pr-danger-light);
	color: var(--pr-danger);
}

.empty-table-msg {
	color: var(--pr-slate-600);
	text-align: center;
	padding: 20px 0;
	font-style: italic;
	font-size: 14px;
}

.mt-24 {
	margin-top: 24px;
}

/* Remarks Column */
.remarks-column {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.final-exam-showcase-card {
	background: linear-gradient(135deg, #1e293b, #0f172a);
	border-radius: 18px;
	padding: 28px;
	color: #ffffff;
	position: relative;
	overflow: hidden;
	box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
	text-align: center;
}

.card-glow {
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 60%);
	pointer-events: none;
}

.showcase-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px auto;
}

.showcase-icon .dashicons {
	color: #f59e0b; /* Golden Awards color */
	font-size: 26px;
	width: 26px;
	height: 26px;
}

.final-exam-showcase-card h3 {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0.5px;
	opacity: 0.9;
}

.showcase-marks {
	margin-bottom: 16px;
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 4px;
}

.marks-obtained {
	font-size: 40px;
	font-weight: 800;
	color: #ffffff;
}

.marks-slash {
	font-size: 24px;
	opacity: 0.5;
	font-weight: 300;
}

.marks-max {
	font-size: 22px;
	opacity: 0.8;
}

.progress-bar-linear-wrap {
	background-color: rgba(255, 255, 255, 0.1);
	height: 8px;
	border-radius: 4px;
	width: 80%;
	margin: 0 auto 12px auto;
	overflow: hidden;
}

.progress-bar-linear-inner {
	background-color: var(--pr-primary);
	height: 100%;
	border-radius: 4px;
}

.linear-percentage-text {
	font-size: 13px;
	opacity: 0.7;
	font-weight: 500;
}

.feedback-remarks-card {
	background: #ffffff;
	border-radius: 18px;
	padding: 24px;
	box-shadow: var(--pr-shadow);
	border: 1px solid rgba(0, 0, 0, 0.03);
	flex-grow: 1;
}

.feedback-remarks-card h3 {
	margin: 0 0 16px 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--pr-dark);
	display: flex;
	align-items: center;
	gap: 8px;
}

.feedback-remarks-card h3 .dashicons {
	color: var(--pr-primary);
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.feedback-remarks-content {
	line-height: 1.6;
	color: var(--pr-slate-600);
	font-size: 14px;
}

.feedback-remarks-content p {
	margin: 0;
}

.no-feedback-text {
	font-style: italic;
	opacity: 0.7;
}

/* Responsive adjustment */
@media (max-width: 850px) {
	.breakdown-remarks-grid {
		grid-template-columns: 1fr;
	}
	
	.dashboard-header-card {
		flex-direction: column;
		text-align: center;
		gap: 20px;
	}
	
	.student-info-flex {
		flex-direction: column;
	}
	
	.report-badge {
		align-self: center;
	}

	.admin-frontend-selector-bar {
		flex-direction: column;
		gap: 16px;
		text-align: center;
	}

	.frontend-student-select-form {
		flex-direction: column;
		width: 100%;
	}

	.frontend-student-select-form select {
		width: 100%;
	}

	.student-meta {
		justify-content: center;
	}
}

/* Monthly Attendance Accordion & Calendar Day Grid */
.attendance-card-header-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

.attendance-legend {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 13px;
	font-weight: 500;
	color: var(--pr-slate-600);
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.legend-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
}

.legend-dot.dot-present {
	background-color: #10b981;
	box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.legend-dot.dot-absent {
	background-color: #ef4444;
	box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.attendance-accordion-group {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.attendance-accordion-item {
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	overflow: hidden;
	background: #ffffff;
	transition: border-color 0.25s, box-shadow 0.25s;
}

.attendance-accordion-item.is-expanded {
	border-color: #a5b4fc;
	box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}

.attendance-accordion-header {
	padding: 14px 20px;
	background: #f8fafc;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	user-select: none;
	transition: background-color 0.2s;
}

.attendance-accordion-header:hover {
	background: #f1f5f9;
}

.attendance-accordion-item.is-expanded .attendance-accordion-header {
	background: #e0e7ff;
}

.header-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.header-left .header-icon {
	color: var(--pr-primary);
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.month-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--pr-dark);
}

.header-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.month-badge {
	background: #ffffff;
	color: var(--pr-slate-600);
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	border: 1px solid #cbd5e1;
	box-shadow: var(--pr-shadow-sm);
}

.accordion-toggle-icon {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: #646970;
	transition: transform 0.25s ease, color 0.25s ease;
}

.attendance-accordion-item.is-expanded .accordion-toggle-icon {
	transform: rotate(180deg);
	color: var(--pr-primary);
}

.attendance-accordion-content {
	padding: 20px;
	border-top: 1px solid #f1f5f9;
	background: #ffffff;
}



.attendance-day-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.day-circle {
	width: 50px;
	height: 50px;
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	position: relative;
}

.day-circle:hover {
	transform: translateY(-3px) scale(1.05);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.day-circle.day-present {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.day-circle.day-absent {
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.day-sub {
	font-size: 9px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	opacity: 0.9;
	line-height: 1;
	margin-bottom: 2px;
}

.day-num {
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
}
