:root {
	color-scheme: light;
	--clr-bg: #f5f6fb;
	--clr-bg-muted: #edf1ff;
	--clr-surface: #ffffff;
	--clr-surface-alt: #f7f9ff;
	--clr-border: rgba(15, 23, 42, 0.08);
	--clr-shadow: 0 15px 45px rgba(15, 23, 42, 0.08);
	--clr-primary: #6759ff;
	--clr-primary-dark: #4b32c3;
	--clr-accent: #14b8a6;
	--clr-danger: #f87171;
	--clr-muted: #6c728b;
	--radius-lg: 18px;
	--radius-md: 12px;
	--radius-sm: 8px;
	font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }

.app-body {
	margin: 0;
	background: radial-gradient(circle at 5% 10%, #e9e5ff 0%, #f5f6fb 55%, #edf1ff 100%);
	color: #0f172a;
	min-height: 100vh;
	font-family: var(--font-family, 'Inter', system-ui, sans-serif);
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	background: #111827;
	color: #fff;
	padding: 0.6rem 1rem;
	z-index: 1000;
	border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.skip-link:focus {
	left: 0;
}

.app-navbar {
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(12px);
}

.brand {
	color: #0f172a;
}

.brand:hover { text-decoration: none; }

.brand-glyph {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--clr-primary), #8f6fff);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 1.25rem;
}

.brand-text {
	font-weight: 600;
	font-size: 1.1rem;
	letter-spacing: 0.04em;
	text-transform: lowercase;
}

.main-nav .nav-link {
	border-radius: var(--radius-sm);
	font-weight: 500;
	color: #475569;
}

.main-nav .nav-link.active,
.main-nav .nav-link:hover {
	background: rgba(103, 89, 255, 0.12);
	color: var(--clr-primary);
}

.app-main {
	background: transparent;
}

.page-heading {
	border-bottom: 1px solid rgba(15, 23, 42, 0.05);
	padding-bottom: 1.25rem;
}

.eyebrow {
	font-size: 0.75rem;
	letter-spacing: 0.18em;
	color: #94a3b8;
}

.app-card,
.card.glass,
.card.shadow-soft {
	border-radius: var(--radius-lg);
	border: 1px solid var(--clr-border);
	box-shadow: var(--clr-shadow);
	background: var(--clr-surface);
}

.hero-panel {
	background: linear-gradient(120deg, #111936, #352677, #6539ff);
	color: #f8fafc;
	overflow: hidden;
	position: relative;
}

.hero-panel::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2), transparent 55%);
	pointer-events: none;
}

.hero-panel > * { position: relative; z-index: 1; }

.feature-card {
	border: 1px solid rgba(103, 89, 255, 0.2);
	border-radius: var(--radius-lg);
	background: var(--clr-surface);
	box-shadow: var(--clr-shadow);
	height: 100%;
}

.feature-card h5 { font-weight: 600; }

.feature-card p { font-size: 0.9rem; color: var(--clr-muted); }

.metric-card {
	background: rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-md);
	padding: 1rem 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.15);
}

.metric-card strong { font-size: 1.75rem; display: block; }

.pill-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.95rem;
	border-radius: 999px;
	font-size: 0.8rem;
	text-decoration: none;
	background: rgba(255, 255, 255, 0.15);
	color: #e0e7ff;
}

.pill-link:hover { color: #fff; }

.app-card + .app-card { margin-top: 1.25rem; }

.stat-pill {
	border-radius: 999px;
	padding: 0.4rem 1rem;
	background: var(--clr-bg-muted);
	font-size: 0.85rem;
	color: var(--clr-primary);
	font-weight: 600;
}

.data-table {
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--clr-border);
	box-shadow: var(--clr-shadow);
}

.data-table table { margin: 0; }

.data-table thead { background: var(--clr-bg-muted); }

.data-table th {
	text-transform: uppercase;
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	color: #475569;
}

.badge-soft {
	border-radius: 999px;
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	background: rgba(103, 89, 255, 0.15);
	color: var(--clr-primary);
}

.badge-soft.success { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.badge-soft.muted { background: rgba(15, 23, 42, 0.08); color: #475569; }

.badge-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
	font-size: 0.82rem;
	border-radius: 999px;
	padding: 0.35rem 0.9rem;
	background: var(--clr-bg-muted);
	color: #0f172a;
}

.badge-chip i { font-size: 0.95rem; }
.badge-chip-student { background: rgba(59, 130, 246, 0.18); color: #1d4ed8; }
.badge-chip-teacher { background: rgba(34, 197, 94, 0.18); color: #047857; }
.badge-chip-security { background: rgba(234, 179, 8, 0.2); color: #92400e; }

.muted { color: var(--clr-muted); }

.consent-note {
	background: rgba(103, 89, 255, 0.12);
	color: #0f172a;
	border-radius: var(--radius-md);
	padding: 0.75rem 1rem;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-weight: 500;
}

.app-footer {
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
}

.btn-primary,
.btn-success,
.btn-warning,
.btn-outline-primary {
	border-radius: var(--radius-sm);
	font-weight: 600;
}

.btn-primary {
	background: linear-gradient(120deg, var(--clr-primary), var(--clr-primary-dark));
	border: none;
	box-shadow: 0 15px 25px rgba(103, 89, 255, 0.35);
}

.btn-primary:focus-visible { box-shadow: 0 0 0 0.25rem rgba(103, 89, 255, 0.25); }

.btn-outline-primary {
	border-color: rgba(103, 89, 255, 0.5);
	color: var(--clr-primary);
}

.btn-outline-primary:hover {
	background: rgba(103, 89, 255, 0.1);
}

.table-responsive::-webkit-scrollbar { height: 6px; }
.table-responsive::-webkit-scrollbar-thumb { background: rgba(71, 85, 105, 0.4); border-radius: 999px; }

.auth-body {
	background: radial-gradient(circle at 20% 20%, #f6f8ff 0%, #eef1fa 45%, #e8ecf7 75%);
	color: #0f172a;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.auth-shell {
	flex: 1;
	display: flex;
}

.auth-illustration {
	background: url('https://images.unsplash.com/photo-1523580846011-d3a5bc25702b?auto=format&fit=crop&w=900&q=80') center/cover;
	position: relative;
	min-height: 35vh;
}

@media (min-width: 992px) {
	.auth-illustration {
		flex: 0 0 45%;
		min-height: auto;
	}
}

.auth-illustration::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, rgba(14, 9, 40, 0.44), rgba(69, 43, 157, 0.65));
}

.auth-illustration > * { position: relative; z-index: 1; }

.auth-panel {
	background: rgba(255, 255, 255, 0.98);
}

@media (min-width: 992px) {
	.auth-panel {
		flex: 0 0 55%;
	}
}

.auth-panel .card,
.auth-panel form {
	background: transparent;
}

.auth-footer {
	background: rgb(42, 32, 69);
	color: rgba(255, 255, 255, 0.9);
	border-color: rgba(255, 255, 255, 0.1) !important;
}

.auth-footer a {
	color: rgba(255, 255, 255, 0.8);
}

.auth-footer a:hover {
	color: rgba(255, 255, 255, 1);
}

.auth-logo-dot {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: linear-gradient(120deg, #22d3ee, #6366f1);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.letter-spaced { letter-spacing: 0.25em; }

.form-control,
.form-select {
	border-radius: var(--radius-sm);
	border-color: rgba(71, 85, 105, 0.25);
	padding: 0.75rem 0.95rem;
}

.form-control:focus,
.form-select:focus {
	border-color: var(--clr-primary);
	box-shadow: 0 0 0 0.2rem rgba(103, 89, 255, 0.2);
}

.alert {
	border-radius: var(--radius-md);
}

.sr-live,
.sr-live-assertive { clip: rect(0 0 0 0); }

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 991px) {
	.app-navbar .brand-glyph { width: 38px; height: 38px; }
	.app-navbar .brand-text { font-size: 1rem; }
	.page-title { font-size: 1.35rem; }
	.data-table { border-radius: var(--radius-md); }
}
