/* ==========================================================================
   Genesis University — Admin Theme
   Re-skins the legacy AdminBSB template to match the Eduka brand used across
   the public site and Next.js portal, WITHOUT touching the sidebar/scroll
   DOM contract that admin.js and style.css rely on (position, overflow,
   ls-closed / overlay-open / menu-toggle.toggled classes).

   Load this file LAST (after style.css, dataTables css and themes/all-themes.css)
   so it wins the cascade on shared/plain selectors. Selectors that all-themes.css
   scopes under ".theme-blue" are matched here at the same specificity so they
   still win; a few vendor rules use !important (style.css) and are matched
   with !important too.
   ========================================================================== */

:root {
  --eduka-primary: #116E63;
  --eduka-primary-dark: #0c4f47;
  --eduka-primary-soft: rgba(17, 110, 99, 0.09);
  --eduka-accent: #FDA31B;
  --eduka-accent-soft: rgba(253, 163, 27, 0.12);
  --eduka-surface: #F2F3F5;
  --eduka-heading: #19232B;
  --eduka-body: #757F95;
  --eduka-border: rgba(25, 35, 43, 0.18);
  --eduka-danger: #E5484D;
  --eduka-success: #2b982b;
  --eduka-radius: 10px;
  --eduka-radius-sm: 8px;
  --eduka-shadow: 0 4px 20px rgba(17, 35, 43, 0.06);
}

/* ---------- Global type & page background ---------- */
body.theme-blue,
body.login-page {
  font-family: "Roboto", sans-serif;
  color: var(--eduka-body);
}

body.theme-blue section.content {
  background-color: var(--eduka-surface);
}

.block-header h2 {
  color: var(--eduka-heading) !important;
  font-weight: 700 !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--eduka-heading);
}

a {
  color: var(--eduka-primary);
}
a:hover, a:focus {
  color: var(--eduka-primary-dark);
}

/* ---------- Navbar ---------- */
.theme-blue .navbar {
  background-color: var(--eduka-primary);
  background-image: linear-gradient(135deg, var(--eduka-primary) 0%, #0e5850 100%);
}

.navbar-right .dropdown-menu {
  min-width: 210px;
  right: 0;
  left: auto;
  padding: 6px 0;
  margin-top: 0;
  border: none;
  border-radius: var(--eduka-radius-sm);
  box-shadow: 0 10px 30px rgba(17, 35, 43, 0.18);
}
.navbar-right .dropdown-menu > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--eduka-heading);
  font-size: 13px;
}
.navbar-right .dropdown-menu > li.active > a,
.navbar-right .dropdown-menu > li > a:hover {
  background: var(--eduka-primary-soft);
  color: var(--eduka-primary);
}
.navbar-right .dropdown-menu .material-icons {
  font-size: 18px;
  width: 20px;
  color: var(--eduka-body);
}
.navbar-tools > li > a {
  padding: 12px 14px !important;
}

.lang-switcher > a {
  display: flex !important;
  align-items: center;
  gap: 6px;
  color: #fff !important;
  text-decoration: none;
}
.lang-switcher img.flag,
.account-menu img.flag {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.lang-switcher .lang-code {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* ---------- Sidebar: single native scroll (no slimScroll) ---------- */
.sidebar {
  font-family: "Roboto", sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

/* Only .menu scrolls — kills style.css height:90vh + overflow-y:auto fight with slimScroll */
.sidebar .menu {
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.sidebar .legal {
  position: relative !important;
  flex-shrink: 0;
  width: 100%;
  background: #fff;
}

/* Neutralize leftover slimScroll wrappers if any */
.sidebar .slimScrollDiv {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.sidebar .slimScrollDiv > .list {
  height: auto !important;
  overflow: visible !important;
}
.sidebar .slimScrollBar,
.sidebar .slimScrollRail {
  display: none !important;
}

.sidebar .menu .list .header {
  color: #90a4ae;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.sidebar .menu .list a span {
  color: var(--eduka-heading);
  font-weight: 500;
}

.sidebar .menu .list a:hover span,
.sidebar .menu .list a:hover i.material-icons {
  color: var(--eduka-primary);
}
.sidebar .menu .list a:hover {
  background-color: var(--eduka-primary-soft);
}

.theme-blue .sidebar .menu .list li.active > :first-child i,
.theme-blue .sidebar .menu .list li.active > :first-child span {
  color: var(--eduka-primary);
}
.sidebar .menu .list li.active > a {
  background-color: var(--eduka-primary-soft);
  border-left: 3px solid var(--eduka-primary);
}
.sidebar .menu .list li a {
  border-left: 3px solid transparent;
}

.sidebar .menu .list .ml-menu {
  background-color: rgba(17, 110, 99, 0.03);
}
.sidebar .menu .list .ml-menu li a {
  color: var(--eduka-body);
}
.sidebar .menu .list .ml-menu li.active a.toggled:not(.menu-toggle) {
  color: var(--eduka-primary);
}

.theme-blue .sidebar .legal .copyright a {
  color: var(--eduka-primary) !important;
}

/* Thin scrollbar on the single scroll region */
.sidebar .menu::-webkit-scrollbar {
  width: 6px;
}
.sidebar .menu::-webkit-scrollbar-thumb {
  background: rgba(17, 110, 99, 0.35);
  border-radius: 4px;
}
.sidebar .menu::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--eduka-radius-sm);
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:not(.btn-link):not(.btn-flat):hover {
  transform: translateY(-1px);
}

.btn-primary,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
  background-color: var(--eduka-primary) !important;
}
.btn-success,
.btn-success:hover,
.btn-success:active,
.btn-success:focus {
  background-color: #2E9E6D !important;
}
.btn-warning,
.btn-warning:hover,
.btn-warning:active,
.btn-warning:focus {
  background-color: var(--eduka-accent) !important;
  color: #3a2a02 !important;
}
.btn-danger,
.btn-danger:hover,
.btn-danger:active,
.btn-danger:focus {
  background-color: var(--eduka-danger) !important;
}
.btn-info,
.btn-info:hover,
.btn-info:active,
.btn-info:focus {
  background-color: #2196c9 !important;
}

/* ---------- Cards & info boxes ---------- */
.card {
  border-radius: var(--eduka-radius);
  box-shadow: var(--eduka-shadow);
  border: 1px solid var(--eduka-border);
}

.info-box {
  border-radius: var(--eduka-radius);
  box-shadow: var(--eduka-shadow);
}
.info-box .icon {
  background: linear-gradient(135deg, var(--eduka-primary) 0%, #0e5850 100%);
}
.info-box .content .number {
  color: var(--eduka-heading);
  font-weight: 700;
}

/* ---------- Tables & DataTables ---------- */
.table > thead > tr > th {
  color: var(--eduka-body);
  border-bottom: 2px solid var(--eduka-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.table > tbody > tr:hover {
  background-color: var(--eduka-primary-soft);
}

.dataTables_wrapper input[type="search"]:focus,
.dataTables_wrapper input[type="search"]:active {
  border-bottom: 2px solid var(--eduka-primary) !important;
}
.dataTables_wrapper .dt-buttons a.dt-button {
  background-color: var(--eduka-primary);
  border-radius: var(--eduka-radius-sm);
}
.dataTables_wrapper .dt-buttons a.dt-button:hover {
  background-color: var(--eduka-primary-dark);
}
.paging_simple_numbers .paginate_button.current,
.pagination li.active a {
  background: var(--eduka-primary) !important;
  border-color: var(--eduka-primary) !important;
  color: #fff !important;
}

/* ---------- Forms ---------- */
/* AdminBSB uses borderless .form-control inside .form-line (underline only).
   Force a clear boxed field so inputs are visible on white cards. */
.form-group .form-line {
  border: 1px solid var(--eduka-border) !important;
  border-radius: var(--eduka-radius-sm);
  background: #fff;
  padding: 4px 12px 2px;
  border-bottom: 1px solid var(--eduka-border) !important;
}
.form-group .form-line:after {
  border-bottom-color: var(--eduka-primary) !important;
  border-radius: 0 0 var(--eduka-radius-sm) var(--eduka-radius-sm);
}
.form-group .form-line.focused {
  border-color: var(--eduka-primary) !important;
  box-shadow: 0 0 0 3px var(--eduka-primary-soft);
}
.form-group .form-control,
.form-control {
  border-radius: var(--eduka-radius-sm) !important;
  border: 1px solid var(--eduka-border) !important;
  box-shadow: none !important;
  background: #fff !important;
  padding: 8px 12px !important;
  color: var(--eduka-heading) !important;
}
.form-group .form-line .form-control {
  border: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent !important;
}
.form-control:focus,
.form-group .form-control:focus {
  border-color: var(--eduka-primary) !important;
  box-shadow: 0 0 0 3px var(--eduka-primary-soft) !important;
}
.form-group .form-line .form-control:focus {
  box-shadow: none !important;
}
.form-group label,
.form-group .form-line .form-label {
  color: var(--eduka-heading);
  font-weight: 600;
}
.form-group label.form-label-static {
  display: block;
  margin-bottom: 6px;
  padding-left: 0 !important;
  height: auto !important;
  line-height: 1.4 !important;
  cursor: default;
}
.form-group label.form-label-static:before,
.form-group label.form-label-static:after {
  display: none !important;
}
/* Materialize hides native checkboxes; ensure sibling labels remain clickable */
.form-group > [type="checkbox"] + label {
  cursor: pointer;
  margin-bottom: 0;
}
select.form-control,
textarea.form-control {
  min-height: 40px;
}
.input-group-addon {
  background: var(--eduka-primary);
  color: #fff;
  border: none;
}
.checkbox input[type="checkbox"]:checked + label::before,
.radio input[type="radio"]:checked + label::after {
  background-color: var(--eduka-primary);
  border-color: var(--eduka-primary);
}

/* Dropify uploader */
.dropify-wrapper {
  border: 2px dashed var(--eduka-border);
  border-radius: var(--eduka-radius);
  background: #fafbfc;
}
.dropify-wrapper:hover {
  border-color: var(--eduka-primary);
}
.dropify-wrapper .dropify-preview .dropify-render img {
  border-radius: var(--eduka-radius-sm);
}

/* ---------- Alerts & badges ---------- */
.alert {
  border-radius: var(--eduka-radius-sm);
  border: none;
}
.alert-success {
  background-color: #e6f6ee !important;
  color: #1e7d4c !important;
}
.alert-danger {
  background-color: #fdecec !important;
  color: #b3261e !important;
}
.alert-warning {
  background-color: var(--eduka-accent-soft) !important;
  color: #8a5a00 !important;
}
.alert-info {
  background-color: #e7f4fb !important;
  color: #1c6f96 !important;
}
.alert-dismissible .close,
.alert .close {
  color: inherit;
  opacity: 0.6;
}

.badge {
  border-radius: 20px;
  font-weight: 600;
}

/* ---------- Modals ---------- */
.modal-content {
  border-radius: var(--eduka-radius);
  border: none;
  box-shadow: 0 20px 60px rgba(17, 35, 43, 0.25);
}

/* ---------- Login page ---------- */
body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--eduka-primary) 0%, #0a3f39 100%);
}
.login-box {
  width: 100%;
  max-width: 400px;
  margin: 40px auto;
}
.login-box .card {
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.login-box .card .body {
  padding: 36px 32px;
}
.login-box .msg {
  text-align: center;
  margin-bottom: 24px;
}
.login-box .msg h2 {
  color: var(--eduka-primary);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 4px;
}
.login-box .input-group {
  border-radius: var(--eduka-radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.login-box .input-group-addon {
  background: var(--eduka-primary);
}
.login-box .btn-primary {
  border-radius: var(--eduka-radius-sm);
  padding: 13px;
  font-size: 15px;
}
.login-lang {
  text-align: center;
  margin-bottom: 18px;
}
.login-lang a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 4px;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--eduka-body);
  border: 1px solid var(--eduka-border);
  font-size: 13px;
}
.login-lang a.active,
.login-lang a:hover {
  border-color: var(--eduka-primary);
  color: var(--eduka-primary);
  background: var(--eduka-primary-soft);
}
.login-lang img {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}
