* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --green-normal: #5e6d55;
  --green-normal-active: #4b5744;
  --green-light: #eff0ee;
  --green-light-hover: #e7e9e6;
  --green-dark: #475240;
  --dark-black: #0b0a0a;
}


img {
  max-width: 100%;
  vertical-align: top;
}
body {
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

/* Admin layout: lock to viewport; sidebar stays put, main column scrolls */
html:has(.dashboard-main) {
  height: 100%;
}

body:has(.dashboard-main) {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.login-main {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url("../images/AdminLogin-bg.png") no-repeat center center;
}

.login-container {
  width: 100%;
  padding: 50px 200px 50px 150px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-left {
  width: 50%;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.login-left img {
  width: 150px;
}
.login-left h1 {
  font-family: "Poppins", sans-serif;
  font-size: 64px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  color: var(--green-normal);
}
.login-left h1 b,
.login-left h1 strong {
  /* Explicit weight: “bolder” fails when only one Poppins file is loaded */
  font-weight: 600;
}
.login-right {
  width: 515px;
  background: #fff;
  display: flex;
  border-radius: 20px;
  flex-direction: column;
  padding: 50px;
}

.input-group {
  font-size: 1.1rem;
  position: relative;
  margin-bottom: 20px;
}

.login-right .input-group {
  margin-bottom: 15px;
}

.input-field {
  width: 100%;
  all: unset;
  transition: 0.3s;
  box-sizing: border-box;
}
.form-control {
  padding: 12px;
  height: 56px;
  font-size: 16px;
  color: #000000de;
  border: 1px solid #0000003b;
  border-radius: 4px;
}
.form-control:focus {
  border: 1px solid #0000003b;
  box-shadow: none;
}

.input-group label {
  position: absolute;
  top: 16px;
  left: 12px;
  color: #00000099;
  pointer-events: none;
  background: #fff;
  padding: 0 4px;
  transition: 0.3s;
  z-index: 5;
  font-size: 15px;
}

/* Floating effect */
.input-field:focus ~ label,
.input-field:not(:placeholder-shown) ~ label {
  transform: translateY(-27px) scale(0.8);
  left: 8px;
}
.login-right h2 {
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  color: var(--dark-black);
  margin-bottom: 35px;
}

/* Parsley + Laravel field errors: compact, no bullets, dark red */
.login-right .parsley-errors-list {
  list-style: none;
  padding: 0;
  margin: 2px 0 6px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 400;
  color: #eb0f0f;
}

.login-right .parsley-errors-list li {
  list-style: none;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.login-right .parsley-errors-list li::marker {
  content: none;
}

.parsley-errors-list li::marker {
  content: none;
}

.login-right .auth-field-errors:empty {
  display: none;
}

ul.parsley-errors-list {
  padding-left: 0 !important;
}

.login-right .auth-server-error {
  padding: 0;
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 400;
  color: #eb0f0f;
}

ul.auth-input-error-list {
  list-style: none;
  list-style-type: none;
  padding: 0;
  margin: 2px 0 8px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 400;
  color: #eb0f0f;
}

ul.auth-input-error-list li {
  list-style: none;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

ul.auth-input-error-list li::marker {
  content: none;
}

ul.auth-input-error-list li + li {
  margin-top: 2px;
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 14px;
  cursor: pointer;
  z-index: 5;
}
.toggle-password svg {
  width: 20px;
  height: 20px;
}
#password {
  padding-right: 50px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: auto;
  padding-left: 42px;
  font-size: 14px;
  color: #101010;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch-slider {
  position: absolute;
  cursor: pointer;
  width: 34px;
  height: 20px;
  left: 0;
  top: 0;
  background-color: var(--green-light-hover);
  -webkit-transition: 0.4s;
  transition: 0.4s;
  border-radius: 30px;
}

.toggle-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  border-radius: 30px;
}

.toggle-switch input:checked + .toggle-switch-slider::before {
  background-color: var(--green-dark);
}


.toggle-switch input:checked + .toggle-switch-slider:before {
  -webkit-transform: translateX(14px);
  -ms-transform: translateX(14px);
  transform: translateX(14px);
}

/* Rounded sliders */

.Remember-me {
  margin-bottom: 20px;
}

.btn {
  height: auto;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
}
.btn-primary {
  background-color: var(--green-normal);
  border-color: var(--green-normal);
}
.btn-primary:hover,
.btn-check:checked + .btn,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check) + .btn:active {
  background-color: var(--green-normal);
  border-color: var(--green-normal);
}

/* Bootstrap checkboxes / radios — checked state matches brand green */
.form-check-input:checked {
  background-color: var(--green-normal);
  border-color: var(--green-normal);
}

.form-check-input:focus {
  border-color: var(--green-normal);
  box-shadow: 0 0 0 0.25rem rgba(94, 109, 85, 0.25);
}

.form-check-input:checked:focus {
  border-color: var(--green-normal-active);
  box-shadow: 0 0 0 0.25rem rgba(94, 109, 85, 0.35);
}

.dashboard-main {
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  background: var(--green-normal);
  padding: 20px;
  display: flex;
  overflow: hidden;
}
.content-right {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

/* Groups flash + page so the form column does not stretch with empty space under the alert */
.admin-page-stack {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
}

.admin-page-stack > .admin-flash-stack {
  flex: 0 0 auto;
}

/* With a session banner, keep the program/module card at natural height (extra space goes to bottom of .page-content) */
.admin-page-stack--with-flash > .program-create-page {
  flex: 0 1 auto;
}

/* Admin sidebar column (contains .nav-left); width lives here for desktop + off-canvas mobile */
.admin-sidebar {
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  width: 366px;
  min-height: 0;
}

.nav-left {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 0 20px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-logo {
  width: 100%;
  margin-bottom: 20px;
}

.nav-menu ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sub-menu .menu-arrow {
  flex-shrink: 0;
  margin-left: auto;
}
.nav-menu li {
  position: relative;
}

.nav-menu a {
  display: flex;
  padding: 10px;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  gap: 10px;
  border-radius: 6px;
}
.nav-menu a svg {
  margin-top: 2px;
}
.nav-menu li ul {
  display: none; /* hidden by default */
  padding-left: 20px;
}
/* Tree-style connectors: trunk + L-branch on all rows; terminal dot only on active item */
.nav-menu li.sub-menu > ul {
  position: relative;
  --nav-submenu-connector: rgba(255, 255, 255, 0.5);
  --nav-submenu-connector-w: 1px;
  --nav-submenu-stub: 25px;
  --nav-submenu-indent: 22px;
  margin: 0.4rem 0 0 0.35rem;
  padding: 0.1rem 0 0.25rem var(--nav-submenu-indent);
  border: none;
}
.nav-menu li.sub-menu > ul::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 0;
  width: 0;
  /* Stop near last row’s branch so the trunk does not overhang as much */
  height: calc(100% - 1.75rem);
  border-left: var(--nav-submenu-connector-w) solid var(--nav-submenu-connector);
  pointer-events: none;
  z-index: 0;
}
.nav-menu li.sub-menu > ul > li {
  position: relative;
  z-index: 0;
  margin-top: 0;
}
.nav-menu li.sub-menu > ul > li + li {
  margin-top: 4px;
}
/* Rounded L connecting trunk to row, plus horizontal stub toward the dot */
.nav-menu li.sub-menu > ul > li::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 50%;
  width: var(--nav-submenu-stub);
  height: 10px;
  margin-top: -5px;
  box-sizing: border-box;
  border: 0 solid var(--nav-submenu-connector);
  border-left-width: var(--nav-submenu-connector-w);
  border-bottom-width: var(--nav-submenu-connector-w);
  border-bottom-left-radius: 7px;
  pointer-events: none;
  z-index: 0;
}
/* Terminal dot only on the active submenu row (matches current route) */
.nav-menu li.sub-menu > ul > li.active::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 53%;
  width: 9px;
  height: 9px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  z-index: 2;
  opacity: 0.9;
}
.nav-menu li.sub-menu > ul a {
  position: relative;
  z-index: 1;
  /* Inset the row so :hover / .active backgrounds do not cover the tree + dot */
  margin: 0 0 0 1.5rem;
  max-width: calc(100% - 1.5rem);
  padding: 8px 10px 8px 0.6rem;
  box-sizing: border-box;
  border-radius: 6px;
  transition: background-color 0.12s ease, color 0.12s ease;
}
/* Keep icons aligned to the right of the dot in submenu rows that include an icon */
.nav-menu li.sub-menu > ul a svg {
  position: relative;
  z-index: 1;
  margin-top: 2px;
}
.nav-menu li ul li {
  margin-top: 5px;
}
.nav-menu li.sub-menu > ul li {
  margin-top: 0;
}
.nav-menu li ul a {
  font-size: 18px;
  padding: 8px;
}
.nav-menu li ul .active a {
  color: #fff;
  background: #475240;
  font-weight: 600;
}
.nav-menu li.active > ul {
  display: block; /* show when active */
}
.nav-menu li.active > a {
  color: var(--green-normal);
  background: var(--green-light);
}
.welcome-section {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 10px;
  border-radius: 6px;
  background: var(--green-light);
}
.welcome-section__left {
  display: flex;
  align-items: center;
  gap: 0.4rem 0.75rem;
  min-width: 0;
  flex: 1 1 12rem;
}
.welcome-section h2 {
  font-size: 26px;
  color: #000;
  font-weight: normal;
  padding-left: 10px;
  margin: 0;
  min-width: 0;
}
.welcome-section__left h2 {
  padding-left: 0;
  overflow-wrap: anywhere;
}
.admin-sidebar-toggle {
  flex-shrink: 0;
  line-height: 0;
  color: var(--green-dark);
  background: transparent;
}
.admin-sidebar-toggle:hover,
.admin-sidebar-toggle:focus-visible {
  color: var(--green-normal-active);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
}
.welcome-section h2 b {
  font-weight: 600;
  color: var(--green-normal-active);
}
.head-profile-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.language-switcher {
  font-size: 14px;
  font-weight: 500;
}

.language-switcher__link {
  color: var(--green-dark);
  padding: 2px 4px;
  border-radius: 4px;
  white-space: nowrap;
}

.language-switcher__link:hover {
  color: var(--green-normal-active);
  text-decoration: underline !important;
}

.language-switcher__link.is-active {
  color: var(--green-normal-active);
  font-weight: 600;
  text-decoration: underline;
}

.head-profile-section button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px;
}
.head-profile-section button img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.head-profile-section button svg {
  width: 20px;
  margin-right: 10px;
}
.head-profile-section .dropdown-toggle::after {
  display: none;
}

/* -------------------------------------------------------------------------- */
/* Reset password form (inside guest / login-right)                           */
/* -------------------------------------------------------------------------- */

.auth-reset-lead {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #6b6b6b;
  margin: 0 0 16px;
  line-height: 1.45;
}

.auth-reset-intro {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-black);
  margin: 0 0 28px;
  line-height: 1.5;
}

.auth-reset-form .input-group {
  margin-bottom: 0;
}

.auth-reset-form .input-group:not(:last-of-type) {
  margin-bottom: 4px;
}

.auth-reset-form .form-control {
  border-radius: 8px;
  border-color: #c4c4c4;
  height: 56px;
}

.auth-reset-form .input-group:has(.toggle-password) .form-control {
  padding-right: 48px;
}

.auth-reset-form .input-group label .label-asterisk {
  color: #d92d20;
  font-weight: 600;
}

.password-rules-list {
  list-style: none;
  padding: 16px 0 20px;
  margin: 0;
}

.password-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.35;
  color: #6b6b6b;
  margin-bottom: 10px;
}

.password-rule:last-child {
  margin-bottom: 0;
}

.password-rule.is-met {
  color: #16a34a;
}

.password-rule-marker {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-rule-check {
  width: 22px;
  height: 22px;
  display: block;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.password-rule.is-met .password-rule-check {
  opacity: 1;
  transform: scale(1);
}

.btn-reset-password-submit {
  position: relative;
  width: 100%;
  height: 52px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background-color: var(--green-normal);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-reset-password-submit:hover:not(:disabled) {
  background-color: var(--green-normal-active);
}

.btn-reset-password-submit:disabled {
  opacity: 0.92;
  cursor: not-allowed;
}

.btn-reset-password-submit__spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-btn-spin 0.7s linear infinite;
}

.btn-reset-password-submit.is-loading .btn-reset-password-submit__text {
  opacity: 0;
}

.btn-reset-password-submit.is-loading .btn-reset-password-submit__spinner {
  display: block;
}

.btn-reset-password-submit:not(.is-loading) .btn-reset-password-submit__spinner {
  display: none;
}

@keyframes auth-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* -------------------------------------------------------------------------- */
/* Admin — Program index (DataTables)                                         */
/* -------------------------------------------------------------------------- */

.program-page-header .btn-primary {
  height: auto;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 15px;
}

.program-details-card table.dataTable thead th {
  font-weight: 600;
  font-size: 14px;
  border-bottom-width: 1px;
  border-top-width: 1px;
}

.program-details-card table.dataTable tbody td {
  font-size: 15px;
  vertical-align: middle;
}

/* Program list / modules: cards stretch under welcome bar (flex chain from .page-content) */
.program-index-page {
  min-height: 0;
}

.program-modules-card,
.program-index-card {
  min-height: 0;
}

.program-modules-card__body,
.program-index-card__body {
  min-height: 0;
}

.program-create-card,
.program-module-create-card {
  min-height: 0;
}

.program-create-card__body,
.program-module-create-card__body {
  min-height: 0;
}

/* Stretch create/edit/show/module cards to fill .admin-page-stack (parent is flex column) */
.admin-page-stack > .program-create-page {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0; /* allow flex child to shrink so nested content can’t force horizontal scroll */
  display: flex;
  flex-direction: column;
  align-self: stretch;
  width: 100%;
}

.admin-page-stack > .program-create-page > .admin-form-card.program-create-card {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

.admin-page-stack > .program-create-page > .admin-form-card .program-create-card__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Pin save/cancel (or actions) footer to bottom of card when content is short */
.admin-page-stack > .program-create-page > .admin-form-card.program-create-card .program-create-card__body > form,
.admin-page-stack > .program-create-page > .admin-form-card.program-create-card .program-create-card__body > .program-create-form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.admin-page-stack > .program-create-page > .admin-form-card.program-create-card .program-create-card__body > form > .program-create-footer,
.admin-page-stack
  > .program-create-page
  > .admin-form-card.program-create-card
  .program-create-card__body
  > .program-create-form
  > .program-create-footer {
  margin-top: auto;
}

/* Question bank: keep action row with the fields (overrides margin-top: auto) + breathing room */
.admin-page-stack
  > .program-create-page
  > .admin-form-card.program-create-card
  .program-create-card__body
  > form.question-bank-create-form
  > .program-create-footer {
  margin-top: 1.5rem;
  margin-bottom: 0;
  padding-top: 1.25rem;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

/*
 * Question bank create/edit: the default program-create flex chain (flex:1 + min-height:0) makes
 * the form fill the viewport. When the form is taller than the viewport, the form's box stays
 * viewport-tall and the rest of the form (including the footer) overflows visually; the card's
 * white background only covers the non-overflowing box, so the actions look "outside" the card.
 * Size the page and card to the form content (same idea as .admin-page-stack--with-flash > .program-create-page).
 */
body[data-page="question-bank-create"] .admin-page-stack > .program-create-page,
body[data-page="question-bank-edit"] .admin-page-stack > .program-create-page {
  flex: 0 1 auto;
}

body[data-page="question-bank-create"]
  .admin-page-stack
  > .program-create-page
  > .admin-form-card.program-create-card,
body[data-page="question-bank-edit"]
  .admin-page-stack
  > .program-create-page
  > .admin-form-card.program-create-card {
  flex: 0 0 auto;
}

body[data-page="question-bank-create"]
  .admin-page-stack
  > .program-create-page
  > .admin-form-card
  .program-create-card__body,
body[data-page="question-bank-edit"]
  .admin-page-stack
  > .program-create-page
  > .admin-form-card
  .program-create-card__body {
  flex: 0 0 auto;
}

body[data-page="question-bank-create"]
  .admin-page-stack
  > .program-create-page
  > .admin-form-card
  .program-create-card__body
  > form.question-bank-create-form,
body[data-page="question-bank-edit"]
  .admin-page-stack
  > .program-create-page
  > .admin-form-card
  .program-create-card__body
  > form.question-bank-create-form {
  flex: 0 0 auto;
}

.btn-program-module {
  background-color: var(--green-normal);
  border-color: var(--green-normal);
  font-weight: 500;
  border-radius: 5px;
}

.btn-program-module:hover {
  background-color: var(--green-normal-active);
  border-color: var(--green-normal-active);
  color: #fff;
}

.program-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.program-action-btn .lucide-action {
  width: 20px;
  height: 20px;
}

.program-row-actions .program-action-btn.btn-link {
  text-decoration: none;
}

div.dt-container div.dt-processing {
  z-index: 3;
}

/* -------------------------------------------------------------------------- */
/* Admin — Create Program form (outlined fields, batch table, toggles)         */
/* -------------------------------------------------------------------------- */

.admin-form-card.program-create-card {
  background: #fff;
  border-radius: 12px;
  /* max-width: 1200px; */
}

.program-create-card__body {
  padding: 28px 32px 32px;
}

@media (max-width: 767.98px) {
  .program-create-card__body {
    padding: 20px 16px 24px;
  }
}

.program-create-title {
  color: var(--dark-black);
}

.admin-outlined-field {
  position: relative;
  border: 1px solid #c4c4c4;
  border-radius: 8px;
  padding: 10px 12px 8px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-outlined-field:focus-within {
  border-color: var(--green-normal);
  box-shadow: 0 0 0 1px rgba(94, 109, 85, 0.2);
}

.admin-outlined-field.is-invalid {
  border-color: #dc3545;
}

.admin-outlined-label {
  position: absolute;
  top: -9px;
  left: 10px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 500;
  color: #5c5c5c;
  background: #fff;
  line-height: 1;
  z-index: 2;
}

.admin-outlined-input,
.admin-outlined-select,
.admin-outlined-textarea {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--dark-black);
  background: transparent;
  padding: 4px 0 2px;
  min-height: 28px;
}

.admin-outlined-textarea {
  /* min-height: 96px; */
  resize: vertical;
  line-height: 1.45;
}

.admin-outlined-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 32px;
  padding-left: 4px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 18px 18px;
  background-clip: padding-box;
  /* Inline SVG chevron to match Lucide style */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234a4f4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.admin-outlined-select option {
  /* Note: option styling support varies by browser/OS */
  padding: 6px 10px;
}

.admin-outlined-select::-ms-expand {
  display: none;
}

.admin-outlined-select:focus {
  outline: none;
}

.admin-outlined-select:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

/* -------------------------------------------------------------------------- */
/* Exam form — multi-select dropdown (program-wise)                            */
/* -------------------------------------------------------------------------- */

.exam-multiselect__dropdown {
  width: 100%;
}

.exam-multiselect__button {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0 2px;
  min-height: 28px;
  font-size: 15px;
  font-family: inherit;
  color: var(--dark-black);
}

.exam-multiselect__button:focus {
  outline: none;
}

.exam-multiselect__chevron {
  width: 18px;
  height: 18px;
  color: #4a4f4a;
  flex: 0 0 auto;
}

.exam-multiselect__menu {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #c5d0bd;
  padding: 10px 10px 8px;
  max-height: 260px;
  overflow: auto;
  box-shadow: 0 6px 18px rgba(11, 10, 10, 0.12);
}

.exam-multiselect__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exam-multiselect__item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  user-select: none;
  padding: 6px 8px;
  border-radius: 8px;
}

.exam-multiselect__item:hover {
  background: var(--green-light);
}

.exam-multiselect__checkbox {
  margin-top: 0;
}

.exam-multiselect__text {
  font-size: 14px;
  color: var(--dark-black);
}

.exam-multiselect__hidden {
  display: none;
}

/* Instructor form: intl-tel-input (flag + dial + number) inside admin-outlined field */
.admin-outlined-field--phone {
  /* Allow absolutely positioned parts to extend; overlap is handled by portaling the list to body. */
  overflow: visible;
}

.admin-outlined-field--phone .iti {
  display: block;
  width: 100%;
  position: relative;
}

.admin-outlined-field--phone .iti__country-container {
  z-index: 1;
}

.admin-outlined-field--phone .iti__selected-dial-code {
  font-size: 15px;
  color: var(--dark-black);
  font-weight: 500;
}

/* Inline dropdown (only if dropdownContainer is not used) — keep above siblings’ floating labels. */
.admin-outlined-field--phone .iti--inline-dropdown:not(.iti--container) .iti__dropdown-content {
  z-index: 20;
}

/* Portaled list (body): library uses .iti--container; keep above admin labels / Bootstrap layers. */
.iti.iti--container.instructor-iti {
  z-index: 2000;
}

.admin-outlined-field--phone .iti__tel-input,
.admin-outlined-field--phone input.iti__tel-input[type="tel"] {
  font-size: 15px;
  font-family: inherit;
  color: var(--dark-black);
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  outline: none;
  min-height: 28px;
}

/* Question bank — language tabs (EN / SK) for question + options */
.question-bank-locale-block {
  margin-bottom: 1.25rem;
}

.question-bank-locale-block__head {
  margin-bottom: 0.65rem;
}

/* Card shell: tab strip + content read as one control */
.question-bank-locale-shell {
  border: 1px solid #c5d0bd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(11, 10, 10, 0.05);
  overflow: hidden;
}

/* Segmented language switcher */
.question-bank-locale-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  /* background: linear-gradient(180deg, #e8ede6 0%, #dfe5dc 100%); */
  border-bottom: 1px solid #c5d0bd;
}

.question-bank-locale-nav .nav-item {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.question-bank-locale-nav .nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 2.5rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin: 0;
  color: #4a4f4a;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.question-bank-locale-nav .nav-item + .nav-item .nav-link {
  box-shadow: -1px 0 0 rgba(0, 0, 0, 0.06);
}

.question-bank-locale-nav .nav-link:hover {
  color: var(--green-dark, #0d5c3d);
  background: rgba(255, 255, 255, 0.35);
}

.question-bank-locale-nav .nav-link.active {
  color: white;
  background: #798d6e;
  font-weight: 600;
  border-bottom-color: var(--green-dark, #0d5c3d);
  box-shadow: 0 1px 0 0 #fff;
}

.question-bank-locale-nav__label {
  white-space: nowrap;
}

.question-bank-locale-nav__req {
  font-size: 1.05em;
  line-height: 1;
}

/* Tab body: question text only (options follow below) */
.question-bank-locale-shell__body {
  padding: 1rem 1rem 1.05rem;
  background: #fafbfa;
}

/* Outlined fields with no surface label (language is the tab) */
.admin-outlined-field.question-bank-locale-input {
  padding: 10px 12px 9px;
}

.admin-outlined-field.question-bank-locale-input .admin-outlined-textarea,
.admin-outlined-field.question-bank-locale-input .admin-outlined-input {
  padding-top: 2px;
}

.admin-outlined-field.question-bank-locale-input .admin-outlined-textarea {
  min-height: 5.5rem;
}

/* Option letter label above inputs */
.question-bank-option-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5c5c5c;
  text-transform: uppercase;
}

/* Question bank — option row (outlined input + correct checkbox) */
.question-bank-option-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 12px 16px;
  min-width: 0;
  max-width: 100%;
}

.question-bank-option-row .admin-outlined-field {
  min-width: 0;
}

/* Default .form-check uses float + negative margin-left; as a flex item that can collapse
   and draw the checkbox outside the card on narrow viewports. Use flex for this cell only. */
.question-bank-option-row__correct.form-check {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding-left: 0;
  margin-bottom: 0;
  /* align checkbox with the outlined input (below “Option A” label) */
  margin-top: 1.55rem;
  width: 2.75rem;
  min-width: 2.75rem;
  box-sizing: border-box;
}

.question-bank-option-row__correct .form-check-input {
  float: none;
  margin-left: 0;
  margin-top: 0;
}

@media (max-width: 575.98px) {
  .question-bank-option-row {
    flex-wrap: wrap;
  }

  .question-bank-option-row__correct.form-check {
    margin-top: 0;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }
}

/* Let the form shrink inside padded card (flex parents need min-width: 0) */
form.question-bank-create-form {
  min-width: 0;
  max-width: 100%;
}

.admin-outlined-input--bare {
  min-height: 32px;
  text-align: center;
}

.admin-outlined-field--view {
  pointer-events: none;
  background: #fafafa;
}

.admin-outlined-field--view:focus-within {
  border-color: #c4c4c4;
  box-shadow: none;
}

.admin-outlined-static-value {
  display: block;
  width: 100%;
  font-size: 15px;
  font-family: inherit;
  color: var(--dark-black);
  padding: 4px 0 2px;
  min-height: 28px;
}

.admin-outlined-static-value--center {
  text-align: center;
}

.toggle-switch.toggle-switch--static {
  cursor: default;
  pointer-events: none;
}

.toggle-switch--static .toggle-switch-slider--on:before {
  -webkit-transform: translateX(14px);
  -ms-transform: translateX(14px);
  transform: translateX(14px);
  background-color: var(--green-dark);
}

.admin-outlined-field--split .admin-split-inputs {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 2px;
}

.admin-split-divider {
  width: 1px;
  background: #e0e0e0;
  flex-shrink: 0;
  margin: 4px 0;
}

.admin-field-error {
  font-size: 12px;
  color: #dc3545;
  /* margin-top: 6px; */
}

.admin-toggle-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-black);
}

.admin-toggle-ends {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-toggle-ends--compact {
  gap: 6px;
}

.admin-toggle-end {
  font-size: 14px;
  font-weight: 500;
  color: var(--green-normal);
  min-width: 1.25rem;
  text-align: center;
}

.admin-toggle-end.is-muted {
  color: #9aa0a6;
  font-weight: 400;
}

.admin-toggle-end.is-active {
  color: var(--green-dark);
  font-weight: 600;
}

.program-batch-section {
  border-top: 1px solid #ececec;
  padding-top: 20px;
}

.program-batch-add {
  color: var(--green-normal) !important;
  font-size: 15px;
}

.program-batch-table-wrap {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.program-batch-table {
  font-size: 14px;
}

.program-batch-table thead th {
  background: #f4f5f4;
  color: #3d3d3d;
  font-weight: 600;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 14px;
  white-space: nowrap;
}

.program-batch-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
  border-color: #eee;
}

.program-batch-table .batch-display-text {
  font-size: 14px;
  color: var(--dark-black);
}

.batch-status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.batch-status-pill.is-active {
  background: #e8f0e6;
  color: var(--green-dark);
}

.batch-status-pill.is-inactive {
  background: #f0f0f0;
  color: #666;
}

.instructor-contact-cell {
  line-height: 1.4;
  max-width: 20rem;
  margin: 0 auto;
}

.instructor-account-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.instructor-account-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.instructor-account-status.is-active .instructor-account-status__dot {
  background: #2d8a3e;
}

.instructor-account-status.is-active {
  color: var(--green-dark, #1f5c2a);
}

.instructor-account-status.is-inactive .instructor-account-status__dot {
  background: #c62828;
}

.instructor-account-status.is-inactive {
  color: #666;
}

.instructor-view-link {
  color: var(--green-dark, #1f5c2a);
  font-weight: 600;
}

.instructor-view-link:hover {
  text-decoration: underline;
}

.instructor-show-dl dt,
.instructor-show-dl dd {
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
}

.program-batch-modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.program-batch-modal-dialog {
  max-width: 560px;
}

.program-batch-modal__header {
  position: relative;
  justify-content: center;
  padding: 1.35rem 2.5rem 0.75rem 1.5rem;
}

.program-batch-modal__title {
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark-black);
  letter-spacing: 0.01em;
}

.program-batch-modal__close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  margin: 0;
  opacity: 0.55;
}

.program-batch-modal__close:hover {
  opacity: 1;
}

.program-batch-modal__body {
  padding: 0.5rem 1.5rem 1.25rem;
}

.program-batch-modal .admin-outlined-field {
  margin-bottom: 0;
}

.program-batch-modal .admin-outlined-input--date {
  min-height: 36px;
  padding-top: 2px;
  padding-bottom: 2px;
  color-scheme: light;
}

.program-batch-modal__error {
  color: #dc3545;
  text-align: center;
}

.program-batch-modal__footer {
  justify-content: center;
  padding: 0 1.5rem 1.5rem;
}

.program-batch-modal__submit {
  min-width: 200px;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  background-color: var(--green-normal);
  border-color: var(--green-normal);
}

.program-batch-modal__submit:hover,
.program-batch-modal__submit:focus {
  background-color: var(--green-normal-active);
  border-color: var(--green-normal-active);
}

.program-batch-modal__submit:disabled,
.program-batch-modal__submit.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.program-batch-modal__submit:disabled:hover,
.program-batch-modal__submit:disabled:focus,
.program-batch-modal__submit.disabled:hover,
.program-batch-modal__submit.disabled:focus {
  background-color: var(--green-normal);
  border-color: var(--green-normal);
}

.program-create-footer__btn {
  min-width: 140px;
  height: auto;
  font-size: 15px;
  font-weight: 500;
}

.program-create-footer .btn-outline-secondary {
  color: #555;
  border-color: #c4c4c4;
  background: #fff;
}

.program-create-footer .btn-outline-secondary:hover {
  background: #f8f8f8;
  border-color: #b0b0b0;
  color: #333;
}

.program-create-footer .btn-primary {
  background-color: var(--green-normal);
  border-color: var(--green-normal);
}

.program-create-footer .btn-primary:hover {
  background-color: var(--green-normal-active);
  border-color: var(--green-normal-active);
}

.add-program-link{
  color: var(--green-dark);
  font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/* Admin — Create program module (tabs, list rows, upload modals)              */
/* -------------------------------------------------------------------------- */

.program-module-create-card .program-module-tabs {
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--green-dark);
}

.program-module-tab {
  border-radius: 0;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border: none;
  background-color: #fff;
  color: var(--dark-black);
}

.program-module-tab:hover,
.program-module-tab:focus-visible {
  color: #fff;
  background-color: var(--green-normal-active);
}

.program-module-tab--active {
  background-color: var(--green-dark);
  color: #fff;
}

.program-module-tab--active:hover,
.program-module-tab--active:focus-visible {
  background-color: var(--green-dark);
  color: #fff;
}

.program-module-tab__count {
  margin-left: 0.25em;
  font-weight: 600;
  opacity: 0.92;
}

/* Translatable field: one outlined input per locale (no tabs) */
.admin-translatable-field {
  margin-bottom: 0.25rem;
}

.admin-translatable-field__head {
  margin-bottom: 15px;
}

.admin-translatable-field__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-black);
  line-height: 1.3;
  margin: 0 0 4px;
}

.admin-translatable-field__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6b6b6b;
  max-width: 52rem;
}


.admin-translatable-field__shell .admin-outlined-field {
  background: #fff;
}

/* Program create / edit: program name (EN/ SK) in one row; then other fields on following rows, top-aligned */
.program-form-name-row {
  align-items: start;
}

.program-form-name-row > [class*="col-"] {
  min-width: 0;
}

.program-form-name-row .admin-translatable-field {
  margin-bottom: 0;
}

.program-form-name-row .admin-translatable-field__shell {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.program-form-name-row .admin-translatable-field__head {
  margin-bottom: 8px;
}

.program-form-name-row .admin-translatable-field__hint {
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.program-form-name-row .admin-translatable-field__inputs {
  --bs-gutter-y: 0.65rem;
  margin-top: 0;
}

.program-form-name-row .admin-outlined-field {
  width: 100%;
}

.program-module-add-link {
  color: var(--green-dark);
  font-weight: 600;
}

.program-module-item-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.program-module-item-row {
  padding: 14px 16px;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  background: #fff;
}

.program-module-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #e8e8e8;
}

.program-module-item-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--dark-black);
}

.program-module-upload-modal-dialog {
  max-width: 640px;
}

.program-module-dropzone {
  position: relative;
  border: 2px dashed #c8c8c8;
  border-radius: 10px;
  padding: 2rem 1.25rem 1.75rem;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.program-module-dropzone--drag {
  border-color: var(--green-normal);
  background: #f0f4ef;
}

.program-module-dropzone.is-invalid {
  border-color: #dc3545;
  border-style: dashed;
  background: #fff8f8;
}

.program-module-dropzone-icon {
  width: 40px;
  height: 40px;
  color: #6b8cae;
  margin-bottom: 0.5rem;
}

.program-module-dropzone-text {
  font-size: 14px;
  color: #444;
}

.program-module-dropzone-link {
  color: #0d6efd;
  font-weight: 600;
}

.program-module-dropzone-link:hover {
  color: #0a58ca;
}

/* Admin flash: single compact row; vertical center; no Bootstrap dismissible top-right overlap */
.admin-flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 0;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.35;
}

.admin-flash__message {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-flash__close {
  position: static;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.35rem;
  opacity: 0.75;
}

.admin-flash__close:hover {
  opacity: 1;
}

/* sweet alert small classes */
.swal2-title {
  font-size: 18px;
}

.swal-text-small {
  font-size: 15px;
}

.swal-btn-small {
  font-size: 15px;
  padding: 6px 10px;
}
.swal2-icon {
  width: 50px;
  height: 50px;
}
.swal2-icon-content {
  font-size:50px !important;
}

.swal2-confirm {
  font-size: 15px;
  padding: 6px 10px;
}
.swal2-cancel {
  font-size: 15px;
  padding: 6px 10px;
}
.swal2-confirm:hover {
  background-color: var(--green-normal-active);
  border-color: var(--green-normal-active);
}
.swal2-cancel:hover {
  background-color: #dc3545;
  border-color: #dc3545;
}

.swal2-x-mark{
  font-size:10px !important;
}
/* Admin: module video file preview (Video.js) */
.module-file-preview {
  margin: 0 auto;
}

/* EN + SK as Bootstrap tabs: one pane visible at a time */
.module-file-preview--tabs {
  min-height: 0;
}
.module-file-preview__tabs {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.module-file-preview__nav {
  flex-shrink: 0;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 0;
}
.module-file-preview__nav .nav-item {
  margin-bottom: -1px;
}
.module-file-preview__nav .nav-link {
  color: #495057;
  border: 1px solid transparent;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  padding: 0.5rem 0.9rem;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}
.module-file-preview__nav .nav-link:hover {
  border-color: #e9ecef #e9ecef #dee2e6;
  isolation: isolate;
}
.module-file-preview__nav .nav-link.active {
  color: #212529;
  background: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}
.module-file-preview__tab-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 0.75rem;
}
.module-file-preview__tab-content > .tab-pane {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.module-file-preview__player-wrap {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #0f0f0f;
  box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.12);
}

.module-file-preview__video.video-js {
  width: 100%;
}

.module-file-preview__video.video-js .vjs-tech {
  outline: none;
}

/* Darker control bar, closer to LMS-style players */
.module-file-preview__video.video-js .vjs-control-bar {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.45) 55%,
    transparent 100%
  );
  height: 3.25em;
  padding-top: 0.35em;
}

.module-file-preview__video.video-js .vjs-progress-control .vjs-play-progress {
  background-color: #fff;
}

.module-file-preview__video.video-js .vjs-load-progress div {
  background: rgba(255, 255, 255, 0.35);
}

.module-file-preview__overlay {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 3.75rem;
  z-index: 1;
  pointer-events: none;
  text-align: left;
}

.module-file-preview__overlay-line {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.module-file-preview__overlay-sub {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  margin-top: 0.15rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.module-file-preview__description-body {
  font-size: 0.95rem;
  line-height: 1.55;
}

.module-file-preview__pdf-wrap {
  background: #f8f9fa;
  min-height: 70vh;
}

.module-file-preview__pdf-frame {
  display: block;
  width: 100%;
  min-height: 70vh;
  border: 0;
  background: #fff;
}

/* Module file preview: fill admin column to viewport, video/PDF without page scroll */
body[data-page='program-module-file-preview'] .page-content {
  min-height: 0;
}
body[data-page='program-module-file-preview'] .admin-page-stack {
  flex: 1 1 auto;
  min-height: 0;
}

body[data-page='program-module-file-preview']
  .admin-page-stack
  > .program-modules-card.program-details-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body[data-page='program-module-file-preview'] .program-modules-card__body--file-preview {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
}

body[data-page='program-module-file-preview'] .module-file-preview {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  width: 100%;
  /* margin: 0 auto on .module-file-preview + column flex parent shrinks this box to content width */
  margin-left: 0;
  margin-right: 0;
  overflow: hidden;
}

/* Let video/note blocks consume remaining height under the title row (tab panes can flex-fill) */
body[data-page='program-module-file-preview'] .module-file-preview .module-file-preview__block--note,
body[data-page='program-module-file-preview'] .module-file-preview .module-file-preview__block--video {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  overflow: hidden;
}
body[data-page='program-module-file-preview'] .module-file-preview__block--note > h2,
body[data-page='program-module-file-preview'] .module-file-preview__block--note > p,
body[data-page='program-module-file-preview'] .module-file-preview__block--video > p {
  flex-shrink: 0;
}
body[data-page='program-module-file-preview'] .module-file-preview__block--note .module-file-preview__tabs,
body[data-page='program-module-file-preview'] .module-file-preview__block--video .module-file-preview__tabs {
  flex: 1 1 auto;
  min-height: 0;
}

body[data-page='program-module-file-preview'] .module-file-preview--tabs {
  justify-content: flex-start;
  overflow: hidden;
}
/* Tab panes: use flex (Bootstrap defaults to block) so video + PDF fill the card */
body[data-page='program-module-file-preview'] .module-file-preview__tab-content > .tab-pane {
  display: none;
}
body[data-page='program-module-file-preview'] .module-file-preview__tab-content > .tab-pane.active.show {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
body[data-page='program-module-file-preview'] .module-file-preview--tabs .module-file-preview__block--note .module-file-preview__tab-content,
body[data-page='program-module-file-preview'] .module-file-preview--tabs .module-file-preview__block--video .module-file-preview__tab-content {
  flex: 1 1 auto;
  min-height: 0;
}
body[data-page='program-module-file-preview'] .module-file-preview--tabs .module-file-preview__player-wrap {
  flex: 1 1 auto;
  min-height: 0;
  align-self: stretch;
  width: 100%;
  max-height: none;
}
/* Tab body line above the PDF: keep it small so the grow area is the frame */
body[data-page='program-module-file-preview'] .module-file-preview--tabs .module-file-preview__line-meta {
  flex-shrink: 0;
  margin-bottom: 0.5rem !important;
}

body[data-page='program-module-file-preview'] .module-file-preview > h2 {
  flex-shrink: 0;
}

body[data-page='program-module-file-preview'] .module-file-preview__player-wrap {
  flex: 1 1 auto;
  min-height: 0;
  align-self: stretch;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-page='program-module-file-preview'] .module-file-preview__video.video-js {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

body[data-page='program-module-file-preview'] .module-file-preview__video.video-js .vjs-tech {
  object-fit: contain;
}

/* Long descriptions scroll inside the card, not the whole page */
body[data-page='program-module-file-preview'] .module-file-preview__description {
  flex: 0 1 auto;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  max-height: min(28vh, 14rem);
  overflow-y: auto;
  margin-top: 1rem !important;
}

/*
 * PDF preview: the wrapper fills flex space; iframe is absolutely filled so
 * height:100% works (iframe % height is unreliable in nested flex without this).
 * clamp() keeps a usable minimum when the parent flex size is not yet resolved.
 */
body[data-page='program-module-file-preview'] .module-file-preview__pdf-wrap {
  position: relative;
  box-sizing: border-box;
  flex: 1 1 auto;
  /* At least half the viewport; flex:1 can grow to fill the card when the chain has height */
  min-height: max(18rem, 48vh);
  display: block;
  overflow: hidden;
}

body[data-page='program-module-file-preview'] .module-file-preview__pdf-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

/* -------------------------------------------------------------------------- */
/* Admin — Question bank index (toolbar, outlined filters, DataTables footer) */
/* -------------------------------------------------------------------------- */

.question-bank-page .question-bank-card {
  background: #fff;
  border-radius: 12px;
}

/* Admin shell: consistent gray header row on all tables */
.dashboard-main table > thead > tr > th,
.dashboard-main table > thead > tr > td {
  background-color: #ebebeb !important;
  color: #858282;
}

/* Avoid spurious horizontal scroll (flex + DataTables width); keep vertical scroll for long lists */
.admin-dt-list-page .admin-dt-table-wrap {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  /* Bottom only: keeps left/right flush with toolbar + page heading (same card padding) */
  margin: 0 0 0.75rem;
  border: 1px solid #e0e0e0;
  padding: 0;
  padding-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.admin-dt-list-page .admin-dt-table-wrap .dt-container {
  width: 100% !important;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-dt-list-page .admin-dt-table-wrap table.dataTable {
  width: 100% !important;
  margin: 0 !important;
}

/* Rounded top corners on header row (table + border-radius clip) */
.admin-dt-list-page .admin-dt-table-wrap table.dataTable > thead > tr > th:first-child {
  border-top-left-radius: 9px;
}

.admin-dt-list-page .admin-dt-table-wrap table.dataTable > thead > tr > th:last-child {
  border-top-right-radius: 9px;
}

.question-bank-toolbar {
  display: flex;
  gap: 1rem;
}

.question-bank-title {
  color: var(--dark-black);
}

.question-bank-toolbar__controls {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.question-bank-search-wrap {
  position: relative;
  flex: 1 1 220px;
  max-width: 320px;
  min-width: 180px;
}

.question-bank-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #888;
  pointer-events: none;
}

.question-bank-search-input {
  display: block;
  width: 100%;
  border: none;
  border-radius: 8px;
  background: #f0f0f0;
  padding: 10px 14px 10px 42px;
  font-size: 15px;
  font-family: inherit;
  color: var(--dark-black);
  outline: none;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.question-bank-search-input::placeholder {
  color: #8a8a8a;
}

.question-bank-search-input:focus {
  background: #ebebeb;
  box-shadow: 0 0 0 2px rgba(71, 82, 64, 0.2);
}

.admin-outlined-field--toolbar {
  flex: 0 0 auto;
  min-width: 132px;
  padding: 8px 10px 6px;
}

.admin-outlined-field--toolbar .admin-outlined-label {
  font-size: 11px;
}

.admin-outlined-field--toolbar .admin-outlined-select {
  padding: 2px 28px 2px 0;
  padding-left: 2px;
  font-size: 14px;
  background-position: right 4px center;
  background-size: 16px 16px;
}

.question-bank-add-link {
  white-space: nowrap;
  align-self: center;
  padding-bottom: 2px;
}

.question-bank-action-placeholder {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.admin-dt-list-page .admin-dt-footer {
  margin-top: 1rem !important;
}

/* DataTables v2 uses .dt-container, .dt-paging, .dt-paging-button (not .dataTables_wrapper) */
.admin-dt-list-page .dt-container .dt-length select,
.admin-dt-list-page .dt-container .dt-length select.dt-input {
  border-radius: 6px;
  border: 1px solid #c4c4c4;
  padding: 4px 8px 4px 8px;
  font-size: 14px;
  background: #fff;
}

.admin-dt-list-page .dt-container .dt-info {
  font-size: 14px;
  color: #444;
  padding-top: 0.35em;
}

.admin-dt-list-page .admin-dt-list-footer .dt-info {
  padding: 0;
  line-height: 2.125rem;
}

/* Buttons live inside nav; gap on .dt-paging alone does not space them */
.admin-dt-list-page .dt-container .dt-paging {
  padding-top: 0;
}

.admin-dt-list-page .dt-container .dt-paging nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.admin-dt-list-page .dt-container .dt-paging .dt-paging-button {
  box-sizing: border-box;
  border-radius: 6px !important;
  border: 1px solid #d8d8d8 !important;
  background: #f5f5f5 !important;
  background-image: none !important;
  color: #3a3a3a !important;
  margin: 0 0 0 0 !important;
  min-width: 2.125rem;
  min-height: 2.125rem;
  padding: 0 0.4rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: none !important;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
}

.admin-dt-list-page .dt-container .dt-paging .dt-paging-button:hover {
  background: #ebebeb !important;
  background-image: none !important;
  border-color: #c4c4c4 !important;
  color: #222 !important;
  box-shadow: none !important;
}

.admin-dt-list-page .dt-container .dt-paging .dt-paging-button.current,
.admin-dt-list-page .dt-container .dt-paging .dt-paging-button.current:hover {
  background: var(--green-dark) !important;
  background-image: none !important;
  border-color: var(--green-dark) !important;
  color: #fff !important;
}

.admin-dt-list-page .dt-container .dt-paging .dt-paging-button.disabled,
.admin-dt-list-page .dt-container .dt-paging .dt-paging-button.disabled:hover,
.admin-dt-list-page .dt-container .dt-paging .dt-paging-button.disabled:active {
  opacity: 0.45;
  cursor: default;
  background: #f5f5f5 !important;
  background-image: none !important;
  color: #666 !important;
  border-color: #e0e0e0 !important;
  box-shadow: none !important;
}

.admin-dt-list-page .dt-container .dt-paging .ellipsis {
  display: inline-block;
  border: none;
  background: none;
  min-width: auto;
  padding: 0 0.35em;
  color: #555;
  cursor: default;
}

/* Footer row: “Items per page” + label alignment (all admin list tables) */
.admin-dt-list-page .admin-dt-list-footer .dt-length {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
  color: #444;
  white-space: nowrap;
}

/* Match reference: table header fill + subtle row lines */
.question-bank-page .question-bank-table thead th {
  background: #ebebeb !important;
  color: #2d2d2d;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #d9d9d9;
  /* padding: 0.65rem 0.75rem; */
  vertical-align: middle;
}

.question-bank-page .question-bank-table.table-hover tbody tr:hover > * {
  --bs-table-hover-bg: #f6f6f6;
}

.question-bank-page .admin-dt-table-wrap table.dataTable.table tbody td {
  font-size: 15px;
  border-color: #e6e6e6;
  /* padding: 0.6rem 0.75rem; */
  vertical-align: middle;
}

/* -------------------------------------------------------------------------- */
/* Responsive — admin shell, auth, tables (viewport meta required in layouts) */
/* -------------------------------------------------------------------------- */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Mobile: off-canvas admin nav; full-width main column */
@media (max-width: 991.98px) {
  .dashboard-main {
    padding: 8px 10px;
  }

  .content-right {
    padding: 12px;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1050;
    width: min(20.5rem, 86vw);
    max-width: 100%;
    padding: max(0.75rem, env(safe-area-inset-top, 0px)) 0.5rem
      max(0.75rem, env(safe-area-inset-bottom, 0px)) 0.75rem;
    background: var(--green-normal);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.18);
    transform: translateX(-102%);
    transition: transform 0.28s ease;
    -webkit-overflow-scrolling: touch;
  }

  body.admin-sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(11, 10, 10, 0.45);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
  }

  .admin-sidebar .nav-left {
    padding: 0 0 0 0;
  }

  .nav-logo {
    margin-bottom: 12px;
  }

  .nav-menu a {
    font-size: 16px;
  }

  .nav-menu li ul a {
    font-size: 15px;
  }

  .welcome-section h2 {
    font-size: clamp(1.05rem, 4.2vw, 1.45rem);
    line-height: 1.3;
  }

  .head-profile-section .btn.dropdown-toggle {
    max-width: min(100%, 10rem);
  }

  .head-profile-section .btn.dropdown-toggle span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
  }
}

/* Desktop: no backdrop, sidebar in flow */
@media (min-width: 992px) {
  .admin-sidebar-backdrop {
    display: none !important;
  }
}

/* Login & guest pages */
@media (max-width: 991.98px) {
  .login-main {
    min-height: 100%;
    background-size: cover;
  }

  .login-container {
    flex-direction: column;
    padding: 28px 1.25rem 40px;
    align-items: stretch;
    justify-content: flex-start;
  }

  .login-left {
    width: 100%;
    text-align: center;
    align-items: center;
  }

  .login-left img {
    width: 120px;
  }

  .login-left h1 {
    font-size: clamp(1.75rem, 6.5vw, 2.75rem);
  }

  .login-right {
    width: 100%;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    padding: 28px 1.25rem 36px;
  }

  .login-right h2 {
    font-size: 1.4rem;
    margin-bottom: 24px;
  }
}

@media (max-width: 575.98px) {
  .login-right {
    padding: 20px 1rem 28px;
    border-radius: 14px;
  }

  .dashboard-main {
    padding: 4px 6px;
  }

  .content-right {
    padding: 10px;
  }
}

/* Program / module list cards already use .table-responsive */
.page-content .table-responsive {
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

