/**
 * Performance Tracker Styles
 * 
 * @package WooCommerce Team Payroll
 * @since 1.3.0
 */

/* ============================================================================
   PERFORMANCE TRACKER CONTAINER
   ============================================================================ */

.performance-tracker-wrapper {
	background: #ffffff;
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Header */
.performance-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.performance-header h3 {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.performance-header h3 i {
	font-size: 28px;
	color: #FF9900;
}

/* Header Controls (Date Range + Dropdown) */
.performance-header-controls {
	display: flex;
	align-items: center;
	gap: 16px;
}

.performance-date-range {
	font-size: 14px;
	font-weight: 600;
	color: #637381;
	padding: 8px 16px;
	background: #F4F6F8;
	border-radius: 6px;
	border: 1px solid #E5EAF0;
	white-space: nowrap;
	letter-spacing: 0.3px;
}

/* View Selector */
#performance-view-selector {
	padding: 8px 16px;
	border: 1px solid #E5EAF0;
	border-radius: 6px;
	font-size: 14px;
	color: #212B36;
	background: #ffffff;
	cursor: pointer;
	min-width: 180px;
}

#performance-view-selector:focus {
	outline: none;
	border-color: #FF9900;
	box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

/* ============================================================================
   TABS
   ============================================================================ */

.performance-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 24px;
	border-bottom: 1px solid;
}

.performance-tab {
	padding: 12px 24px;
	border-bottom: 3px solid transparent;
	border-radius: 6px 6px 0 0;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
}

.performance-tab.active {
	font-weight: 600;
}

/* ============================================================================
   LOADING & ERROR STATES
   ============================================================================ */

.performance-loading,
.performance-error {
	text-align: center;
	padding: 60px 20px;
}

.performance-loading i,
.performance-error i {
	font-size: 48px;
	color: #919EAB;
	margin-bottom: 16px;
	display: block;
}

.performance-loading i.ph-spin {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.performance-loading p,
.performance-error p {
	font-size: 16px;
	color: #637381;
	margin: 0;
}

.performance-error i {
	color: #dc3545;
}

/* ============================================================================
   OVERVIEW SECTION
   ============================================================================ */

.performance-overview {
	padding: 20px 0;
}

.overview-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
}

.overview-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.period-label {
	font-size: 14px;
	color: #637381;
	background: #F4F6F8;
	padding: 6px 12px;
	border-radius: 4px;
}

/* Congratulations Banner */
.congratulations-banner {
	display: flex;
	align-items: center;
	gap: 16px;
	background: linear-gradient(135deg, #f0fff4 0%, #e8f5e9 100%);
	border: 2px solid #28a745;
	border-radius: 12px;
	padding: 20px 24px;
	margin-bottom: 24px;
	box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
	animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.congratulations-banner > i {
	font-size: 48px;
	color: #28a745;
	flex-shrink: 0;
}

.congratulations-content {
	flex: 1;
}

.congratulations-content h4 {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 700;
	color: #28a745;
}

.congratulations-content p {
	margin: 0;
	font-size: 14px;
	color: #2d5a3d;
	line-height: 1.5;
}

.overview-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

.overview-card {
	background: #F9FAFB;
	border: 1px solid #E5EAF0;
	border-radius: 8px;
	padding: 20px;
	transition: all 0.3s ease;
}

.overview-card.achieved {
	background: linear-gradient(135deg, #f0fff4 0%, #e8f5e9 100%);
	border-color: #28a745;
	box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.overview-card h4 {
	margin: 0 0 16px 0;
	font-size: 16px;
	font-weight: 600;
	color: #212B36;
}

.overview-card-content {
	font-size: 14px;
	color: #637381;
}

.overview-card.achieved .summary-stat strong {
	color: #28a745;
}

.overview-card.achieved .summary-progress {
	color: #28a745;
	font-weight: 600;
}

/* Quick Stats */
.overview-quick-stats {
	background: #ffffff;
	border: 1px solid #E5EAF0;
	border-radius: 8px;
	padding: 24px;
}

.overview-quick-stats h4 {
	margin: 0 0 16px 0;
	font-size: 18px;
	font-weight: 600;
	color: #212B36;
}

.quick-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.quick-stats-grid .stat-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.quick-stats-grid .stat-label {
	font-size: 13px;
	color: #637381;
	font-weight: 500;
}

.quick-stats-grid .stat-value {
	font-size: 20px;
	color: #212B36;
	font-weight: 600;
}

/* ============================================================================
   GOALS SECTION
   ============================================================================ */

.performance-goals {
	padding: 20px 0;
}

.goals-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
}

.goals-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.goals-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

/* Goal Card */
.goal-card {
	background: #ffffff;
	border: 2px solid #E5EAF0;
	border-radius: 12px;
	padding: 20px;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.goal-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.goal-card.achieved {
	border-color: #28a745;
	background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
}

.goal-header {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 16px;
}

.goal-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	flex-shrink: 0;
}

.goal-title {
	flex: 1;
}

.goal-title h4 {
	margin: 0 0 4px 0;
	font-size: 17px;
	font-weight: 600;
	color: #1a1a1a;
	letter-spacing: -0.2px;
}

.achievement-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #28a745;
	color: #ffffff;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 12px;
}
.achievement-card .achievement-badge{
	font-size:48px;
}

.achievement-badge i {
	font-size: 14px;
	color:#fff !important;
}

/* Goal Achievement Badge - Professional styling for Goals tab */
.goal-achievement-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	color: #ffffff;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.3px;
	box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
	border: 1.5px solid rgba(255, 255, 255, 0.3);
	text-transform: uppercase;
	animation: goalBadgePulse 2s ease-in-out infinite;
	position: relative;
	overflow: hidden;
}

.goal-achievement-badge::before {
	content: '';
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: linear-gradient(
		45deg,
		transparent,
		rgba(255, 255, 255, 0.1),
		transparent
	);
	transform: rotate(45deg);
	animation: goalBadgeShine 3s ease-in-out infinite;
}

.goal-achievement-badge i {
	font-size: 16px;
	color: #fff !important;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
	animation: goalBadgeCheckBounce 2s ease-in-out infinite;
}

@keyframes goalBadgePulse {
	0%, 100% {
		box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
	}
	50% {
		box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
	}
}

@keyframes goalBadgeShine {
	0% {
		left: -50%;
	}
	100% {
		left: 150%;
	}
}

@keyframes goalBadgeCheckBounce {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
}

/* Hover effect for goal achievement badge */
.goal-achievement-badge:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Progress Bar */
.goal-progress {
	margin-bottom: 20px;
}

.progress-bar-container {
	width: 100%;
	height: 10px;
	background: #E5EAF0;
	border-radius: 5px;
	overflow: hidden;
	margin-bottom: 10px;
}

.progress-bar {
	height: 100%;
	background: #0073aa;
	border-radius: 5px;
	transition: width 0.5s ease;
}

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

.progress-percentage {
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
	letter-spacing: -0.3px;
}

/* Goal Stats */
.goal-stats {
	display: flex;
	flex-direction: column;
	align-items: start;
	gap: 10px;
	margin-bottom: 16px;
}

.goal-stats .stat-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	font-size: 15px;
}

.goal-stats .stat-label {
	color: #637381;
	font-weight: 500;
	font-size: 14px;
}

.goal-stats .stat-value {
	color: #1a1a1a;
	font-weight: 700;
	font-size: 16px;
	letter-spacing: -0.2px;
}

/* Goal Status Badge */
.goal-status-badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.goal-status-badge.status-not_started {
	background: #F4F6F8;
	color: #637381;
}

.goal-status-badge.status-in_progress {
	background: #E3F2FD;
	color: #1976D2;
}

.goal-status-badge.status-achieved {
	background: #E8F5E9;
	color: #388E3C;
}

.goal-status-badge.status-stretch_achieved {
	background: #FFF9C4;
	color: #F57C00;
}

/* Goal History */
.goal-history {
	background: #F9FAFB;
	border: 1px solid #E5EAF0;
	border-radius: 8px;
	padding: 20px;
	margin-top: 24px;
}

.goal-history h4 {
	margin: 0 0 16px 0;
	font-size: 16px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.history-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.history-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: #ffffff;
	border: 1px solid #E5EAF0;
	border-radius: 6px;
}

.history-period {
	font-size: 14px;
	font-weight: 600;
	color: #212B36;
	min-width: 100px;
}

.history-status {
	font-size: 18px;
}

.history-status.status-achieved {
	color: #28a745;
}

.history-status.status-in_progress {
	color: #ffc107;
}

.history-status.status-not_started {
	color: #6c757d;
}

.history-value {
	font-size: 14px;
	color: #637381;
	margin-left: auto;
}

/* ============================================================================
   ACHIEVEMENTS SECTION
   ============================================================================ */

.performance-achievements {
	padding: 20px 0;
}

.achievements-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 16px;
}

.achievements-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.achievements-stats {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.stat-badge {
	padding: 6px 12px;
	background: #F4F6F8;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #212B36;
}

.stat-badge.bronze {
	background: #FFF3E0;
	color: #E65100;
}

.stat-badge.silver {
	background: #F5F5F5;
	color: #616161;
}

.stat-badge.gold {
	background: #FFF9C4;
	color: #F57C00;
}

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

/* Achievement Card */
.achievement-card {
	background: #ffffff;
	border: 2px solid #E5EAF0;
	border-radius: 12px;
	padding: 20px;
	text-align: center;
	transition: all 0.3s ease;
	position: relative;
}

.achievement-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.achievement-card.unlocked {
	border-color: #28a745;
	background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
}

.achievement-card.locked {
	opacity: 0.7;
}

.achievement-card.tier-bronze.unlocked {
	border-color: #CD7F32;
	background: linear-gradient(135deg, #ffffff 0%, #FFF3E0 100%);
}

.achievement-card.tier-silver.unlocked {
	border-color: #C0C0C0;
	background: linear-gradient(135deg, #ffffff 0%, #F5F5F5 100%);
}

.achievement-card.tier-gold.unlocked {
	border-color: #FFD700;
	background: linear-gradient(135deg, #ffffff 0%, #FFF9C4 100%);
}

.locked-badge {
	font-size: 36px;
	opacity: 0.5;
}

.achievement-card h4 {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: 600;
	color: #212B36;
}

.achievement-desc {
	font-size: 13px;
	color: #637381;
	margin: 0 0 16px 0;
}

.achievement-progress {
	margin: 16px 0;
}

.achievement-progress .progress-bar-container {
	height: 6px;
	margin-bottom: 8px;
}

.achievement-progress .progress-text {
	font-size: 13px;
	font-weight: 600;
	color: #212B36;
	text-align: center;
}

.achievement-meta {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #637381;
	padding-top: 12px;
	border-top: 1px solid #E5EAF0;
	gap: 8px;
}

.achievement-meta span {
	flex: 1;
	text-align: center;
}

.unlock-date {
	color: #28a745;
	font-weight: 600;
}

/* ============================================================================
   BASELINES SECTION
   ============================================================================ */

.performance-baselines {
	padding: 20px 0;
}

.baselines-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 16px;
}

.baselines-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.baselines-meta {
	display: flex;
	gap: 16px;
	font-size: 13px;
	color: #637381;
}

.baselines-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
}

/* Baseline Card */
.baseline-card {
	background: #ffffff;
	border: 2px solid #E5EAF0;
	border-radius: 12px;
	padding: 24px;
	transition: all 0.3s ease;
}

.baseline-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.baseline-card.trend-improving {
	border-color: #28a745;
	background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
}

.baseline-card.trend-declining {
	border-color: #dc3545;
	background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.baseline-card h4 {
	margin: 0 0 20px 0;
	font-size: 16px;
	font-weight: 600;
	color: #212B36;
	text-align: center;
}

.baseline-comparison {
	display: flex;
	justify-content: space-around;
	align-items: center;
	margin-bottom: 20px;
	padding: 16px;
	background: #F9FAFB;
	border-radius: 8px;
}

.baseline-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.baseline-item .label {
	font-size: 12px;
	color: #637381;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.baseline-item .value {
	font-size: 20px;
	color: #212B36;
	font-weight: 700;
}

.baseline-divider {
	font-size: 14px;
	color: #919EAB;
	font-weight: 600;
}

.baseline-difference {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 16px;
	padding: 12px;
	background: #F9FAFB;
	border-radius: 6px;
}

.baseline-difference i {
	font-size: 20px;
}

.baseline-trend {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.baseline-trend .trend-label {
	color: #637381;
	font-weight: 500;
}

.baseline-trend .trend-value {
	font-weight: 600;
	text-transform: capitalize;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
	.performance-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	
	.performance-header-controls {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	
	.performance-date-range {
		text-align: center;
	}
	
	#performance-view-selector {
		width: 100%;
	}

	#performance-view-selector {
		width: 100%;
	}

	.performance-tabs {
		overflow-x: auto;
		flex-wrap:nowrap;
		-webkit-overflow-scrolling: touch;
	}

	.performance-tab {
		white-space: nowrap;
		padding: 12px 16px;
	}

	.congratulations-banner {
		flex-direction: column;
		text-align: center;
		padding: 16px;
	}

	.congratulations-banner > i {
		font-size: 40px;
	}

	.congratulations-content h4 {
		font-size: 16px;
	}

	.congratulations-content p {
		font-size: 13px;
	}

	.overview-grid,
	.goals-grid,
	.achievements-grid,
	.baselines-grid {
		grid-template-columns: 1fr;
	}

	.quick-stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.achievements-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.baselines-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.baseline-comparison {
		flex-direction: column;
		gap: 16px;
	}

	.baseline-divider {
		transform: rotate(90deg);
	}
}

@media (max-width: 480px) {
	.performance-tracker-wrapper {
		padding: 16px;
	}

	.performance-header h3 {
		font-size: 20px;
	}

	.goal-card,
	.achievement-card,
	.baseline-card {
		padding: 16px;
	}

	.quick-stats-grid {
		grid-template-columns: 1fr;
	}
}

/* ============================================================================
   STREAK INDICATORS (Phase 2 Part 3)
   ============================================================================ */

.streak-indicator-container {
	margin-bottom: 32px;
}

.streak-indicator {
	display: flex;
	align-items: center;
	gap: 20px;
	background: #ffffff;
	border: 3px solid #E5EAF0;
	border-radius: 16px;
	padding: 24px;
	transition: all 0.3s ease;
}

.streak-indicator.active-streak {
	background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
	box-shadow: 0 4px 16px rgba(255, 153, 0, 0.2);
	animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
	0%, 100% {
		box-shadow: 0 4px 16px rgba(255, 153, 0, 0.2);
	}
	50% {
		box-shadow: 0 6px 24px rgba(255, 153, 0, 0.3);
	}
}

.streak-indicator.no-streak {
	background: #F9FAFB;
	border-color: #E5EAF0;
	opacity: 0.7;
}

.streak-flame {
	font-size: 64px;
	flex-shrink: 0;
	animation: flameFlicker 1.5s ease-in-out infinite;
}

@keyframes flameFlicker {
	0%, 100% {
		transform: scale(1) rotate(-5deg);
	}
	50% {
		transform: scale(1.1) rotate(5deg);
	}
}

.streak-indicator.no-streak .streak-flame {
	font-size: 48px;
	color: #919EAB;
	animation: none;
}

.streak-content {
	flex: 1;
}

.streak-content h4 {
	margin: 0 0 12px 0;
	font-size: 20px;
	font-weight: 700;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 12px;
}

.streak-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 700;
}

.streak-count {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 8px;
}

.count-number {
	font-size: 48px;
	font-weight: 800;
	color: #FF9900;
	line-height: 1;
}

.count-label {
	font-size: 16px;
	font-weight: 600;
	color: #637381;
}

.streak-message {
	margin: 0;
	font-size: 14px;
	color: #637381;
	line-height: 1.5;
}

/* ============================================================================
   BONUS MILESTONES (Phase 2 Part 3)
   ============================================================================ */

.bonus-milestones-container {
	margin-bottom: 32px;
}

.bonus-milestones-container h4 {
	margin: 0 0 16px 0;
	font-size: 18px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

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

.bonus-milestone-card {
	background: #ffffff;
	border: 3px solid #E5EAF0;
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.3s ease;
}

.bonus-milestone-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.bonus-milestone-card.achieved {
	border-color: #28a745;
	box-shadow: 0 4px 16px rgba(40, 167, 69, 0.2);
}

.bonus-milestone-card.active {
	border-color: #FF9900;
	box-shadow: 0 4px 16px rgba(255, 153, 0, 0.15);
}

.bonus-milestone-card.awarded {
	opacity: 0.7;
	border-color: #6c757d;
}

.bonus-milestone-card.inactive {
	opacity: 0.6;
}

.milestone-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.milestone-badge {
	font-size: 16px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 6px;
}

.milestone-months {
	font-size: 14px;
	font-weight: 600;
	color: #637381;
	background: #F4F6F8;
	padding: 4px 10px;
	border-radius: 6px;
}

.milestone-body {
	padding: 20px;
}

.milestone-reward {
	text-align: center;
	margin-bottom: 20px;
	padding: 16px;
	background: #F9FAFB;
	border-radius: 8px;
}

.reward-amount {
	font-size: 32px;
	font-weight: 800;
	color: #28a745;
	margin-bottom: 4px;
}

.reward-description {
	font-size: 18px;
	font-weight: 700;
	color: #212B36;
	margin-bottom: 4px;
}

.reward-type {
	font-size: 13px;
	font-weight: 600;
	color: #637381;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.milestone-progress {
	margin-bottom: 12px;
}

.milestone-progress .progress-bar-container {
	height: 8px;
	margin-bottom: 12px;
}

.progress-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
}

.progress-current {
	font-weight: 700;
	color: #212B36;
}

.progress-status {
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 12px;
}

.progress-status.achieved {
	background: #E8F5E9;
	color: #388E3C;
}

.progress-status.active {
	background: #FFF9C4;
	color: #F57C00;
}

.progress-status.awarded {
	background: #E3F2FD;
	color: #1976D2;
}

.progress-status.inactive {
	background: #F4F6F8;
	color: #919EAB;
}

.milestone-repeatable {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #637381;
	padding: 8px;
	background: #F4F6F8;
	border-radius: 6px;
	margin-top: 12px;
}

.milestone-repeatable i {
	font-size: 16px;
}

/* ============================================================================
   BONUS HISTORY (Phase 2 Part 3)
   ============================================================================ */

.bonus-history-container {
	margin-top: 32px;
	background: #F9FAFB;
	border: 1px solid #E5EAF0;
	border-radius: 12px;
	padding: 24px;
}

.bonus-history-container h4 {
	margin: 0 0 20px 0;
	font-size: 18px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.bonus-history-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bonus-history-item {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #ffffff;
	border: 1px solid #E5EAF0;
	border-radius: 8px;
	padding: 16px;
	transition: all 0.2s ease;
}

.bonus-history-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transform: translateX(4px);
}

.bonus-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	flex-shrink: 0;
}

.bonus-details {
	flex: 1;
}

.bonus-title {
	font-size: 15px;
	font-weight: 600;
	color: #212B36;
	margin-bottom: 4px;
}

.bonus-description {
	font-size: 14px;
	color: #637381;
}

.bonus-date {
	font-size: 13px;
	color: #919EAB;
	font-weight: 500;
}

/* ============================================================================
   RESPONSIVE DESIGN FOR NEW COMPONENTS
   ============================================================================ */

@media (max-width: 768px) {
	.streak-indicator {
		flex-direction: column;
		text-align: center;
		padding: 20px;
	}

	.streak-flame {
		font-size: 48px;
	}

	.count-number {
		font-size: 36px;
	}

	.bonus-milestones-grid {
		grid-template-columns: 1fr;
	}

	.bonus-history-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.bonus-icon {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}
}

@media (max-width: 480px) {
	.streak-content h4 {
		flex-direction: column;
		align-items: center;
		gap: 8px;
	}

	.reward-amount {
		font-size: 24px;
	}

	.reward-description {
		font-size: 16px;
	}
}


/* ============================================================================
   BONUS ACHIEVED SECTION (STEP 5)
   ============================================================================ */

.performance-bonus-achieved {
	padding: 20px 0;
}

.bonus-achieved-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 16px;
}

.bonus-achieved-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.bonus-count {
	font-size: 14px;
	color: #637381;
	background: #F4F6F8;
	padding: 6px 12px;
	border-radius: 4px;
	font-weight: 600;
}

.bonus-achieved-empty {
	text-align: center;
	padding: 60px 20px;
	background: #F9FAFB;
	border: 2px dashed #E5EAF0;
	border-radius: 12px;
}

.bonus-achieved-empty i {
	font-size: 48px;
	color: #919EAB;
	margin-bottom: 16px;
	display: block;
}

.bonus-achieved-empty p {
	font-size: 16px;
	color: #637381;
	margin: 0;
}

.bonus-achieved-table-container {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background: #ffffff;
	border: 1px solid #E5EAF0;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.bonus-achieved-table thead {
	background: #F9FAFB;
	border-bottom: 2px solid #E5EAF0;
}

.bonus-achieved-table th {
	padding: 16px;
	text-align: left;
	font-weight: 600;
	color: #637381;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: 12px;
}

.bonus-achieved-table tbody tr {
	border-bottom: 1px solid #E5EAF0;
	transition: all 0.2s ease;
}

.bonus-achieved-table tbody tr:hover {
	background: #F9FAFB;
}

.bonus-achieved-table tbody tr.status-claimed {
	opacity: 0.8;
}

.bonus-achieved-table td {
	padding: 16px;
	color: #212B36;
}

.tier-cell {
	font-weight: 600;
}

.tier-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
}

.description-cell {
	color: #637381;
}

.bonus-info {
	text-align: left;
}

.bonus-title {
	font-weight: 600;
	color: #212B36;
	margin-bottom: 4px;
}

.bonus-meta {
	font-size: 12px;
	color: #919EAB;
}

.amount-cell {
	font-weight: 600;
	color: #28a745;
}

.amount-value {
	font-size: 16px;
	font-weight: 700;
}

.type-value {
	display: inline-block;
	padding: 4px 10px;
	background: #E3F2FD;
	color: #1976D2;
	border-radius: 6px;
	font-weight: 600;
	font-size: 12px;
}

.status-cell {
	text-align: center;
}

.status-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.status-badge.status-pending {
	background: #FFF9C4;
	color: #F57C00;
}

.status-badge.status-claimed {
	background: #E8F5E9;
	color: #388E3C;
}

.action-cell {
	text-align: center;
}

.btn-claim {
	padding: 8px 16px;
	background: #0073aa;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.btn-claim:hover {
	background: #005a87;
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
	transform: translateY(-1px);
}

.btn-claim:active {
	transform: translateY(0);
}

.action-claimed {
	display: inline-block;
	padding: 8px 16px;
	background: #E8F5E9;
	color: #388E3C;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

/* Responsive Design for Bonus Achieved Table */
@media (max-width: 768px) {
	.bonus-achieved-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.bonus-achieved-table {
		font-size: 12px;
	}

	.bonus-achieved-table th,
	.bonus-achieved-table td {
		padding: 12px 8px;
	}

	.bonus-title {
		font-size: 13px;
	}

	.bonus-meta {
		font-size: 11px;
	}

	.btn-claim,
	.action-claimed {
		padding: 6px 12px;
		font-size: 12px;
	}
}

@media (max-width: 480px) {
	.bonus-achieved-table-container {
		border-radius: 8px;
	}

	.bonus-achieved-table th,
	.bonus-achieved-table td {
		padding: 10px 6px;
	}

	.bonus-achieved-table th {
		font-size: 10px;
	}

	.tier-badge {
		padding: 4px 8px;
		font-size: 11px;
	}

	.amount-value {
		font-size: 14px;
	}

	.btn-claim,
	.action-claimed {
		padding: 6px 10px;
		font-size: 11px;
	}
}


/* ============================================================================
   SECRET CODE POPUP (STEP 8)
   ============================================================================ */

.secret-code-popup {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.secret-code-content {
	background: #ffffff;
	border-radius: 12px;
	padding: 32px;
	max-width: 500px;
	width: 90%;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	animation: slideUp 0.3s ease;
}

@keyframes slideUp {
	from {
		transform: translateY(20px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.secret-code-content h3 {
	margin: 0 0 16px 0;
	font-size: 20px;
	font-weight: 700;
	color: #212B36;
}

.secret-code-content p {
	margin: 0 0 16px 0;
	font-size: 14px;
	color: #637381;
	line-height: 1.5;
}

.secret-code-display {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #F9FAFB;
	border: 2px solid #E5EAF0;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 16px;
}

.secret-code-display code {
	flex: 1;
	font-family: 'Courier New', monospace;
	font-size: 18px;
	font-weight: 700;
	color: #FF9900;
	letter-spacing: 2px;
	word-break: break-all;
}

.btn-copy {
	padding: 8px 16px;
	background: #0073aa;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	flex-shrink: 0;
}

.btn-copy:hover {
	background: #005a87;
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.btn-copy:active {
	transform: scale(0.98);
}

.secret-code-note {
	font-size: 12px;
	color: #919EAB;
	font-style: italic;
	margin-bottom: 24px !important;
}

.secret-code-content .btn-close {
	width: 100%;
	padding: 12px 16px;
	background: #F4F6F8;
	color: #212B36;
	border: 1px solid #E5EAF0;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.secret-code-content .btn-close:hover {
	background: #E5EAF0;
	border-color: #919EAB;
}

@media (max-width: 480px) {
	.secret-code-content {
		padding: 24px;
	}

	.secret-code-display {
		flex-direction: column;
		align-items: stretch;
	}

	.secret-code-display code {
		text-align: center;
		padding: 12px 0;
	}

	.btn-copy {
		width: 100%;
	}
}


/* ============================================================================
   BONUS ACHIEVED TABLE - ADDITIONAL STYLES (STEP 10)
   ============================================================================ */

.bonus-row.status-submitted {
	background: #fffbf0;
}

.status-badge.status-submitted {
	background: #FFF9C4;
	color: #F57C00;
}

.btn-view-code {
	padding: 8px 16px;
	background: #6f42c1;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.btn-view-code:hover {
	background: #5a32a3;
	box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
	transform: translateY(-1px);
}

.btn-view-code:active {
	transform: translateY(0);
}

/* ============================================================================
   SECRET CODE POPUP - RESEND BUTTON (STEP 10)
   ============================================================================ */

.secret-code-content .btn-resend {
	width: 100%;
	padding: 12px 16px;
	background: #0073aa;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-bottom: 12px;
}

.secret-code-content .btn-resend:hover {
	background: #005a87;
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.secret-code-content .btn-resend:active {
	transform: scale(0.98);
}

@media (max-width: 480px) {
	.btn-view-code {
		padding: 6px 12px;
		font-size: 12px;
	}

	.secret-code-content .btn-resend {
		padding: 10px 12px;
		font-size: 13px;
	}
}

/* ============================================================================
   PERIOD ACHIEVEMENTS - DETAILED HISTORY
   ============================================================================ */

.performance-period-achievements {
	padding: 20px 0;
}

.period-achievements-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid #E5EAF0;
}

.period-achievements-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.period-achievements-header h3 i {
	font-size: 24px;
	color: #FF9900;
}

.period-label {
	font-size: 14px;
	color: #637381;
	font-weight: 500;
}

.period-achievements-empty {
	text-align: center;
	padding: 60px 20px;
	background: #F9FAFB;
	border-radius: 8px;
	margin: 20px 0;
}

.period-achievements-empty i {
	font-size: 48px;
	color: #919EAB;
	margin-bottom: 16px;
	display: block;
}

.period-achievements-empty p {
	font-size: 16px;
	color: #637381;
	margin: 0;
}

/* Period Badge Container */
.period-badge-container {
	margin-bottom: 32px;
}

.period-badge-display {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	background: #F9FAFB;
	padding: 24px;
	border-radius: 12px;
	border: 2px solid #E5EAF0;
}

.period-badge-large {
	flex-shrink: 0;
	width: 140px;
	height: 140px;
	border: 3px solid;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: white;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.badge-icon-large {
	width: 100%;
	height: 100%;
}

.period-badge-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.period-badge-info h4 {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 600;
	color: #212B36;
}

.period-dates {
	margin: 0 0 16px 0;
	font-size: 13px;
	color: #919EAB;
}

.period-metrics {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 16px;
}

.metric-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.metric-label {
	font-size: 12px;
	color: #919EAB;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.metric-value {
	font-size: 18px;
	font-weight: 600;
	color: #212B36;
}

.metric-tier {
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Detailed Period History */
.period-history-detailed-container {
	margin-top: 32px;
}

.period-history-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid #E5EAF0;
}

.period-history-header h4 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.period-history-header h4 i {
	font-size: 18px;
	color: #FF9900;
}

.history-count {
	font-size: 13px;
	color: #919EAB;
	background: #F9FAFB;
	padding: 4px 12px;
	border-radius: 20px;
}

/* Timeline View */
.period-history-timeline {
	position: relative;
	padding: 20px 0;
}

.period-history-timeline::before {
	content: '';
	position: absolute;
	left: 19px;
	top: 0;
	bottom: 0;
	width: 2px;
	background: linear-gradient(to bottom, #FFD700, #C0C0C0, #CD7F32, #E5EAF0);
}

.timeline-item {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
	padding: 16px;
	background: #F9FAFB;
	border-radius: 8px;
	border-left: 3px solid #E5EAF0;
	transition: all 0.3s ease;
	cursor: pointer;
}

.timeline-item:hover {
	background: #FFFFFF;
	border-left-color: #FF9900;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.timeline-item.latest {
	background: #FFFBF0;
	border-left-color: #FFD700;
	box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
}

.timeline-item.expanded {
	background: #FFFFFF;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.timeline-marker {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 18px;
	font-weight: bold;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	margin-top: 2px;
}

.marker-emoji {
	font-size: 20px;
}

.timeline-content {
	flex: 1;
	min-width: 0;
}

.timeline-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	gap: 12px;
}

.timeline-period {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #212B36;
}

.badge-latest {
	display: inline-block;
	background: #FFD700;
	color: #8B6914;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

.timeline-achievement {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.achievement-tier {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border: 2px solid;
	background: transparent;
}

.achievement-count {
	font-size: 12px;
	color: #919EAB;
	font-weight: 500;
}

.timeline-details {
	margin-top: 12px;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.timeline-item.expanded .timeline-details {
	max-height: 200px;
}

.achievements-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.achievement-badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 16px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border: 1px solid;
	white-space: nowrap;
}

/* Summary Stats */
.period-history-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 16px;
	margin-top: 24px;
	padding: 20px;
	background: #F9FAFB;
	border-radius: 8px;
	border: 1px solid #E5EAF0;
}

.summary-stat {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-align: center;
}

.stat-label {
	font-size: 12px;
	color: #919EAB;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.stat-value {
	font-size: 24px;
	font-weight: 700;
	color: #212B36;
}

/* Responsive Design for Period Achievements */
@media (max-width: 768px) {
	.period-badge-display {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.period-metrics {
		grid-template-columns: 1fr;
	}

	.timeline-item {
		padding: 12px;
	}

	.timeline-marker {
		width: 36px;
		height: 36px;
		font-size: 16px;
	}

	.period-history-summary {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.period-achievements-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.period-badge-display {
		padding: 16px;
		gap: 16px;
	}

	.period-badge-large {
		width: 100px;
		height: 100px;
	}

	.period-badge-info h4 {
		font-size: 16px;
	}

	.timeline-item {
		padding: 12px;
		gap: 12px;
	}

	.timeline-marker {
		width: 32px;
		height: 32px;
		font-size: 14px;
	}

	.timeline-period {
		font-size: 13px;
	}

	.period-history-summary {
		grid-template-columns: 1fr;
	}

	.stat-value {
		font-size: 20px;
	}
}


/* ============================================================================
   PERIOD HISTORY ADMIN VIEW (STEP 7)
   ============================================================================ */

.period-history-admin {
	padding: 20px 0;
}

.period-history-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 16px;
}

.period-history-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.history-count {
	font-size: 14px;
	color: #637381;
	background: #F4F6F8;
	padding: 6px 12px;
	border-radius: 4px;
	font-weight: 600;
}

.period-history-empty {
	text-align: center;
	padding: 60px 20px;
	background: #F9FAFB;
	border: 2px dashed #E5EAF0;
	border-radius: 12px;
}

.period-history-empty i {
	font-size: 48px;
	color: #919EAB;
	margin-bottom: 16px;
	display: block;
}

.period-history-empty p {
	font-size: 16px;
	color: #637381;
	margin: 0;
}

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

.period-history-card {
	background: #ffffff;
	border: 2px solid #E5EAF0;
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.period-history-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.period-history-card.current {
	border-color: #FF9900;
	background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
	box-shadow: 0 4px 12px rgba(255, 153, 0, 0.15);
}

.card-header {
	padding: 16px 20px;
	border-bottom: 2px solid #F4F6F8;
	background: #F9FAFB;
}

.period-label-badge {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.period-name {
	font-size: 16px;
	font-weight: 700;
	color: #212B36;
}

.badge-current {
	display: inline-block;
	background: #FF9900;
	color: #ffffff;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.period-dates {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #637381;
}

.period-dates i {
	font-size: 14px;
}

.card-achievement {
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 16px;
	background: #F9FAFB;
	border-bottom: 2px solid #F4F6F8;
}

.achievement-badge {
	width: 80px;
	height: 80px;
	border-radius: 12px;
	border: 3px solid;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: #ffffff;
}

.badge-icon-small {
	width: 100%;
	height: 100%;
}

.achievement-info h4 {
	margin: 0 0 4px 0;
	font-size: 16px;
	font-weight: 700;
	color: #212B36;
}

.achievement-count {
	margin: 0;
	font-size: 13px;
	color: #637381;
}

.achievement-none {
	text-align: center;
	padding: 20px;
	color: #919EAB;
}

.achievement-none i {
	font-size: 32px;
	margin-bottom: 8px;
	display: block;
}

.achievement-none p {
	margin: 0;
	font-size: 14px;
}

.card-metrics {
	padding: 16px 20px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	border-bottom: 2px solid #F4F6F8;
}

.metric {
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: center;
}

.metric-label {
	font-size: 12px;
	color: #637381;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.metric-value {
	font-size: 16px;
	font-weight: 700;
	color: #212B36;
}

.card-achievements-list {
	padding: 16px 20px;
	flex: 1;
}

.card-achievements-list h5 {
	margin: 0 0 12px 0;
	font-size: 13px;
	font-weight: 700;
	color: #212B36;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.card-achievements-list ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.card-achievements-list li {
	font-size: 13px;
	color: #637381;
	padding: 6px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.card-achievements-list li::before {
	content: '';
	width: 4px;
	height: 4px;
	background: #919EAB;
	border-radius: 50%;
	flex-shrink: 0;
}

/* Responsive Design for Period History */
@media (max-width: 768px) {
	.period-history-grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	}

	.card-metrics {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.card-achievement {
		flex-direction: column;
		text-align: center;
	}

	.achievement-badge {
		width: 70px;
		height: 70px;
	}

	.achievement-info h4 {
		font-size: 15px;
	}
}

@media (max-width: 480px) {
	.period-history-grid {
		grid-template-columns: 1fr;
	}

	.period-label-badge {
		flex-direction: column;
		align-items: flex-start;
	}

	.badge-current {
		align-self: flex-start;
	}

	.card-header {
		padding: 12px 16px;
	}

	.card-achievement {
		padding: 16px;
	}

	.achievement-badge {
		width: 60px;
		height: 60px;
	}

	.card-metrics {
		padding: 12px 16px;
	}

	.card-achievements-list {
		padding: 12px 16px;
	}
}


/* ============================================================================
   PERIOD ACHIEVEMENT NOTIFICATION (STEP 8)
   ============================================================================ */

.period-achievement-notification-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	opacity: 0;
	transition: opacity 0.3s ease;
	backdrop-filter: blur(4px);
}

.period-achievement-notification-overlay.show {
	opacity: 1;
}

.period-achievement-notification-modal {
	background: #ffffff;
	border-radius: 16px;
	max-width: 600px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	position: relative;
	animation: notificationSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes notificationSlideUp {
	from {
		transform: translateY(40px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.notification-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	color: #919EAB;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	z-index: 10001;
}

.notification-close:hover {
	color: #212B36;
	transform: scale(1.1);
}

.notification-content {
	padding: 40px 32px 32px 32px;
	text-align: center;
}

.notification-header {
	margin-bottom: 32px;
}

.notification-header h2 {
	margin: 0 0 12px 0;
	font-size: 32px;
	font-weight: 800;
	color: #212B36;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.notification-header h2 i {
	font-size: 36px;
	animation: confetti 0.6s ease-out;
}

@keyframes confetti {
	0% {
		transform: scale(0) rotate(-180deg);
		opacity: 0;
	}
	100% {
		transform: scale(1) rotate(0);
		opacity: 1;
	}
}

.notification-header p {
	margin: 0;
	font-size: 16px;
	color: #637381;
}

.notification-badge-container {
	padding: 32px;
	border-radius: 12px;
	margin-bottom: 32px;
	display: flex;
	justify-content: center;
}

.notification-badge-large {
	width: 140px;
	height: 140px;
	border-radius: 16px;
	border: 4px solid;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	animation: badgePulse 0.6s ease-out;
}

@keyframes badgePulse {
	0% {
		transform: scale(0.8);
		opacity: 0;
	}
	50% {
		transform: scale(1.05);
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.badge-icon-notification {
	width: 100%;
	height: 100%;
}

.notification-details {
	margin-bottom: 32px;
}

.notification-details h3 {
	margin: 0 0 8px 0;
	font-size: 24px;
	font-weight: 700;
	color: #212B36;
}

.notification-period {
	margin: 0 0 4px 0;
	font-size: 16px;
	font-weight: 600;
	color: #FF9900;
}

.notification-dates {
	margin: 0 0 24px 0;
	font-size: 13px;
	color: #919EAB;
}

.notification-metrics {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-bottom: 24px;
	padding: 20px;
	background: #F9FAFB;
	border-radius: 8px;
}

.notification-metrics .metric-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.notification-metrics .metric-label {
	font-size: 12px;
	color: #637381;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.notification-metrics .metric-value {
	font-size: 18px;
	font-weight: 700;
	color: #212B36;
}

.notification-achievements {
	text-align: left;
	background: #F9FAFB;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 24px;
}

.notification-achievements h4 {
	margin: 0 0 12px 0;
	font-size: 14px;
	font-weight: 700;
	color: #212B36;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.notification-achievements ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.notification-achievements li {
	font-size: 14px;
	color: #637381;
	padding: 8px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.notification-achievements li::before {
	content: '';
	width: 6px;
	height: 6px;
	background: #FF9900;
	border-radius: 50%;
	flex-shrink: 0;
}

.notification-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
}

.btn-notification-close {
	padding: 12px 32px;
	background: #FF9900;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 200px;
}

.btn-notification-close:hover {
	background: #E68A00;
	box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
	transform: translateY(-2px);
}

.btn-notification-close:active {
	transform: translateY(0);
}

/* Responsive Design for Notification */
@media (max-width: 768px) {
	.period-achievement-notification-modal {
		width: 95%;
		max-height: 95vh;
	}

	.notification-content {
		padding: 32px 24px 24px 24px;
	}

	.notification-header h2 {
		font-size: 28px;
	}

	.notification-badge-large {
		width: 120px;
		height: 120px;
	}

	.notification-details h3 {
		font-size: 20px;
	}

	.notification-metrics {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.btn-notification-close {
		min-width: 100%;
	}
}

@media (max-width: 480px) {
	.notification-content {
		padding: 24px 16px 16px 16px;
	}

	.notification-header h2 {
		font-size: 24px;
		gap: 8px;
	}

	.notification-header h2 i {
		font-size: 28px;
	}

	.notification-badge-container {
		padding: 24px 16px;
		margin-bottom: 24px;
	}

	.notification-badge-large {
		width: 100px;
		height: 100px;
	}

	.notification-details h3 {
		font-size: 18px;
	}

	.notification-period {
		font-size: 14px;
	}

	.notification-metrics {
		padding: 16px;
	}

	.notification-achievements {
		padding: 16px;
	}

	.btn-notification-close {
		padding: 10px 24px;
		font-size: 14px;
	}
}


/* ============================================================================
   LEADERBOARD SECTION (Phase 3)
   ============================================================================ */

.performance-leaderboard {
	padding: 20px 0;
}

.leaderboard-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 16px;
}

.leaderboard-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.leaderboard-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	font-size: 13px;
	color: #637381;
}

.leaderboard-criteria {
	font-weight: 600;
	color: #212B36;
}

.leaderboard-period {
	font-size: 12px;
	color: #919EAB;
}

/* User Rank Card */
.user-rank-card {
	display: flex;
	align-items: center;
	gap: 24px;
	background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
	border: 3px solid #0073aa;
	border-radius: 16px;
	padding: 24px;
	margin-bottom: 32px;
	box-shadow: 0 4px 16px rgba(0, 115, 170, 0.15);
}

.rank-badge-large {
	font-size: 64px;
	font-weight: 800;
	color: #0073aa;
	flex-shrink: 0;
	text-align: center;
	min-width: 80px;
}

.rank-info {
	flex: 1;
}

.rank-info h4 {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 600;
	color: #212B36;
}

.rank-position {
	margin: 0 0 4px 0;
	font-size: 24px;
	font-weight: 700;
	color: #0073aa;
}

.rank-percentile {
	margin: 0;
	font-size: 14px;
	color: #637381;
}

.rank-stats {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-left: 24px;
	border-left: 2px solid #E5EAF0;
}

.rank-stats .stat {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	font-size: 14px;
}

.rank-stats .stat span {
	color: #637381;
}

.rank-stats .stat strong {
	color: #212B36;
	font-weight: 600;
}

/* Filtered Out User Rank Card */
.user-rank-card.filtered-out {
	background: linear-gradient(135deg, #ffffff 0%, #fff8f0 100%);
	border-color: #ff9800;
	box-shadow: 0 4px 16px rgba(255, 152, 0, 0.15);
}

.user-rank-card.filtered-out .rank-badge-large {
	color: #ff9800;
}

.user-rank-card.filtered-out .rank-position {
	color: #ff9800;
	font-size: 16px;
	font-weight: 600;
}

.user-rank-card.filtered-out .rank-percentile {
	color: #637381;
	font-style: italic;
}

/* Leaderboard List */
.leaderboard-list {
	background: #ffffff;
	border: 1px solid #E5EAF0;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 24px;
}

.leaderboard-list h4 {
	margin: 0 0 20px 0;
	font-size: 18px;
	font-weight: 600;
	color: #212B36;
	display: flex;
	align-items: center;
	gap: 8px;
}

.leaderboard-entry {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	background: #F9FAFB;
	border: 2px solid #E5EAF0;
	border-radius: 12px;
	margin-bottom: 12px;
	transition: all 0.3s ease;
}

.leaderboard-entry:hover {
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transform: translateX(4px);
}

.leaderboard-entry.top-three {
	background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
	border-color: #FFD700;
	box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.entry-rank {
	font-size: 32px;
	font-weight: 800;
	color: #212B36;
	min-width: 60px;
	text-align: center;
	flex-shrink: 0;
}

.leaderboard-entry.top-three .entry-rank {
	font-size: 40px;
}

.entry-info {
	flex: 1;
}

.entry-name {
	font-size: 16px;
	font-weight: 600;
	color: #212B36;
	margin-bottom: 4px;
}

.entry-score {
	font-size: 13px;
	color: #637381;
}

.entry-metrics {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.entry-metrics span {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: #637381;
	background: #ffffff;
	padding: 6px 12px;
	border-radius: 6px;
	border: 1px solid #E5EAF0;
}

.entry-metrics i {
	font-size: 16px;
	color: #0073aa;
}

/* Leaderboard Footer */
.leaderboard-footer {
	text-align: center;
	padding: 16px;
	background: #F9FAFB;
	border-radius: 8px;
}

.leaderboard-footer p {
	margin: 0;
	font-size: 13px;
	color: #637381;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.leaderboard-footer i {
	font-size: 16px;
	color: #919EAB;
}

/* Leaderboard Disabled */
.leaderboard-disabled {
	text-align: center;
	padding: 60px 20px;
	background: #F9FAFB;
	border: 2px dashed #E5EAF0;
	border-radius: 12px;
}

.leaderboard-disabled i {
	font-size: 64px;
	color: #919EAB;
	margin-bottom: 16px;
	display: block;
}

.leaderboard-disabled h4 {
	margin: 0 0 12px 0;
	font-size: 20px;
	font-weight: 600;
	color: #212B36;
}

.leaderboard-disabled p {
	margin: 0;
	font-size: 14px;
	color: #637381;
	line-height: 1.6;
}

/* No Data Message */
.leaderboard-list .no-data {
	text-align: center;
	padding: 40px 20px;
	color: #637381;
	font-size: 14px;
}

/* Responsive Design for Leaderboard */
@media (max-width: 768px) {
	.leaderboard-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.leaderboard-meta {
		align-items: flex-start;
	}

	.user-rank-card {
		flex-direction: column;
		text-align: center;
		padding: 20px;
	}

	.rank-badge-large {
		font-size: 48px;
	}

	.rank-stats {
		padding-left: 0;
		padding-top: 16px;
		border-left: none;
		border-top: 2px solid #E5EAF0;
		width: 100%;
	}

	.leaderboard-entry {
		flex-wrap: wrap;
	}

	.entry-rank {
		font-size: 24px;
		min-width: 50px;
	}

	.leaderboard-entry.top-three .entry-rank {
		font-size: 32px;
	}

	.entry-metrics {
		width: 100%;
		justify-content: flex-start;
	}
}

@media (max-width: 480px) {
	.rank-badge-large {
		font-size: 40px;
		min-width: 60px;
	}

	.rank-position {
		font-size: 20px;
	}

	.entry-rank {
		font-size: 20px;
		min-width: 40px;
	}

	.leaderboard-entry.top-three .entry-rank {
		font-size: 28px;
	}

	.entry-name {
		font-size: 14px;
	}

	.entry-metrics span {
		font-size: 12px;
		padding: 4px 8px;
	}
}


/* ============================================================================
   PERFORMANCE TAB OVERRIDE - Prevent global pv-page-wrapper button styles
   ============================================================================ */

/* 
 * The .performance-tab is styled by dynamic CSS in myaccount.php
 * This rule resets the global .pv-page-wrapper button styles
 * Higher specificity: .pv-page-wrapper .performance-tracker-wrapper .performance-tab
 * beats .pv-page-wrapper button
 */
.pv-page-wrapper .performance-tracker-wrapper .performance-tabs .performance-tab {
	/* Reset all global button styles */
	background: transparent;
	color: inherit !important;
	border: none !important;
	border-bottom: 3px solid;
	border-radius: 6px 6px 0 0 !important;
	padding: 12px 24px !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
}

/* Reset hover state - dynamic CSS will apply its own */
.pv-page-wrapper .performance-tracker-wrapper .performance-tabs .performance-tab:hover {
	background: transparent !important;
}

/* Reset active state - dynamic CSS will apply its own */
.pv-page-wrapper .performance-tracker-wrapper .performance-tabs .performance-tab.active {
	background: transparent !important;
	font-weight: 600 !important;
}
