/* Minimal accessible defaults */
:root { --aim-focus: #005fcc }

a:focus, button:focus, input:focus, select:focus, textarea:focus {
	outline: 3px solid var(--aim-focus);
	outline-offset: 2px;
}

.aim-skip-link {
	position: absolute;
	left: -9999px;
	background: #fff;
	color: #000;
	padding: .5rem 1rem;
	z-index: 10000;
}
.aim-skip-link:focus { left: 1rem; top: 1rem }

[aria-live] { min-height: 1rem }

/* Student Profile Styles */
.aim-student-profile {
	margin: 0;
	padding: 0;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	min-height: 100vh;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.aim-profile-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.aim-profile-header {
	background: #fff;
	border-radius: 16px;
	padding: 32px;
	margin-bottom: 32px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
	border: 1px solid rgba(255,255,255,0.2);
	backdrop-filter: blur(10px);
}

.aim-profile-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.aim-profile-nav-actions {
	display: flex;
	gap: 16px;
	align-items: center;
}

.aim-back-link,
.aim-admin-link,
.aim-logout-link {
	color: #2271b1;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
	padding: 8px 16px;
	border-radius: 6px;
	border: 1px solid transparent;
}

.aim-back-link:hover,
.aim-admin-link:hover,
.aim-logout-link:hover {
	color: #135e96;
	text-decoration: underline;
	background: rgba(34, 113, 177, 0.1);
}

.aim-logout-link {
	color: #d63638;
	border-color: #d63638;
}

.aim-logout-link:hover {
	color: #b32d2e;
	background: rgba(214, 54, 56, 0.1);
	border-color: #b32d2e;
}

.aim-profile-title {
	margin: 0;
	color: #1d2327;
	font-size: 28px;
	font-weight: 700;
}

.aim-profile-main {
	display: grid;
	gap: 24px;
}

.aim-profile-section {
	background: #fff;
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
	border: 1px solid rgba(255,255,255,0.2);
	backdrop-filter: blur(10px);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aim-profile-section:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.aim-section-title {
	margin: 0 0 24px 0;
	color: #1d2327;
	font-size: 22px;
	font-weight: 700;
	border-bottom: 3px solid #2271b1;
	padding-bottom: 16px;
	position: relative;
}

.aim-section-title::after {
	content: '';
	position: absolute;
	bottom: -3px;
	left: 0;
	width: 60px;
	height: 3px;
	background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
	border-radius: 2px;
}

.aim-profile-info {
	display: flex;
	align-items: center;
	gap: 20px;
}

.aim-profile-avatar img {
	border-radius: 50%;
	border: 3px solid #e1e5e9;
}

.aim-user-name {
	margin: 0 0 8px 0;
	color: #1d2327;
	font-size: 24px;
	font-weight: 600;
}

.aim-user-email {
	margin: 0 0 4px 0;
	color: #646970;
	font-size: 16px;
}

.aim-user-role {
	margin: 0;
	color: #2271b1;
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

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

.aim-stat-card {
	text-align: center;
	padding: 24px;
	background: #f8f9fa;
	border-radius: 12px;
	border: 1px solid #e1e5e9;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.aim-stat-number {
	font-size: 36px;
	font-weight: 700;
	color: #2271b1;
	line-height: 1.2;
	margin-bottom: 8px;
}

.aim-stat-label {
	color: #646970;
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.aim-empty-state {
	text-align: center;
	padding: 48px 24px;
	color: #646970;
}

.aim-empty-state p {
	font-size: 18px;
	margin-bottom: 24px;
}

.aim-courses-list {
	display: grid;
	gap: 20px;
}

.aim-course-card {
	border: 1px solid #e1e5e9;
	border-radius: 12px;
	padding: 24px;
	background: #fff;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.aim-course-card.aim-course-completed {
	border-color: #00a32a;
	background: linear-gradient(135deg, #fff 0%, #f0f8f0 100%);
}

.aim-course-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 16px;
}

.aim-course-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
}

.aim-course-title a {
	color: #1d2327;
	text-decoration: none;
	transition: color 0.2s ease;
}

.aim-course-title a:hover {
	color: #2271b1;
}

.aim-course-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.aim-badge-completed {
	background: #00a32a;
	color: #fff;
}

.aim-course-progress {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.aim-progress-bar {
	flex: 1;
	height: 8px;
	background: #e1e5e9;
	border-radius: 4px;
	overflow: hidden;
}

.aim-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
	border-radius: 4px;
	transition: width 0.3s ease;
}

.aim-course-completed .aim-progress-fill {
	background: linear-gradient(90deg, #00a32a 0%, #007cba 100%);
}

.aim-progress-text {
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	min-width: 40px;
	text-align: right;
}

.aim-course-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
	color: #646970;
}

.aim-button {
	display: inline-block;
	padding: 16px 32px;
	border-radius: 12px;
	text-decoration: none;
	font-weight: 600;
	text-align: center;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	font-size: 16px;
	position: relative;
	overflow: hidden;
}

.aim-button-primary {
	background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
	color: #fff;
	box-shadow: 0 4px 15px rgba(34, 113, 177, 0.3);
}

.aim-button-primary:hover {
	background: linear-gradient(135deg, #135e96 0%, #0f4c75 100%);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(34, 113, 177, 0.4);
}

.aim-button-primary:active {
	transform: translateY(0);
	box-shadow: 0 2px 10px rgba(34, 113, 177, 0.3);
}

.aim-profile-footer {
	text-align: center;
	padding: 24px;
	color: #646970;
	font-size: 14px;
	margin-top: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.aim-profile-container {
		padding: 16px;
	}
	
	.aim-profile-header,
	.aim-profile-section {
		padding: 20px;
	}
	
	.aim-profile-nav {
		flex-direction: column;
		gap: 12px;
		align-items: flex-start;
	}
	
	.aim-profile-nav-actions {
		flex-direction: column;
		gap: 8px;
		align-items: flex-start;
		width: 100%;
	}
	
	.aim-profile-info {
		flex-direction: column;
		text-align: center;
	}
	
	.aim-stats-grid {
		grid-template-columns: 1fr;
	}
	
	.aim-course-header {
		flex-direction: column;
		gap: 12px;
		align-items: flex-start;
	}
	
	.aim-course-progress {
		flex-direction: column;
		gap: 8px;
		align-items: stretch;
	}
	
	.aim-progress-text {
		text-align: left;
	}
	
	.aim-enroll-actions {
		flex-direction: column;
		gap: 8px;
	}
	
	.aim-favorites-grid {
		grid-template-columns: 1fr;
	}
	
	.aim-favorite-actions {
		flex-direction: column;
		gap: 8px;
		align-items: stretch;
	}
}

/* Focus styles for accessibility */
.aim-back-link:focus,
.aim-admin-link:focus,
.aim-logout-link:focus,
.aim-course-title a:focus,
.aim-favorite-title a:focus,
.aim-button:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
	border-radius: 4px;
}

.aim-logout-link:focus {
	outline-color: #d63638;
}

/* Enrollment Button Styles */
.aim-enroll-section {
	padding: 24px;
	background: #f8f9fa;
	border-radius: 12px;
	border: 1px solid #e1e5e9;
	margin: 24px 0;
	text-align: center;
}

.aim-enroll-section.aim-enrolled {
	background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
	border-color: #00a32a;
}

.aim-enroll-section p {
	margin: 0 0 16px 0;
	color: #646970;
	font-size: 16px;
}

.aim-enroll-form {
	margin: 0;
}

.aim-button-large {
	padding: 16px 32px;
	font-size: 16px;
	font-weight: 600;
}

.aim-button-secondary {
	background: #646970;
	color: #fff;
}

.aim-button-secondary:hover {
	background: #50575e;
	color: #fff;
}

.aim-status-badge {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 16px;
}

.aim-badge-enrolled {
	background: #00a32a;
	color: #fff;
}

/* Favorites Styles */
.aim-favorite-section {
	margin-top: 16px;
	text-align: center;
}

.aim-button-favorite {
	background: #f8f9fa;
	color: #646970;
	border: 2px solid #e1e5e9;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	font-size: 14px;
}

.aim-button-favorite:hover {
	background: #e9ecef;
	color: #495057;
	border-color: #dee2e6;
}

.aim-button-favorite.aim-favorited {
	background: #fff5f5;
	color: #d63384;
	border-color: #f8d7da;
}

.aim-button-favorite.aim-favorited:hover {
	background: #fce4ec;
	color: #c2185b;
	border-color: #f5c2c7;
}

.aim-favorite-icon {
	font-size: 16px;
}

.aim-favorite-text {
	font-weight: 500;
}

.aim-enroll-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
}

/* Favorites Grid */
.aim-favorites-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}

.aim-favorite-card {
	background: #fff;
	border: 1px solid #e1e5e9;
	border-radius: 12px;
	padding: 20px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.aim-favorite-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 12px;
}

.aim-favorite-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	flex: 1;
}

.aim-favorite-title a {
	color: #1d2327;
	text-decoration: none;
	transition: color 0.2s ease;
}

.aim-favorite-title a:hover {
	color: #2271b1;
}

.aim-favorite-badge {
	background: #fff5f5;
	color: #d63384;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

.aim-favorite-excerpt {
	color: #646970;
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 16px;
}

.aim-favorite-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: space-between;
}

.aim-button-small {
	padding: 8px 16px;
	font-size: 14px;
}

.aim-enrolled-badge {
	background: #d1e7dd;
	color: #0f5132;
	padding: 6px 12px;
	border-radius: 16px;
	font-size: 12px;
	font-weight: 500;
}

.aim-notice {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 16px;
	font-weight: 500;
}

.aim-notice-success {
	background: #d1e7dd;
	color: #0f5132;
	border: 1px solid #badbcc;
}

.aim-notice-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c2c7;
}

/* Form Styles */
.aim-form {
	max-width: 450px;
	margin: 0 auto;
	padding: 32px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.1);
	border: 1px solid rgba(255,255,255,0.2);
	backdrop-filter: blur(10px);
}

.aim-form-group {
	margin-bottom: 20px;
}

.aim-form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #1d2327;
}

.aim-required {
	color: #d63638;
}

.aim-form-control {
	width: 100%;
	padding: 16px 20px;
	border: 2px solid #e1e5e9;
	border-radius: 12px;
	font-size: 16px;
	transition: all 0.3s ease;
	background: #fafbfc;
}

.aim-form-control:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.1);
	background: #fff;
	transform: translateY(-1px);
}

.aim-form-help {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: #646970;
}

.aim-button-full {
	width: 100%;
}

/* Live Region Styles */
.aim-live-region {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.aim-field-error {
	color: #d63638;
	font-size: 13px;
	margin-top: 4px;
	font-weight: 500;
}

.aim-submit-status {
	margin-top: 12px;
	font-size: 14px;
	font-weight: 500;
}

.aim-button-spinner {
	margin-left: 8px;
	animation: spin 1s linear infinite;
}

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

/* Enhanced Form Accessibility */
.aim-form-control:invalid {
	border-color: #d63638;
	box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.1);
}

.aim-form-control:valid {
	border-color: #00a32a;
}

.aim-form-control:focus:invalid {
	border-color: #d63638;
	box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.2);
}

.aim-form-control:focus:valid {
	border-color: #00a32a;
	box-shadow: 0 0 0 2px rgba(0, 163, 42, 0.2);
}

/* Access Control Styles */
.aim-access-denied {
	text-align: center;
	padding: 48px 24px;
	background: #f8f9fa;
	border-radius: 12px;
	border: 1px solid #e1e5e9;
	margin: 24px 0;
}

.aim-access-denied h3 {
	margin: 0 0 16px 0;
	color: #1d2327;
	font-size: 20px;
}

.aim-access-denied p {
	margin: 0 0 24px 0;
	color: #646970;
	font-size: 16px;
}

.aim-course-preview {
	position: relative;
}

.aim-course-excerpt {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	border-left: 4px solid #2271b1;
	margin-bottom: 20px;
}

.aim-course-excerpt::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(transparent 70%, rgba(255,255,255,0.9));
	pointer-events: none;
}


