:root {
	--ashi-blue: #4756c4;
	--ashi-blue-dark: #363f9c;
	--ashi-blue-light: #eef0fc;
	--ashi-blue-2: #5f6dd6;
	--ashi-purple: #8e2de2;
	--ashi-green: #22a45d;
	--ashi-green-dark: #1b8a4d;
	--ashi-orange: #fd7e14;
	--ashi-red: #e0364a;
	--ashi-ink: #232946;
	--ashi-text-muted: #8a8fa3;
	--ashi-border: #ebedf5;
	--ashi-bg: #f3f5fb;
	--ashi-shadow-sm: 0 1px 3px rgba(35, 41, 70, 0.06), 0 1px 2px rgba(35, 41, 70, 0.05);
	--ashi-shadow-md: 0 8px 24px rgba(35, 41, 70, 0.08);
	--ashi-shadow-lg: 0 24px 60px rgba(35, 41, 70, 0.18);
	--ashi-radius: 14px;
}

* {
	scrollbar-width: thin;
	scrollbar-color: #c7cbe6 transparent;
}

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-thumb {
	background: #c7cbe6;
	border-radius: 8px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

body {
	background-color: var(--ashi-bg);
	font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
	color: var(--ashi-ink);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Poppins', 'Inter', sans-serif;
	color: var(--ashi-ink);
}

a {
	color: var(--ashi-blue);
}

/* ---------------- Auth pages (login / register) ---------------- */

.auth-wrapper {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 15px;
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #3d4ab8 0%, #6a3fd6 55%, #9142dc 100%);
}

.auth-wrapper::before,
.auth-wrapper::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	pointer-events: none;
}

.auth-wrapper::before {
	width: 520px;
	height: 520px;
	top: -220px;
	left: -160px;
}

.auth-wrapper::after {
	width: 420px;
	height: 420px;
	bottom: -200px;
	right: -140px;
	background: rgba(255, 255, 255, 0.06);
}

.auth-card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 460px;
	background: #fff;
	border-radius: 20px;
	padding: 44px 40px;
	box-shadow: var(--ashi-shadow-lg);
	animation: ashi-rise 0.45s ease;
}

.auth-card.auth-card-wide {
	max-width: 640px;
}

@keyframes ashi-rise {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 22px;
}

.auth-logo .seal {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--ashi-blue-light);
	box-shadow: 0 6px 18px rgba(71, 86, 196, 0.25);
	object-fit: contain;
	padding: 5px;
	margin-bottom: 12px;
}

.auth-logo .school-name {
	font-family: 'Poppins', sans-serif;
	font-size: 12.5px;
	text-align: center;
	color: var(--ashi-text-muted);
	font-weight: 700;
	letter-spacing: 1px;
}

.auth-card h4 {
	text-align: center;
	font-weight: 700;
	color: var(--ashi-ink);
	margin-bottom: 26px;
}

.form-control {
	border-radius: 10px;
	border: 1px solid #e2e4f1;
	padding: 10px 14px;
	height: auto;
	background-color: #fbfbfe;
}

.form-control:focus {
	border-color: var(--ashi-blue-2);
	box-shadow: 0 0 0 3px rgba(71, 86, 196, 0.15);
	background-color: #fff;
}

.form-control-lg {
	padding: 12px 16px;
	font-size: 15px;
}

.input-group-text {
	border-radius: 10px 0 0 10px;
	background-color: #f0f1f9;
	border-color: #e2e4f1;
	color: var(--ashi-blue);
}

label {
	font-weight: 600;
	font-size: 13.5px;
	color: #565b78;
}

.btn {
	border-radius: 10px;
	font-weight: 600;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:active {
	transform: translateY(1px);
}

.btn-ashi {
	background: linear-gradient(135deg, var(--ashi-green) 0%, var(--ashi-green-dark) 100%);
	border-color: var(--ashi-green-dark);
	color: #fff;
	font-weight: 700;
	border-radius: 24px;
	padding: 11px 18px;
	box-shadow: 0 8px 18px rgba(34, 164, 93, 0.3);
}

.btn-ashi:hover {
	background: linear-gradient(135deg, #279c5b 0%, #187a44 100%);
	color: #fff;
	box-shadow: 0 10px 22px rgba(34, 164, 93, 0.38);
	transform: translateY(-1px);
}

.btn-lg.btn-ashi {
	padding: 13px 18px;
}

.auth-links {
	text-align: center;
	margin-top: 18px;
	font-size: 14px;
	color: var(--ashi-text-muted);
}

.auth-links a {
	color: var(--ashi-blue);
	text-decoration: none;
	font-weight: 600;
}

.auth-links a:hover {
	text-decoration: underline;
}

.role-switch {
	display: flex;
	gap: 10px;
	margin-top: 12px;
}

.role-switch .btn {
	flex: 1;
	border-radius: 24px;
	font-weight: 600;
}

/* ---------------- App shell (sidebar layout) ---------------- */

.app-wrapper {
	display: flex;
	min-height: 100vh;
}

.app-sidebar {
	width: 250px;
	background: linear-gradient(195deg, #4956c9 0%, #3a4396 100%);
	color: #fff;
	flex-shrink: 0;
	min-height: 100vh;
	position: sticky;
	top: 0;
	align-self: flex-start;
	transition: margin-left 0.2s ease;
	box-shadow: var(--ashi-shadow-md);
	display: flex;
	flex-direction: column;
	padding-bottom: 16px;
}

.app-sidebar .brand {
	padding: 20px;
	font-family: 'Poppins', sans-serif;
	font-weight: 700;
	font-size: 18px;
	letter-spacing: 0.5px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.app-sidebar .brand img {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: contain;
	background: #fff;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.app-sidebar .nav-heading {
	padding: 16px 20px 6px;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	color: rgba(255, 255, 255, 0.5);
}

.app-sidebar .nav-link {
	color: rgba(255, 255, 255, 0.85);
	padding: 11px 20px;
	margin: 2px 10px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14.5px;
	font-weight: 500;
	width: calc(100% - 20px);
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.app-sidebar .nav-link i {
	width: 18px;
	text-align: center;
	font-size: 15px;
}

.app-sidebar .nav-link:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.app-sidebar .nav-link.active {
	background: #fff;
	color: var(--ashi-blue-dark);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.app-sidebar .nav-link.sub {
	padding-left: 40px;
	font-size: 13.5px;
}

.app-main {
	flex: 1;
	min-width: 0;
}

.app-topbar {
	background: #fff;
	padding: 12px 24px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	border-bottom: 1px solid var(--ashi-border);
	box-shadow: var(--ashi-shadow-sm);
	position: sticky;
	top: 0;
	z-index: 10;
}

.app-content {
	padding: 26px;
}

.stat-card {
	background: #fff;
	border-radius: var(--ashi-radius);
	padding: 22px;
	display: flex;
	align-items: center;
	gap: 16px;
	box-shadow: var(--ashi-shadow-sm);
	height: 100%;
	border: 1px solid var(--ashi-border);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--ashi-shadow-md);
}

.stat-card .icon {
	width: 54px;
	height: 54px;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	color: #fff;
	flex-shrink: 0;
}

.stat-card .icon.blue { background: linear-gradient(135deg, var(--ashi-blue-2), var(--ashi-blue-dark)); }
.stat-card .icon.purple { background: linear-gradient(135deg, #a855f7, var(--ashi-purple)); }
.stat-card .icon.green { background: linear-gradient(135deg, #34c37c, var(--ashi-green-dark)); }
.stat-card .icon.orange { background: linear-gradient(135deg, #ffa94d, var(--ashi-orange)); }

.stat-card .value {
	font-family: 'Poppins', sans-serif;
	font-size: 27px;
	font-weight: 700;
	color: var(--ashi-ink);
	line-height: 1.1;
}

.stat-card .label {
	color: var(--ashi-text-muted);
	font-size: 13px;
	font-weight: 500;
}

.card-panel {
	background: #fff;
	border-radius: var(--ashi-radius);
	padding: 24px;
	box-shadow: var(--ashi-shadow-sm);
	border: 1px solid var(--ashi-border);
	margin-bottom: 24px;
}

.card-panel h5 {
	font-weight: 700;
	margin-bottom: 18px;
}

.avatar-circle {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--ashi-blue-2), var(--ashi-blue-dark));
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
}

.announcement-card {
	border: 1px solid var(--ashi-border);
	border-radius: var(--ashi-radius);
	overflow: hidden;
	margin-bottom: 18px;
	background: #fff;
	box-shadow: var(--ashi-shadow-sm);
	transition: box-shadow 0.18s ease;
}

.announcement-card:hover {
	box-shadow: var(--ashi-shadow-md);
}

.announcement-card img {
	width: 100%;
	max-height: 320px;
	object-fit: cover;
}

.announcement-card .body {
	padding: 18px;
}

.announcement-card .meta {
	color: var(--ashi-text-muted);
	font-size: 12.5px;
}

.lesson-card {
	background: #fff;
	border-radius: var(--ashi-radius);
	box-shadow: var(--ashi-shadow-sm);
	border: 1px solid var(--ashi-border);
	overflow: hidden;
	margin-bottom: 20px;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lesson-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--ashi-shadow-md);
}

.lesson-card .thumb {
	height: 150px;
	background-size: cover;
	background-position: center;
	background: linear-gradient(135deg, #363f9c, #6a3fd6);
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.7);
	font-size: 13px;
	font-weight: 500;
}

.lesson-card .body {
	padding: 18px;
}

.quiz-option {
	display: block;
	border: 1px solid #e2e4f1;
	border-radius: 10px;
	padding: 11px 16px;
	margin-bottom: 8px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.quiz-option:hover {
	background: var(--ashi-blue-light);
	border-color: var(--ashi-blue-2);
}

.table-actions .btn {
	margin-right: 4px;
	margin-bottom: 4px;
}

/* ---------------- Bootstrap component refinements ---------------- */

.card, .modal-content {
	border-radius: var(--ashi-radius);
	border: 1px solid var(--ashi-border);
}

.modal-content {
	box-shadow: var(--ashi-shadow-lg);
	overflow: hidden;
}

.modal-header {
	background: var(--ashi-blue-light);
	border-bottom: 1px solid var(--ashi-border);
}

.modal-header .modal-title {
	font-weight: 700;
	color: var(--ashi-ink);
}

.table {
	color: var(--ashi-ink);
}

.table thead th {
	background-color: #f7f8fd;
	color: #565b78;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 700;
	border-bottom: 2px solid var(--ashi-border);
	white-space: nowrap;
}

.table td, .table th {
	border-color: var(--ashi-border);
	vertical-align: middle;
}

.table-hover tbody tr:hover {
	background-color: var(--ashi-blue-light);
}

.badge {
	font-weight: 600;
	padding: 5px 10px;
	border-radius: 20px;
	font-size: 11.5px;
	letter-spacing: 0.3px;
}

.badge-success { background-color: #e4f8ed; color: var(--ashi-green-dark); }
.badge-warning { background-color: #fff4e0; color: #b56a00; }
.badge-danger { background-color: #fde8ea; color: var(--ashi-red); }

.alert {
	border-radius: 12px;
	border: none;
	font-size: 14px;
}

.alert-success { background-color: #e4f8ed; color: var(--ashi-green-dark); }
.alert-danger { background-color: #fde8ea; color: var(--ashi-red); }

.dropdown-menu {
	border-radius: 12px;
	border: 1px solid var(--ashi-border);
	box-shadow: var(--ashi-shadow-md);
	padding: 8px;
}

.dropdown-item {
	border-radius: 8px;
	font-size: 14px;
	padding: 9px 12px;
}

.dropdown-item:hover {
	background-color: var(--ashi-blue-light);
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
	border-radius: 8px;
	border: 1px solid #e2e4f1;
	padding: 4px 8px;
}

.dt-buttons .btn {
	border-radius: 8px !important;
	margin-right: 6px;
}

.page-link {
	border-radius: 8px !important;
	margin: 0 2px;
	color: var(--ashi-blue);
	border-color: var(--ashi-border);
}

.page-item.active .page-link {
	background-color: var(--ashi-blue);
	border-color: var(--ashi-blue);
}

@media (max-width: 768px) {
	.app-sidebar {
		position: fixed;
		z-index: 1050;
		margin-left: -250px;
		height: 100vh;
	}
	.app-sidebar.show {
		margin-left: 0;
	}
	.app-main {
		width: 100%;
	}
}
