/* Eduvos Premium Design System */
:root {
	/* HSL Color Palette for dynamic adjustments */
	--hue-brand: 340;
	/* #7a193d is roughly hsl(338, 66%, 29%) -> tweaked for vibrancy */
	--sat-brand: 75%;
	--lig-brand: 35%;

	--brand: hsl(var(--hue-brand), var(--sat-brand), var(--lig-brand));
	--brand-light: hsl(var(--hue-brand), var(--sat-brand), 45%);
	--brand-dark: hsl(var(--hue-brand), var(--sat-brand), 20%);
	--brand-glass: hsla(var(--hue-brand), var(--sat-brand), 35%, 0.1);

	--bg-page: #f8fafc;
	--bg-card: #ffffff;
	--bg-glass: rgba(255, 255, 255, 0.7);

	--text-main: #1e293b;
	--text-muted: #64748b;
	--text-light: #94a3b8;

	--border-light: #e2e8f0;
	--border-focus: var(--brand-light);

	--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

	--radius-sm: 0.375rem;
	--radius-md: 0.5rem;
	--radius-lg: 1rem;
	--radius-xl: 1.5rem;
}

/* Base Reset & Typography */
* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--text-main);
	background-color: var(--bg-page);
	/* Subtle mesh gradient background */
	background-image:
		radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 0) 0, transparent 50%),
		radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 0) 0, transparent 50%),
		radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 0) 0, transparent 50%);
}

a {
	color: var(--brand);
	text-decoration: none;
	transition: color 0.2s;
}

a:hover {
	color: var(--brand-light);
	text-decoration: underline;
}

/* Layout Architecture */
.header {
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-light);
	position: sticky;
	top: 0;
	z-index: 50;
	padding: 0.75rem 1rem;
}

.header-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.brand {
	font-weight: 800;
	font-size: 1.25rem;
	background: linear-gradient(135deg, var(--brand), var(--brand-light));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	letter-spacing: -0.025em;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.brand a {
	text-decoration: none;
}

.search-container {
	flex: 1;
	max-width: 400px;
	position: relative;
}

.search-input {
	width: 100%;
	padding: 0.5rem 1rem 0.5rem 2.5rem;
	border-radius: 999px;
	border: 1px solid var(--border-light);
	background: var(--bg-card);
	transition: all 0.2s;
	font-size: 0.95rem;
}

.search-input:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-glass);
}

.search-icon {
	position: absolute;
	left: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-muted);
	width: 1rem;
	height: 1rem;
	pointer-events: none;
}

.layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 2rem;
	max-width: 1280px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.layout.unauth {
	grid-template-columns: 1fr;
	max-width: 600px;
}

@media (max-width: 900px) {
	.layout {
		grid-template-columns: 1fr;
	}

	.sidebar {
		display: none;
	}

	/* Mobile sidebar uses drawer/offcanvas pattern usually */
}

/* Glass Cards */
.card {
	background: var(--bg-card);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	box-shadow: var(--shadow-sm);
	transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
	/* Subtle lift effect */
	/* transform: translateY(-2px); */
	/* can be annoying on layout, use sparingly */
	box-shadow: var(--shadow-md);
}

.section-title {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--text-main);
	margin: 0 0 1rem 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* Sidebar Navigation */
.side-nav {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.side-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem 1rem;
	border-radius: var(--radius-md);
	color: var(--text-muted);
	font-weight: 500;
	transition: all 0.2s;
}

.side-link:hover {
	background: var(--bg-page);
	color: var(--brand);
}

.side-link.active {
	background: var(--brand-glass);
	color: var(--brand);
	font-weight: 600;
}

/* Buttons & Chips */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border-radius: var(--radius-md);
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	border: 1px solid transparent;
	text-decoration: none;
}

.btn-primary {
	background: var(--brand);
	color: #fff;
}

.btn-primary:hover {
	background: var(--brand-dark);
	text-decoration: none;
}

.btn-secondary {
	background: white;
	border: 1px solid var(--border-light);
	color: var(--text-main);
}

.btn-secondary:hover {
	background: var(--bg-page);
	border-color: var(--text-muted);
	text-decoration: none;
}

.tab {
	background: var(--bg-page);
	border: 1px solid var(--border-light);
	padding: 0.35rem 0.85rem;
	border-radius: 999px;
	font-size: 0.9rem;
	color: var(--text-muted);
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.tab:hover {
	border-color: var(--brand-light);
	color: var(--brand);
	text-decoration: none;
}

/* Data Tables (Responsive) */
.table-container {
	overflow-x: auto;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-light);
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.table th {
	background: var(--bg-page);
	color: var(--text-muted);
	font-weight: 600;
	text-align: left;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--border-light);
}

.table td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--border-light);
}

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

/* Dashboard Grid */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
}

.tile {
	background: var(--bg-card);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-md);
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	transition: all 0.2s;
	text-decoration: none;
}

.tile:hover {
	border-color: var(--brand-light);
	box-shadow: 0 4px 12px var(--brand-glass);
	transform: translateY(-2px);
	text-decoration: none;
}

.tile-icon {
	font-size: 1.5rem;
	width: 2.5rem;
	height: 2.5rem;
	display: grid;
	place-items: center;
	background: var(--bg-page);
	border-radius: 50%;
	margin-bottom: 0.25rem;
}

.tile-title {
	font-weight: 600;
	color: var(--text-main);
	font-size: 1rem;
}

/* Utilities */
.vstack {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hstack {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.hstack.between {
	justify-content: space-between;
}

.muted {
	color: var(--text-muted);
}

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

.mt-2 {
	margin-top: 0.5rem;
}

.mt-3 {
	margin-top: 0.75rem;
}

.text-sm {
	font-size: 0.85rem;
}

.d-none {
	display: none !important;
}

/* Form Elements */
.input {
	width: 100%;
	padding: 0.6rem;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-md);
	transition: 0.2s;
}

.input:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-glass);
}

/* Badge System */
.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.025em;
	text-transform: uppercase;
}

.badge.info {
	background: #e0f2fe;
	color: #0369a1;
}

.badge.warning {
	background: #ffedd5;
	color: #c2410c;
}

.badge.danger {
	background: #fee2e2;
	color: #b91c1c;
}

.badge.success {
	background: #dcfce7;
	color: #15803d;
}

/* Responsive Adjustments */
/* Responsive Adjustments */
@media (max-width: 768px) {
	.header-inner {
		flex-wrap: wrap;
	}

	.search-container {
		order: 3;
		width: 100%;
		max-width: none;
		margin-top: 0.5rem;
	}

	/* Mobile Menu Button */
	.mobile-menu-btn {
		display: block;
	}

	/* Assume blocked only on mobile */

	/* Card Table pattern for Transcript */
	.table-responsive-cards thead {
		display: none;
	}

	.table-responsive-cards tr {
		display: block;
		margin-bottom: 1rem;
		border: 1px solid var(--border-light);
		border-radius: var(--radius-md);
		background: var(--bg-card);
	}

	.table-responsive-cards td {
		display: flex;
		justify-content: space-between;
		border-bottom: 1px solid var(--border-light);
		padding: 0.75rem;
		text-align: right;
	}

	.table-responsive-cards td::before {
		content: attr(data-label);
		font-weight: 600;
		color: var(--text-muted);
		text-align: left;
	}

	.table-responsive-cards td:last-child {
		border-bottom: none;
	}

	.footer {
		padding: 1.5rem 1rem;
	}
}

.mobile-menu-btn {
	display: none;
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: var(--text-main);
}

.footer {
	border-top: 1px solid var(--border-light);
	background: var(--bg-card);
	padding: 1.5rem 0;
	/* Vertical padding only, horizontal handled by inner */
	margin-top: auto;
	/* Push to bottom if flex container */
	color: var(--text-muted);
	font-size: 0.9rem;
}

.footer-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Centered as requested */
	gap: 0.5rem;
	padding: 0 1rem;
	/* Match layout padding */
}

.spacer {
	margin: 0 0.25rem;
	opacity: 0.5;
}

.textarea,
.select {
	width: 100%;
	padding: 0.6rem;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-md);
	transition: 0.2s;
	font-family: inherit;
	background: white;
}

.textarea:focus,
.select:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-glass);
}

.textarea {
	min-height: 120px;
	resize: vertical;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.form-label {
	font-weight: 500;
	font-size: 0.9rem;
	color: var(--text-main);
}