:root,
[data-theme="light"] {
  --bs-primary: #3c8dbc;
  --bs-primary-rgb: 60, 141, 188;
  --bs-link-color: #367fa9;
  --bs-link-color-rgb: 54, 127, 169;
  --bs-link-hover-color: #2c698e;
  --bs-link-hover-color-rgb: 44, 105, 142;
  --lte-primary: #3c8dbc;
  --sidebar: #3c8dbc;
  --sidebar-surface: #367fa9;
  --sidebar-text: #fff;
  --sidebar-text-active: #fff;
  --sidebar-active: #3c8dbc;
  --navbar: #fff;
  --navbar-text: #444;
  --bg: #f4f6f9;
  --surface: #fff;
  --surface-muted: #f4f6f9;
  --card: #fff;
  --text: #212529;
  --text-muted: #6c757d;
  --border: rgba(0, 0, 0, .125);
  color-scheme: light;
}

[data-theme="dark"] {
  --bs-primary: #60a5fa;
  --bs-primary-rgb: 96, 165, 250;
  --bs-link-color: #93c5fd;
  --bs-link-color-rgb: 147, 197, 253;
  --bs-link-hover-color: #bfdbfe;
  --bs-link-hover-color-rgb: 191, 219, 254;
  --lte-primary: #60a5fa;
  --sidebar: #0f172a;
  --sidebar-surface: rgba(255, 255, 255, .05);
  --sidebar-text: #cbd5e1;
  --sidebar-text-active: #fff;
  --sidebar-active: #3b82f6;
  --navbar: #111827;
  --navbar-text: #e2e8f0;
  --bg: #121827;
  --surface: #1e293b;
  --surface-muted: #172232;
  --card: #1f2a44;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, .12);
  color-scheme: dark;
}

body {
  background-color: var(--bg, #fff) !important;
}

.btn.btn-primary {
  color: #fff !important;
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.btn.btn-primary:hover,
.btn.btn-primary:focus-visible {
  color: #fff !important;
  background-color: #367fa9 !important;
  border-color: #367fa9 !important;
}

.btn.btn-primary:active {
  background-color: #2c698e !important;
  border-color: #2c698e !important;
}

.btn.btn-outline-primary {
  color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.btn.btn-outline-primary:hover,
.btn.btn-outline-primary:focus-visible {
  color: #fff !important;
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.bg-primary,
.text-bg-primary {
  background-color: var(--bs-primary) !important;
}

.text-primary {
  color: var(--bs-primary) !important;
}

.app-header {
  border-bottom: 3px solid #3c8dbc;
  background-color: var(--navbar, #fff) !important;
}

.app-header .navbar-nav .nav-link {
  color: var(--navbar-text, #344154);
}

.app-header .navbar-nav .nav-link:hover,
.app-header .navbar-nav .nav-link:focus,
.app-header .navbar-nav .nav-link.active {
  color: var(--bs-primary);
}

.app-sidebar {
  background-color: var(--sidebar, #fff) !important;
  border-right-color: var(--border, #dee2e6);
}

html[data-theme="light"] body .app-sidebar,
html[data-theme="light"] body .app-sidebar.sidebar-dark-primary {
  background-color: #3c8dbc !important;
  color: #fff !important;
}

html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link,
html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link p,
html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link i,
html[data-theme="light"] body .app-sidebar .sidebar-role-label,
html[data-theme="light"] body .app-sidebar .nav-header {
  color: #fff !important;
}

html[data-theme="light"] body .app-sidebar .nav-header {
  color: rgba(255, 255, 255, .72) !important;
  font-weight: 800;
}

html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link:hover,
html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link:hover p,
html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link:hover i,
html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link:focus-visible,
html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link:focus-visible p,
html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link:focus-visible i {
  background-color: rgba(0, 0, 0, .12);
  color: #fff !important;
}

html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link.active,
html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link.active p,
html[data-theme="light"] body .app-sidebar .nav-sidebar .nav-link.active i {
  background: linear-gradient(100deg, #367fa9, #3c8dbc) !important;
  color: #fff !important;
}

html[data-theme="light"] body .app-sidebar .nav-treeview {
  border-left-color: rgba(255, 255, 255, .28) !important;
}

html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link,
html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link p,
html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link i,
html[data-theme="dark"] body .app-sidebar .sidebar-role-label {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] body .app-sidebar .nav-header {
  color: #93c5fd !important;
}

html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link:hover,
html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link:hover p,
html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link:hover i,
html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link:focus-visible,
html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link:focus-visible p,
html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link:focus-visible i {
  background-color: rgba(96, 165, 250, .16);
  color: #bfdbfe !important;
}

html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link.active,
html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link.active p,
html[data-theme="dark"] body .app-sidebar .nav-sidebar .nav-link.active i {
  background: linear-gradient(100deg, #2563eb, #3b82f6) !important;
  color: #fff !important;
}

.app-sidebar .brand-link {
  background-color: var(--sidebar-surface, #367fa9);
  color: #fff;
  border-bottom-color: var(--border, rgba(255, 255, 255, .1));
}

.app-sidebar .nav-header {
  color: var(--bs-primary);
}

.app-sidebar .nav-sidebar .nav-link,
.app-sidebar .sidebar-role-label {
  color: var(--sidebar-text, #fff);
}

.app-sidebar .nav-sidebar .nav-link:hover,
.app-sidebar .nav-sidebar .nav-link:focus {
  background-color: rgba(0, 0, 0, .12);
  color: #fff;
}

.app-sidebar .nav-sidebar .nav-link.active {
  background: linear-gradient(100deg, #367fa9, #3c8dbc);
  color: #fff;
}

.app-sidebar .nav-treeview {
  border-left-color: rgba(255, 255, 255, .28);
}

.app-sidebar .user-panel {
  background-color: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
}

.app-sidebar .user-panel .info a {
  color: #fff;
}

.app-sidebar .school-context-card {
  background-color: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .2);
}

.app-sidebar .user-panel .info span {
  color: var(--sidebar-text, #b8c7ce);
}

.content-header {
  border-left: 4px solid var(--bs-primary);
}

.card,
.modal-content,
.dropdown-menu {
  border-color: var(--border, #dee2e6);
}

.card-primary:not(.card-outline) > .card-header,
.card-primary.card-outline {
  border-top-color: var(--bs-primary);
}

.card-primary:not(.card-outline) > .card-header,
.callout.callout-primary {
  background-color: var(--bs-primary);
}

.callout.callout-primary {
  border-left-color: var(--bs-primary);
}

.alert-primary {
  --bs-alert-color: #234e67;
  --bs-alert-bg: #e7f2f8;
  --bs-alert-border-color: #b8d9ea;
  --bs-alert-link-color: #1c3e52;
}

.bg-gradient-primary {
  background: linear-gradient(180deg, #3c8dbc, #367fa9) !important;
  color: #fff;
}

.form-control:focus,
.form-select:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .2);
}

.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.page-link {
  color: var(--bs-link-color);
}

.page-link:hover,
.page-link:focus {
  color: var(--bs-link-hover-color);
}

.app-datagrid-toolbar {
  border-top: 2px solid #3c8dbc;
}

.app-data-grid thead th[data-grid-sort]:hover,
.app-data-grid thead th[aria-sort="ascending"],
.app-data-grid thead th[aria-sort="descending"] {
  color: var(--bs-primary);
}

.main-footer {
  border-top-color: #3c8dbc !important;
  background-color: var(--surface, #fff) !important;
}

.login-page {
  background: linear-gradient(145deg, #e7f2f8, #fff 58%) !important;
}

.login-box .card-outline.card-primary {
  border-top-color: var(--bs-primary);
}

.login-box .card-header {
  background-color: #f4f6f9;
}

.hero {
  background: linear-gradient(145deg, #e7f2f8, #fff 62%);
}

.hero-title {
  color: var(--bs-primary) !important;
}

.feature-card {
  border-color: rgba(60, 141, 188, .2) !important;
}

[data-theme="dark"] .app-sidebar .brand-link,
[data-theme="dark"] .app-sidebar .user-panel {
  background-color: var(--sidebar-surface);
  border-color: var(--border);
}

[data-theme="dark"] .app-sidebar .nav-sidebar .nav-link:hover,
[data-theme="dark"] .app-sidebar .nav-sidebar .nav-link:focus {
  background-color: rgba(96, 165, 250, .16);
  color: #bfdbfe;
}

[data-theme="dark"] .app-sidebar .nav-treeview {
  border-left-color: var(--border);
}

[data-theme="dark"] .alert-primary {
  --bs-alert-color: #bfdbfe;
  --bs-alert-bg: #172a43;
  --bs-alert-border-color: #31547e;
  --bs-alert-link-color: #dbeafe;
}
