/*================================================================================
	iLearn shared UI — typography, spacing, light/dark theme
	Loaded from layouts/dashboard.blade.php on every authenticated page.
================================================================================*/

:root {
	--ilearn-font: "Montserrat", Helvetica, Arial, sans-serif;
	--ilearn-primary: #7367f0;
	--ilearn-space-xs: 0.25rem;
	--ilearn-space-sm: 0.5rem;
	--ilearn-space-md: 1rem;
	--ilearn-space-lg: 1.5rem;
	--ilearn-space-xl: 2rem;
	--ilearn-radius: 0.428rem;
	--ilearn-bg: #f8f8f8;
	--ilearn-card: #fff;
	--ilearn-text: #6e6b7b;
	--ilearn-heading: #5e5873;
	--ilearn-border: #ebe9f1;
	--ilearn-muted: #b9b9c3;
	--ilearn-table-stripe: #f3f2f7;
	--ilearn-input-bg: #fff;
	--ilearn-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
}

html.dark-layout,
body.dark-layout,
.dark-layout {
	--ilearn-bg: #161d31;
	--ilearn-card: #283046;
	--ilearn-text: #b4b7bd;
	--ilearn-heading: #d0d2d6;
	--ilearn-border: #3b4253;
	--ilearn-muted: #676d7d;
	--ilearn-table-stripe: #161d31;
	--ilearn-input-bg: #161d31;
	--ilearn-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.24);
}

/* -------------------------------------------------------------------------- */
/* Typography                                                                 */
/* -------------------------------------------------------------------------- */
html {
	scroll-behavior: smooth;
	font-size: 16px;
}

html,
body,
.main-menu,
.app-content,
.card,
.form-control,
.btn,
table,
.table,
.nav,
.dropdown-menu,
.select2-container,
.dataTables_wrapper {
	font-family: var(--ilearn-font);
}

body {
	font-size: 1rem;
	line-height: 1.45;
	letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--ilearn-font);
	font-weight: 600;
	color: var(--ilearn-heading);
	line-height: 1.4;
}

.app-content h1, .app-content h2 { margin-bottom: var(--ilearn-space-md); }
.app-content h3, .app-content h4 { margin-bottom: var(--ilearn-space-sm); }
.app-content h5, .app-content h6 { margin-bottom: var(--ilearn-space-xs); }

p { margin-bottom: var(--ilearn-space-md); }
label { font-weight: 500; margin-bottom: var(--ilearn-space-xs); }

.f-20 { font-size: 20px !important; }

/* -------------------------------------------------------------------------- */
/* Spacing                                                                    */
/* -------------------------------------------------------------------------- */
.app-content .card {
	margin-bottom: var(--ilearn-space-lg);
	border-radius: var(--ilearn-radius);
}

.app-content .card-body {
	padding: var(--ilearn-space-lg);
}

.app-content .card-header {
	padding: var(--ilearn-space-md) var(--ilearn-space-lg);
}

.content-wrapper.container-xxl,
.app-content > .container-xxl {
	padding-left: var(--ilearn-space-lg);
	padding-right: var(--ilearn-space-lg);
}

.table th,
.table td,
table.dataTable thead th,
table.dataTable tbody td {
	padding: 0.75rem 1rem;
	vertical-align: middle;
}

.form-group { margin-bottom: var(--ilearn-space-sm); }
.form-control,
.select2-container .select2-selection {
	min-height: 38px;
}

.alert {
	padding: 0.75rem 1rem !important;
	margin-bottom: var(--ilearn-space-md);
}

.alert-success,
.alert-danger {
	padding: 10px !important;
}

hr {
	margin: var(--ilearn-space-md) 0;
	border-color: var(--ilearn-border);
}

/* -------------------------------------------------------------------------- */
/* Shared utilities used across pages                                         */
/* -------------------------------------------------------------------------- */
.font-white { color: #fff !important; }
.collapse_header_background {
	background-color: var(--ilearn-primary);
	color: #fff !important;
}
.common_text_color { color: var(--ilearn-heading); }
.justify-content-start { text-align: left !important; }
.offcanvas-end { width: 350px; }
label .error,
.error { color: #ea5455; }

.btn-group-item.active {
	color: #fff;
}

.my-courses-card:after { background-image: url("../../app-assets/images/images/my-courses.png"); }
.Resourses-card:after { background-image: url("../../app-assets/images/images/courses.png"); }
.recent-bog-card:after { background-image: url("../../app-assets/images/images/recent.png"); }
.latest-blog-card:after { background-image: url("../../app-assets/images/images/last.png"); }
.health-well-card:after { background-image: url("../../app-assets/images/images/health.png"); }

.ilearn-empty-table {
	color: #5697d0;
	text-align: center;
}

.dataTables_wrapper {
	display: flex;
	flex-direction: column;
}

div.dataTables_wrapper .dataTables_info {
	padding: 0 5px 20px;
	color: var(--ilearn-text);
}

.dataTables_paginate,
.dataTables_paginate span {
	display: flex;
	justify-content: end;
	flex-wrap: wrap;
}

.paginate_button {
	position: relative;
	display: block;
	padding: .5rem .75rem;
	margin-left: -1px;
	line-height: 1.25;
}

.select2-container--classic .select2-selection--multiple .select2-selection__rendered li .select2-search__field,
.select2-container--default .select2-selection--multiple .select2-selection__rendered li .select2-search__field {
	margin-top: 10px;
}

.menu-item, .menu-header, .menu-divider, .menu-block {
	flex: auto !important;
}

table.dataTable tfoot th {
	border-top: none !important;
	border-bottom: none !important;
}

/* Loader */
.loader {
	position: fixed;
	z-index: 9999;
	height: 2em;
	width: 2em;
	margin: auto;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
}

.loader:before {
	content: '';
	display: block;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: radial-gradient(rgba(20, 20, 20, .8), rgba(0, 0, 0, .8));
}

.loader:not(:required) {
	font: 0/0 a;
	color: transparent;
	text-shadow: none;
	background-color: transparent;
	border: 0;
}

.loader:not(:required):after {
	content: '';
	display: block;
	font-size: 10px;
	width: 1em;
	height: 1em;
	margin-top: -0.5em;
	animation: ilearn-spinner 150ms infinite linear;
	border-radius: 0.5em;
	box-shadow: rgba(255,255,255, 0.75) 1.5em 0 0 0, rgba(255,255,255, 0.75) 1.1em 1.1em 0 0, rgba(255,255,255, 0.75) 0 1.5em 0 0, rgba(255,255,255, 0.75) -1.1em 1.1em 0 0, rgba(255,255,255, 0.75) -1.5em 0 0 0, rgba(255,255,255, 0.75) -1.1em -1.1em 0 0, rgba(255,255,255, 0.75) 0 -1.5em 0 0, rgba(255,255,255, 0.75) 1.1em -1.1em 0 0;
}

@keyframes ilearn-spinner {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

@media (max-width: 1201px) {
	.header-navbar.fixed-top,
	.header-navbar.floating-nav {
		left: 260px !important;
	}
}

@media (max-width: 1199px) {
	.header-navbar.fixed-top,
	.header-navbar.floating-nav {
		left: 0 !important;
	}
}

/* -------------------------------------------------------------------------- */
/* Dark theme — sidebar stays menu-light in markup; force dark tokens         */
/* -------------------------------------------------------------------------- */
body.dark-layout .main-menu.menu-light,
html.dark-layout .main-menu.menu-light {
	color: #d0d2d6;
	background: #283046;
}

body.dark-layout .main-menu.menu-light .navigation,
html.dark-layout .main-menu.menu-light .navigation {
	background: #283046;
}

body.dark-layout .main-menu.menu-light .navigation .navigation-header {
	color: #676d7d;
}

body.dark-layout .main-menu.menu-light .navigation li a {
	color: #d0d2d6;
}

body.dark-layout .main-menu.menu-light .navigation > li.open:not(.menu-item-closing) > a,
body.dark-layout .main-menu.menu-light .navigation > li.sidebar-group-active > a,
body.dark-layout .main-menu.menu-light .navigation > li ul .open > a,
body.dark-layout .main-menu.menu-light .navigation > li ul .sidebar-group-active > a {
	color: #d0d2d6;
	background: #161d31;
}

body.dark-layout .main-menu.menu-light .navigation > li .active {
	background: #161d31;
}

body.dark-layout .main-menu.menu-light .navigation > li ul li {
	color: #b4b7bd;
}

body.dark-layout .header-navbar.navbar-light {
	background-color: #283046;
}

body.dark-layout .header-navbar.navbar-light .navbar-nav .nav-link,
body.dark-layout .header-navbar.navbar-light h6,
body.dark-layout .header-navbar.navbar-light .user-status {
	color: #d0d2d6;
}

body.dark-layout .bg-white {
	background-color: var(--ilearn-card) !important;
	color: var(--ilearn-text);
}

body.dark-layout .text-dark,
body.dark-layout .common_text_color {
	color: var(--ilearn-heading) !important;
}

body.dark-layout [style*="background-color: #fff"],
body.dark-layout [style*="background-color:#fff"],
body.dark-layout [style*="background-color: #ffffff"],
body.dark-layout [style*="background: #fff"],
body.dark-layout [style*="background:#fff"] {
	background-color: var(--ilearn-card) !important;
}

body.dark-layout [style*="color: #000"],
body.dark-layout [style*="color:#000"],
body.dark-layout [style*="color: #5e5873"] {
	color: var(--ilearn-heading) !important;
}

body.dark-layout .table,
body.dark-layout table.dataTable,
body.dark-layout table.dataTable thead th,
body.dark-layout table.dataTable tbody td,
body.dark-layout table.dataTable.no-footer {
	background-color: var(--ilearn-card);
	color: var(--ilearn-text);
	border-color: var(--ilearn-border) !important;
}

body.dark-layout table.dataTable thead th,
body.dark-layout table.dataTable tfoot th {
	background-color: var(--ilearn-card) !important;
	color: var(--ilearn-heading) !important;
	border-bottom-color: var(--ilearn-border) !important;
}

body.dark-layout table.dataTable.stripe tbody tr.odd,
body.dark-layout table.dataTable.display tbody tr.odd,
body.dark-layout .table-striped tbody tr:nth-of-type(odd) {
	background-color: var(--ilearn-table-stripe);
}

body.dark-layout .form-control,
body.dark-layout .form-select,
body.dark-layout select.form-control,
body.dark-layout textarea.form-control,
body.dark-layout input.form-control {
	background-color: var(--ilearn-input-bg);
	color: var(--ilearn-heading);
	border-color: var(--ilearn-border);
}

body.dark-layout .form-control:focus {
	background-color: var(--ilearn-input-bg);
	color: var(--ilearn-heading);
	border-color: var(--ilearn-primary);
}

body.dark-layout .select2-container--default .select2-selection--single,
body.dark-layout .select2-container--default .select2-selection--multiple,
body.dark-layout .select2-dropdown,
body.dark-layout .select2-search--dropdown .select2-search__field {
	background-color: var(--ilearn-input-bg);
	color: var(--ilearn-heading);
	border-color: var(--ilearn-border);
}

body.dark-layout .select2-container--default .select2-selection--single .select2-selection__rendered,
body.dark-layout .select2-container--default .select2-results__option {
	color: var(--ilearn-heading);
}

body.dark-layout .select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: var(--ilearn-primary);
	color: #fff;
}

body.dark-layout .note-editor.note-frame,
body.dark-layout .note-editor.note-frame .note-editing-area .note-editable,
body.dark-layout .note-toolbar {
	background-color: var(--ilearn-card);
	color: var(--ilearn-text);
	border-color: var(--ilearn-border);
}

body.dark-layout .nav-tabs .nav-link {
	color: var(--ilearn-text);
}

body.dark-layout .nav-tabs .nav-link.active {
	background-color: var(--ilearn-card);
	color: var(--ilearn-heading);
	border-color: var(--ilearn-border);
}

body.dark-layout .list-group-item:not(.text_white),
body.dark-layout .offcanvas,
body.dark-layout .fc .fc-view-harness,
body.dark-layout .fc-theme-standard td,
body.dark-layout .fc-theme-standard th,
body.dark-layout .fc-scrollgrid {
	background-color: var(--ilearn-card);
	color: var(--ilearn-text);
	border-color: var(--ilearn-border);
}

body.dark-layout [style*="background-color:#f4f4f4"],
body.dark-layout [style*="background-color: #f4f4f4"],
body.dark-layout [style*="background:#f4f4f4"],
body.dark-layout [style*="background: #f4f4f4"] {
	background-color: var(--ilearn-bg) !important;
}

.app-content.content {
	background-color: transparent;
}

.blog-detail-wrapper .card,
.blog-list-wrapper .card {
	background-color: var(--ilearn-card);
	color: var(--ilearn-text);
}

.blog-detail-wrapper .card-title,
.blog-detail-wrapper .card-title a,
.blog-detail-wrapper .text-body-heading {
	color: var(--ilearn-heading);
}

.blog-detail-wrapper .list-group-item,
.card[style*="background-color"] .list-group-item {
	background-color: transparent !important;
	border-color: rgba(255, 255, 255, 0.18);
}

.text_white,
h1.text_white, h2.text_white, h3.text_white,
h4.text_white, h5.text_white, h6.text_white,
.card-title.text_white {
	color: #fff !important;
}

/* DataTables + Bootstrap pagination */
div.dataTables_wrapper .dataTables_paginate .paginate_button,
div.dataTables_wrapper .dataTables_paginate a.paginate_button {
	color: var(--ilearn-text) !important;
	background: var(--ilearn-card) !important;
	border: 1px solid var(--ilearn-border) !important;
	box-shadow: none !important;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
div.dataTables_wrapper .dataTables_paginate .paginate_button:focus,
div.dataTables_wrapper .dataTables_paginate a.paginate_button:hover {
	color: #fff !important;
	background: var(--ilearn-primary) !important;
	border-color: var(--ilearn-primary) !important;
	box-shadow: none !important;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button.current,
div.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
div.dataTables_wrapper .dataTables_paginate a.paginate_button.current {
	color: #fff !important;
	background: var(--ilearn-primary) !important;
	border-color: var(--ilearn-primary) !important;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
	color: var(--ilearn-muted) !important;
	background: var(--ilearn-card) !important;
	border-color: var(--ilearn-border) !important;
}

div.dataTables_wrapper .dataTables_length,
div.dataTables_wrapper .dataTables_filter,
div.dataTables_wrapper .dataTables_filter input,
div.dataTables_wrapper .dataTables_info {
	color: var(--ilearn-text) !important;
}

div.dataTables_wrapper .dataTables_filter input,
div.dataTables_wrapper .dataTables_length select {
	background-color: var(--ilearn-input-bg);
	color: var(--ilearn-heading);
	border: 1px solid var(--ilearn-border);
}

.pagination .page-link {
	background-color: var(--ilearn-card);
	border-color: var(--ilearn-border);
	color: var(--ilearn-text);
}

.pagination .page-item.active .page-link {
	background-color: var(--ilearn-primary);
	border-color: var(--ilearn-primary);
	color: #fff;
}

.pagination .page-item.disabled .page-link {
	background-color: var(--ilearn-card);
	border-color: var(--ilearn-border);
	color: var(--ilearn-muted);
}

body.dark-layout .swiper-card-advance-bg,
body.dark-layout .swiper-container {
	background-color: var(--ilearn-card);
	color: var(--ilearn-text);
}

body.dark-layout .modal-header,
body.dark-layout .modal-footer,
body.dark-layout .modal-body {
	border-color: var(--ilearn-border);
	background-color: var(--ilearn-card);
	color: var(--ilearn-text);
}

body.dark-layout .pagination .page-link {
	background-color: var(--ilearn-card);
	border-color: var(--ilearn-border);
	color: var(--ilearn-text);
}

body.dark-layout .input-group-text {
	background-color: var(--ilearn-input-bg);
	border-color: var(--ilearn-border);
	color: var(--ilearn-text);
}

body.dark-layout .dropdown-item {
	color: var(--ilearn-text);
}

body.dark-layout .dropdown-item:hover,
body.dark-layout .dropdown-item:focus {
	background-color: #161d31;
	color: var(--ilearn-heading);
}

body.dark-layout .border,
body.dark-layout .border-top,
body.dark-layout .border-bottom,
body.dark-layout hr {
	border-color: var(--ilearn-border) !important;
}

body:not(.dark-layout) table.dataTable {
	background-color: transparent;
	color: var(--ilearn-text);
}

/* -------------------------------------------------------------------------- */
/* Header notifications                                                       */
/* -------------------------------------------------------------------------- */
.ilearn-notification-bell {
	position: relative;
}

.ilearn-notification-panel {
	display: none;
	position: absolute;
	top: calc(100% + 0.65rem);
	right: 0;
	width: 22rem;
	max-width: calc(100vw - 1.5rem);
	z-index: 1050;
	background: var(--ilearn-card);
	border: 1px solid var(--ilearn-border);
	border-radius: var(--ilearn-radius);
	box-shadow: var(--ilearn-shadow);
	overflow: hidden;
}

.ilearn-notification-bell.is-open .ilearn-notification-panel {
	display: block;
}

.ilearn-notification-panel__header,
.ilearn-notification-panel__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1.15rem;
}

.ilearn-notification-panel__header {
	border-bottom: 1px solid var(--ilearn-border);
}

.ilearn-notification-panel__footer {
	border-top: 1px solid var(--ilearn-border);
	display: block;
}

.ilearn-notification-panel__list {
	max-height: 22rem;
	overflow-y: auto;
}

.ilearn-notification-row {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	width: 100%;
	margin: 0;
	padding: 0.95rem 1.15rem;
	border: 0;
	background: transparent;
	text-align: left;
	color: inherit;
	cursor: pointer;
}

.ilearn-notification-row + .ilearn-notification-row {
	border-top: 1px solid var(--ilearn-border);
}

button.ilearn-notification-row:hover {
	background: var(--ilearn-table-stripe);
}

.ilearn-notification-row__body {
	min-width: 0;
	flex: 1;
}

.ilearn-notification-row__title {
	margin: 0 0 0.2rem;
	font-weight: 600;
	color: var(--ilearn-heading);
	line-height: 1.3;
}

.ilearn-notification-row__text,
.ilearn-notification-row__meta {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--ilearn-muted);
	white-space: normal;
}

.ilearn-notification-row__meta {
	margin-top: 0.3rem;
}

.ilearn-notification-empty {
	padding: 2rem 1.15rem;
	text-align: center;
}

.ilearn-notification-row.ilearn-notification-dismissing,
.ilearn-notification-bell.ilearn-notification-bell--dismissing {
	opacity: 0;
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
	overflow: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, max-height 0.25s ease, padding 0.25s ease;
}

/* -------------------------------------------------------------------------- */
/* Login as / Back to Admin                                                   */
/* -------------------------------------------------------------------------- */
.ilearn-impersonation-leave-form {
	display: inline-flex;
	align-items: center;
	margin: 0;
}

.ilearn-impersonation-leave-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	white-space: nowrap;
	font-weight: 600;
	line-height: 1.2;
	padding: 0.4rem 0.85rem;
}

.ilearn-impersonation-leave-btn i {
	width: auto;
	height: auto;
	font-size: 0.8rem;
	margin: 0;
}

.main-menu .navigation > li.ilearn-impersonation-leave > form {
	margin: 0;
}

.main-menu .navigation > li.ilearn-impersonation-leave > form > button {
	display: flex;
	align-items: center;
	width: 100%;
	border: 0;
	background: transparent;
	padding: 10px 15px;
	color: inherit;
	text-align: left;
	font: inherit;
	cursor: pointer;
	border-radius: 6px;
}

.main-menu .navigation > li.ilearn-impersonation-leave > form > button:hover,
.main-menu .navigation > li.ilearn-impersonation-leave > form > button:focus {
	background: rgba(115, 103, 240, 0.12);
	color: var(--ilearn-heading);
}

.main-menu .navigation > li.ilearn-impersonation-leave > form > button svg,
.main-menu .navigation > li.ilearn-impersonation-leave > form > button i {
	height: 20px;
	width: 20px;
	font-size: 1.45rem;
	margin-right: 1.1rem;
	flex-shrink: 0;
}

body.dark-layout .main-menu .navigation > li.ilearn-impersonation-leave > form > button:hover,
body.dark-layout .main-menu .navigation > li.ilearn-impersonation-leave > form > button:focus {
	background: rgba(115, 103, 240, 0.2);
}

.dropdown-menu .dropdown-item.w-100 {
	width: 100%;
}

.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navigation > li.ilearn-impersonation-leave .menu-title {
	display: none;
}

.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navigation > li.ilearn-impersonation-leave > form > button {
	justify-content: center;
}

.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navigation > li.ilearn-impersonation-leave > form > button svg,
.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu:not(.expanded) .navigation > li.ilearn-impersonation-leave > form > button i {
	margin-right: 0;
}

