/*
 * ALC LMS Design System
 * Established based on approved dashboard assets and modern web best practices.
 */

:root {
	/* Colors from approved design */
	--color-bg: #f4f7f9;
	--color-card-bg: #ffffff;
	
	--color-text-primary: #0d121c; /* Deep slate */
	--color-text-secondary: #4a5568; /* Slate */
	--color-text-muted: #94a3b8; /* Slate 400 */
	
	--color-brand-blue: #2563eb;
	--color-brand-blue-hover: #1d4ed8;
	--color-brand-blue-light: #eff6ff;
	
	--color-mastered: #81c784;      /* Soft Light Green from image */
	--color-mastered-dark: #2e7d32;
	--color-mastered-light: #f1f8e9;
	
	--color-working: #ffb74d;       /* Soft Yellow/Orange */
	--color-working-dark: #ef6c00;
	--color-working-light: #fff3e0;
	
	--color-attention: #e57373;     /* Soft Red */
	--color-attention-dark: #c62828;
	--color-attention-light: #ffebee;
	
	--color-border: #e2e8f0;        /* Slate 200 */
	
	/* Font Families */
	--font-headers: 'Outfit', 'Inter', system-ui, sans-serif;
	--font-body: 'Inter', system-ui, sans-serif;
	
	/* Layout Elements - Updated for rounded corners and soft edges */
	--radius-sm: 10px;
	--radius-md: 16px;
	--radius-lg: 28px;
	--radius-xl: 36px;
	--radius-round: 9999px;
	
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
	--shadow-md: 0 10px 20px rgba(0, 0, 0, 0.04);
	--shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.05);
	--shadow-xl: 0 30px 60px rgba(0, 0, 0, 0.06);
	
	--transition-fast: 0.15s ease;
	--transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	--transition-slow: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Global */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background-color: var(--color-bg);
	color: var(--color-text-primary);
	font-family: var(--font-body);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-headers);
	font-weight: 700;
	color: var(--color-text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
::-webkit-scrollbar-track {
	background: transparent;
}
::-webkit-scrollbar-thumb {
	background: var(--color-border);
	border-radius: var(--radius-round);
}
::-webkit-scrollbar-thumb:hover {
	background: var(--color-text-muted);
}

/* Typography & Layout spacing */
.text-center { text-align: center; }
.text-right { text-align: right; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.w-100 { width: 100%; }

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-headers);
	font-weight: 700;
	font-size: 14px;
	padding: 12px 28px;
	border-radius: var(--radius-round);
	border: 1px solid transparent;
	cursor: pointer;
	transition: all var(--transition-fast);
	text-decoration: none;
	gap: 8px;
	height: 46px;
}

.btn-primary {
	background-color: var(--color-brand-blue);
	color: #ffffff;
}
.btn-primary:hover {
	background-color: var(--color-brand-blue-hover);
	transform: translateY(-1px);
}
.btn-primary:active {
	transform: translateY(0);
}

.btn-outline {
	background-color: transparent;
	border-color: var(--color-border);
	color: var(--color-text-secondary);
}
.btn-outline:hover {
	background-color: var(--color-bg);
	color: var(--color-text-primary);
}

.btn-danger {
	background-color: var(--color-attention-light);
	border-color: var(--color-attention);
	color: var(--color-attention);
}
.btn-danger:hover {
	background-color: var(--color-attention);
	color: #ffffff;
}

.btn-success {
	background-color: var(--color-mastered-light);
	border-color: var(--color-mastered);
	color: var(--color-mastered-dark);
}
.btn-success:hover {
	background-color: var(--color-mastered);
	color: #ffffff;
}

.btn-icon {
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: var(--radius-round);
}

/* Cards */
.card {
	background-color: var(--color-card-bg);
	border-radius: var(--radius-lg);
	border: none;
	box-shadow: var(--shadow-md);
	padding: 32px;
	transition: all var(--transition-normal);
}
.card:hover {
	box-shadow: var(--shadow-lg);
}

/* Status Cards matching user image */
.status-card {
	border-radius: var(--radius-lg);
	padding: 24px;
	color: #ffffff;
	position: relative;
	overflow: hidden;
	box-shadow: var(--shadow-md);
}

.status-card.mastered {
	background-color: var(--color-mastered);
}
.status-card.working {
	background-color: var(--color-working);
}
.status-card.attention {
	background-color: var(--color-attention);
}

.status-card h4 {
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 8px;
}
.status-card .value {
	font-size: 56px;
	font-family: var(--font-headers);
	font-weight: 800;
	line-height: 1;
	margin-bottom: 16px;
}
.status-card .status-desc {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.9);
}

.status-card .icon-badge {
	position: absolute;
	right: 16px;
	top: 16px;
	width: 28px;
	height: 28px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: var(--radius-round);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
}

/* Inputs and Forms */
.form-group {
	margin-bottom: 20px;
}
.form-label {
	display: block;
	font-family: var(--font-headers);
	font-weight: 600;
	font-size: 14px;
	color: var(--color-text-primary);
	margin-bottom: 8px;
}
.form-control {
	width: 100%;
	height: 48px;
	padding: 0 20px;
	font-family: var(--font-body);
	font-size: 14px;
	border-radius: var(--radius-md);
	border: 1px solid #cbd5e1;
	background-color: #ffffff;
	color: var(--color-text-primary);
	transition: all var(--transition-fast);
}
.form-control:focus {
	outline: none;
	border-color: var(--color-brand-blue);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Modals */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(15, 23, 42, 0.4);
	backdrop-filter: blur(4px);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: fadeIn 0.2s ease-out;
}

.modal-content {
	background-color: var(--color-card-bg);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-xl);
	width: 100%;
	max-width: 600px;
	padding: 32px;
	position: relative;
	animation: slideUp 0.3s var(--transition-slow);
}

.modal-close {
	position: absolute;
	right: 20px;
	top: 20px;
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 24px;
	color: var(--color-text-secondary);
}

/* Keyframe Animations */
@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

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

@keyframes bounceIn {
	0% { transform: scale(0.3); opacity: 0; }
	50% { transform: scale(1.05); }
	70% { transform: scale(0.9); }
	100% { transform: scale(1); opacity: 1; }
}

@keyframes floatReward {
	0% { transform: translateY(0px) rotate(0deg); }
	50% { transform: translateY(-15px) rotate(5deg); }
	100% { transform: translateY(0px) rotate(0deg); }
}

.animate-bounce {
	animation: bounceIn 0.5s var(--transition-slow);
}

.animate-float {
	animation: floatReward 4s ease-in-out infinite;
}

/* Accessibility classes */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.high-contrast-focus:focus-visible {
	outline: 4px solid var(--color-brand-blue);
	outline-offset: 4px;
}
