/* Nexlink-inspired visual adaptation for the existing Bootstrap 5 components.
 * Keep legacy variable names so page-specific styles inherit the same palette.
 */
/* Mogav brand palette: navy #02335B + brand blue #0080FF */
:root, html.light-theme, html.semi-dark, html.minimal-theme {
  --haze-sidebar-bg: #ffffff;
  --haze-sidebar-text: #02335B;
  --haze-sidebar-active-bg: #D6EBFF;
  --haze-rail-bg: #F3F7FB;
  --haze-bg: #F5F8FC;
  --page-ribbon-bg: #02335B;
  --page-ribbon-fg: #ffffff;
  --haze-surface: #ffffff;
  --haze-surface-2: #F0F5FA;
  --haze-surface-3: #E6EEF6;
  --haze-border: #D5DEE8;
  --haze-border-strong: #A8B8C8;
  /* Stronger light-mode type: body/secondary/tertiary stay readable on pale surfaces */
  --haze-text: #2A3848;
  --haze-heading: #02335B;
  --haze-muted: #3F5163;
  --haze-soft: #4F6173;
  --haze-placeholder: #64788A;
  --haze-primary: #0080FF;
  --haze-primary-hover: #0066CC;
  --haze-primary-soft: #E7F3FF;
  --haze-dark: #02335B;
  --haze-dark-soft: #E7EEF5;
  --haze-radius: 12px;
  --haze-control-radius: 8px;
  --haze-shadow-sm: 0 1px 3px rgb(2 51 91 / 6%);
  --dreams-gradient: linear-gradient(90deg, #02335B 50%, #0080FF 100%);
  --dreams-focus: rgb(0 128 255 / 22%);
}
html.dark-theme {
  /* Cool navy surfaces — avoid purple/gray clashes with brand blue */
  --haze-sidebar-bg: #121A26;
  --haze-sidebar-text: #C5D0DC;
  --haze-sidebar-active-bg: #152A42;
  --haze-rail-bg: #121A26;
  --haze-bg: #0E1520;
  --page-ribbon-bg: #4DA3FF;
  --page-ribbon-fg: #ffffff;
  --haze-surface: #161E2B;
  --haze-surface-2: #1C2636;
  --haze-surface-3: #243044;
  --haze-border: rgba(197, 208, 220, .12);
  --haze-border-strong: rgba(148, 180, 220, .28);
  --haze-text: #C5D0DC;
  --haze-heading: #F2F6FA;
  --haze-muted: #8FA0B3;
  --haze-soft: #7A8CA0;
  --haze-placeholder: #8FA0B3;
  --haze-primary: #4DA3FF;
  --haze-primary-hover: #79BBFF;
  --haze-primary-soft: #152A42;
  --haze-dark: #02335B;
  --haze-dark-soft: #1C2636;
  --haze-toggle-bg: #1C2636;
  --haze-toggle-border: #3A4B60;
  --haze-toggle-bridge: #0E1520;
  --haze-shadow-sm: 0 1px 3px rgb(0 0 0 / 18%);
  --dreams-gradient: linear-gradient(90deg, #02335B 35%, #0080FF 100%);
  --dreams-focus: rgb(77 163 255 / 28%);
}
html { --bs-primary: #0080FF; --bs-primary-rgb: 0, 128, 255; }
html.dark-theme { --bs-primary: #4DA3FF; --bs-primary-rgb: 77, 163, 255; }
body { line-height: 1.55; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -.025em; }
.sidebar-wrapper, .sidebar-wrapper .sidebar-header,
html.dark-theme .sidebar-wrapper, html.dark-theme .sidebar-wrapper .sidebar-header {
  background: var(--haze-sidebar-bg) !important;
  border-color: var(--haze-border) !important;
  color: var(--haze-sidebar-text);
}
.sidebar-wrapper .sidebar-header .logo-text,
html.dark-theme .sidebar-wrapper .sidebar-header .logo-text {
  color: var(--haze-heading) !important;
  font-weight: 600 !important;
}
.sidebar-wrapper .menu-label, html.dark-theme .sidebar-wrapper .menu-label {
  color: var(--haze-muted) !important;
  letter-spacing: .04em;
  font-size: .65rem !important;
  font-weight: 500;
}
.sidebar-wrapper .metismenu a, html.dark-theme .sidebar-wrapper .metismenu a {
  color: var(--haze-sidebar-text) !important;
  border-radius: 8px;
  font-size: .84rem !important;
  font-weight: 400;
}
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu li > a:hover,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu li > a:focus {
  background: var(--haze-primary-soft) !important;
  color: var(--haze-primary) !important;
}
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu li.mm-active > a,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu li.fw-bold > a,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu li > a.active {
  background: var(--dreams-gradient) !important;
  color: #fff !important;
  font-weight: 500 !important;
}
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu ul li > a {
  font-weight: 400 !important;
}
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu ul li.mm-active > a,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu ul li > a.active,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu ul li > a:focus,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu ul li > a:focus-visible,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu ul li > a:hover {
  font-weight: 400 !important;
  background: var(--haze-primary-soft) !important;
  color: var(--haze-primary) !important;
}
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu a.active::before,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu .mm-active > a::before { background: var(--haze-primary) !important; }
.topbar, html.dark-theme .topbar {
  background: var(--haze-bg) !important;
  border-bottom: 1px solid var(--haze-border);
  box-shadow: none !important;
}
.mobile-toggle-menu, html.dark-theme .mobile-toggle-menu,
.topbar .top-menu .nav-link, html.dark-theme .topbar .top-menu .nav-link {
  background: var(--haze-surface) !important;
  color: var(--haze-heading) !important;
  border: 1px solid var(--haze-border);
  border-radius: 50%;
  box-shadow: none !important;
}
.card, .modal-content, .dropdown-menu { border-radius: var(--haze-radius); }
.card-header { padding: 1rem 1.25rem; }
.card-body { padding: 1.25rem; }
.page-breadcrumb { margin-bottom: 1.5rem !important; }
.btn { font-weight: 400; font-size: .84rem; box-shadow: none; }
.btn-primary, html.dark-theme .btn-primary {
  background: var(--haze-primary, #0080FF) !important;
  border-color: var(--haze-primary, #0080FF) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus-visible,
html.dark-theme .btn-primary:hover, html.dark-theme .btn-primary:focus-visible {
  background: var(--haze-primary-hover, #0066CC) !important;
  border-color: var(--haze-primary-hover, #0066CC) !important;
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--haze-primary) !important;
  box-shadow: 0 0 0 .2rem var(--dreams-focus) !important;
}
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--haze-primary);
  outline-offset: 3px;
}
.table thead th {
  background: var(--page-ribbon-bg, var(--haze-heading)) !important;
  color: var(--page-ribbon-fg, #fff) !important;
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .01em;
}
html.dark-theme .bg-white, html.dark-theme .bg-light {
  background-color: var(--haze-surface-2) !important;
  color: var(--haze-text) !important;
}
html.dark-theme .text-dark, html.dark-theme .text-body { color: var(--haze-heading) !important; }
html.dark-theme .text-white-50 { color: rgba(242, 246, 250, .55) !important; }
/* Soft fills keep brand ink readable on dark navy tints */
html.dark-theme :is(.bg-light-primary, .bg-primary-subtle, .alert-primary) {
  background: var(--haze-primary-soft) !important;
  color: var(--haze-primary) !important;
  border-color: var(--haze-border) !important;
}
html.dark-theme .page-wrapper,
html.dark-theme .page-content {
  background: var(--haze-bg);
  color: var(--haze-text);
}
html.dark-theme .dropdown-menu, html.dark-theme .modal-content,
html.dark-theme .offcanvas, html.dark-theme .swal2-popup,
html.dark-theme .flatpickr-calendar {
  background: var(--haze-surface) !important;
  color: var(--haze-text) !important;
  border-color: var(--haze-border) !important;
}
html.dark-theme .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.page-footer { background: var(--haze-info-soft, #E6F5F8) !important; color: var(--haze-muted) !important; box-shadow: none; }
@media (max-width: 575.98px) {
  .page-content { padding: 16px 12px; }
  .card-body, .card-header { padding: 1rem; }
  .topbar .navbar { gap: .5rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Application layout: inset navigation, open header and a consistent content grid. */
:root { --dreams-inset: 12px; }
:root, html.light-theme, html.dark-theme, html.semi-dark, html.minimal-theme {
  --haze-sidebar-width: 286px;
  --haze-sidebar-collapsed: 78px;
  --haze-topbar-height: 88px;
  --haze-sidebar-header-height: 86px;
}
html body { background: var(--haze-bg) !important; color: var(--haze-text); font-family: var(--bs-body-font-family); }
.sidebar-wrapper {
  top: 12px !important;
  bottom: 12px !important;
  left: 12px;
  height: calc(100vh - 24px) !important;
  border: 1px solid var(--haze-border) !important;
  border-radius: 14px;
}
.sidebar-wrapper .sidebar-header {
  top: 12px;
  left: 12px;
  width: calc(var(--haze-sidebar-width) - 2px);
  border-radius: 14px 14px 0 0;
  padding: 20px !important;
}
.sidebar-brand { min-width: 0; padding-right: 22px; }
.sidebar-wrapper .logo-text { line-height: 1.35; }
.sidebar-wrapper .toggle-icon, html.dark-theme .sidebar-wrapper .toggle-icon {
  right: 10px; top: 28px; width: 28px; height: 28px;
  border-radius: 50%; box-shadow: none !important;
}
.sidebar-wrapper .metismenu { padding: 12px !important; }
.sidebar-wrapper .metismenu > li > a { min-height: 44px; padding: 10px 12px; margin-bottom: 4px; }
.sidebar-wrapper .metismenu .menu-title { white-space: normal; line-height: 1.4; }
.sidebar-wrapper .metismenu .parent-icon { font-size: 20px; }
.topbar { left: calc(var(--haze-sidebar-width) + 12px); border: 0 !important; }
.topbar .navbar { padding: 0 28px; }
/* Keep footer at viewport bottom when page content is short. */
.wrapper:has(> .page-wrapper):has(> .page-footer) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.page-wrapper {
  flex: 1 0 auto;
  height: auto;
  margin-left: calc(var(--haze-sidebar-width) + 12px);
  margin-bottom: 0;
  padding-bottom: 0;
}
.page-content { padding: 4px 28px 20px; }
.page-footer {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  flex: 0 0 auto;
  margin-top: auto;
  display: flex;
  align-items: center;
  clear: both;
  min-height: 52px;
  margin-left: calc(var(--haze-sidebar-width) + 12px);
  padding: 14px 28px;
  border-top: 1px solid var(--haze-border);
  text-align: left;
  font-size: .8rem;
}
.page-footer p { margin: 0 !important; }
.page-wrapper .page-footer { margin-left: 0 !important; width: 100%; }
.mobile-toggle-menu { display: inline-flex !important; }
.dreams-search-trigger {
  display: flex; align-items: center; gap: 10px; width: min(360px, 35vw);
  padding: 10px 14px; border: 1px solid var(--haze-border); border-radius: 8px;
  color: var(--haze-muted); background: var(--haze-surface); font-size: .88rem; text-align: left;
}
.dreams-search-trigger kbd { margin-left: auto; background: var(--haze-surface-2); color: var(--haze-muted); border: 1px solid var(--haze-border); border-radius: 4px; font: inherit; font-size: .7rem; padding: 2px 5px; }
.topbar .user-box { border-left: 1px solid var(--haze-border); }
.topbar .user-img { width: 38px; height: 38px; border-radius: 50%; }
.topbar .user-name { font-size: .81rem; font-weight: 500; }
.topbar .designattion { font-size: .7rem; color: var(--haze-muted); font-weight: 400; }
#pageBreadcrumb { display: flex !important; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 4px 0 8px; }
.dreams-page-heading h1 { margin: 0 0 6px; color: var(--haze-heading); font-size: clamp(1.1rem, 1.6vw, 1.25rem); font-weight: 600; }
.dreams-page-heading .breadcrumb { font-size: .6875rem; }
.dreams-page-context { display: flex; align-items: center; gap: 8px; color: var(--haze-muted); font-size: .6875rem; }
.card { border: 1px solid var(--haze-border) !important; border-radius: 12px !important; margin-bottom: 24px; background: var(--haze-surface) !important; box-shadow: none !important; }
.card:hover { box-shadow: none !important; }
.card .card,
.tab-content .card,
.tab-pane .card { margin-bottom: 0; background: var(--haze-surface) !important; }
.card-header { border-bottom: 1px solid var(--haze-border); padding: 18px 20px; background: transparent; }
.card-header h6, .card-title { font-weight: 600; font-size: .84rem; text-transform: none; }
.card-body { padding: 20px; background: transparent; }
.card-footer { padding: 14px 20px; background: transparent; border-top: 1px solid var(--haze-border); }
.row-cols-xl-4 > .col > .card { overflow: hidden; position: relative; }
.row-cols-xl-4 > .col > .card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--dreams-gradient); }
.row-cols-xl-4 > .col > .card h4 { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.widgets-icons, .widgets-icons-2 { border-radius: 12px !important; width: 48px; height: 48px; font-size: 24px; }
.card .bg-gradient-blues { background: #eaf2ff !important; color: #3478db !important; }
.card .bg-gradient-burning { background: var(--haze-primary-soft) !important; color: var(--haze-primary) !important; }
.card .bg-gradient-ohhappiness { background: #e2f6ed !important; color: #16835c !important; }
.card .bg-gradient-orange { background: #fff0dc !important; color: #b56812 !important; }
html.dark-theme .card .widgets-icons-2 { background: var(--haze-surface-3) !important; color: var(--haze-primary) !important; }
.form-label { font-size: .8rem; font-weight: 500; margin-bottom: 6px; color: var(--haze-heading); }
.form-control, .form-select { min-height: 40px; border-radius: 8px; font-size: .84rem; font-weight: 400; }
.form-control-sm, .form-select-sm { min-height: 34px; }
textarea,
textarea.form-control { resize: none; }
textarea.form-control { min-height: 100px; }
.input-group-text { background: var(--haze-surface-2); border-color: var(--haze-border); color: var(--haze-muted); }
.btn { border-radius: 8px; padding: 8px 14px; font-size: .84rem; }
.btn-sm { padding: 5px 10px; font-size: .78rem; }
.btn-lg { padding: 10px 18px; font-size: .9rem; }
.nav-tabs { gap: 6px; border-bottom: 1px solid var(--haze-border); }
.nav-tabs .nav-link { border: 0 !important; border-radius: 0; padding: 12px 16px; color: var(--haze-muted); background: transparent !important; }
.nav-tabs .nav-link.active { color: var(--haze-primary) !important; box-shadow: inset 0 -2px var(--haze-primary); }
.nav-pills { gap: 6px; }
.nav-pills .nav-link { border-radius: 8px; padding: 9px 14px; }
.nav-pills .nav-link.active { background: var(--haze-primary-soft) !important; color: var(--haze-primary) !important; }
.table { vertical-align: middle; color: var(--haze-text); }
.table > :not(caption) > * > * { border-bottom-color: var(--haze-border); }
.table thead th { text-transform: none; font-size: .8rem; white-space: nowrap; padding-top: .75rem !important; padding-bottom: .75rem !important; }
.dataTables_wrapper .dataTables_filter input { border-radius: 8px; min-height: 38px; }
.dataTables_wrapper .dataTables_info { font-size: .8rem; }
.badge { border-radius: 6px; padding: .4em .65em; font-weight: 500; }
.modal-content { --dreams-modal-padding-x: 24px; }
.modal-header {
  padding: 16px var(--dreams-modal-padding-x);
  gap: 16px;
  align-items: center;
  background: var(--haze-surface-2);
  border-bottom-color: var(--haze-border);
  border-radius: 12px 12px 0 0;
}
.modal-header .modal-title { margin: 0; line-height: 1.45; min-width: 0; }
.modal-header .btn-close {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  padding: 10px;
}
.modal-title { font-weight: 600; font-size: .95rem; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 14px var(--dreams-modal-padding-x);
  margin: 0;
  gap: 8px;
  align-items: center;
  border-top-color: var(--haze-border);
  border-radius: 0 0 12px 12px;
}
/* Use one gap between actions instead of Bootstrap child margins plus gap. */
.modal-footer > * { margin: 0; }
.modal-footer .btn { min-height: 40px; }
.dropdown-menu { padding: 6px; border: 1px solid var(--haze-border); box-shadow: var(--haze-shadow-md); }
.dropdown-item { padding: 9px 12px; border-radius: 6px; }
.dreams-search-results { max-height: min(55vh, 440px); overflow-y: auto; }
.dreams-search-results a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; color: var(--haze-text); }
.dreams-search-results a:hover, .dreams-search-results a:focus { background: var(--haze-primary-soft); color: var(--haze-primary); }
.dreams-search-results a .bx-right-arrow-alt { margin-left: auto; }
.dreams-skip-link { position: fixed; top: -80px; left: 20px; z-index: 11000; background: var(--haze-primary); color: #fff; padding: 10px 18px; border-radius: 8px; }
.dreams-skip-link:focus { top: 12px; color: #fff; }
/* Authentication uses the same surfaces and controls as the application. */
body.login-page:has(.section-authentication-signin),
body:has(.section-authentication-signin) {
  background-color: transparent;
}
.section-authentication-signin .card { background: var(--haze-surface) !important; color: var(--haze-text); border-radius: 20px !important; box-shadow: var(--haze-shadow-lg) !important; }
.section-authentication-signin .card::before { content: ''; display: block; height: 5px; background: var(--dreams-gradient); border-radius: 20px 20px 0 0; }
body.login-page .login-shell { border-color: var(--haze-border); background: var(--haze-surface); }
body.login-page .login-panel { background: var(--haze-surface); color: var(--haze-text); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) body.login-page .login-cover h1 { color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) body.login-page .login-cover p { color: rgb(255 255 255 / 88%) !important; }
html.dark-theme body.login-page .login-shell { box-shadow: 0 24px 60px rgb(0 0 0 / 35%); }
@media (min-width: 1025px) {
  .wrapper.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-header { width: var(--haze-sidebar-collapsed) !important; }
  .wrapper.toggled .topbar, .wrapper.toggled:not(.sidebar-hovered) .topbar { left: calc(var(--haze-sidebar-collapsed) + 12px) !important; }
  .wrapper.toggled .page-wrapper, .wrapper.toggled:not(.sidebar-hovered) .page-wrapper { margin-left: calc(var(--haze-sidebar-collapsed) + 12px) !important; }
  .wrapper.toggled .page-footer { margin-left: calc(var(--haze-sidebar-collapsed) + 12px); }
  .wrapper.toggled:not(.sidebar-hovered) .sidebar-wrapper .toggle-icon { display: none !important; }
}
@media (max-width: 1024px) {
  .sidebar-wrapper { left: calc(-1 * var(--haze-sidebar-width) - 16px) !important; margin-left: 0 !important; transition: left .2s ease; }
  .sidebar-wrapper .sidebar-header { left: auto !important; }
  .wrapper.toggled .sidebar-wrapper { left: 12px !important; width: var(--haze-sidebar-width) !important; }
  .wrapper.toggled .sidebar-wrapper .sidebar-header { width: calc(var(--haze-sidebar-width) - 2px) !important; }
  .topbar, .wrapper.toggled .topbar { left: 0 !important; }
  .page-wrapper, .wrapper.toggled .page-wrapper, .page-footer, .wrapper.toggled .page-footer { margin-left: 0 !important; }
  .page-content { padding: 4px 20px 20px; }
  .topbar .navbar { padding: 0 20px; }
}
@media (max-width: 575.98px) {
  .dreams-search-trigger { width: 40px; height: 40px; justify-content: center; padding: 0; border-radius: 50%; }
  .dreams-search-trigger span, .dreams-search-trigger kbd, .dreams-page-context { display: none; }
  .page-content { padding: 0 12px 16px; }
  .topbar .navbar { padding: 0 12px; }
  .topbar .user-box { padding-right: 0 !important; padding-left: 10px !important; }
  .modal-content { --dreams-modal-padding-x: 16px; }
  .modal-header { padding-top: 12px; padding-bottom: 12px; gap: 12px; }
  .modal-footer { padding-top: 12px; padding-bottom: 12px; }
  .card-body, .modal-body { padding: 16px; }
  .modal-dialog { margin: 12px; }
}
@media print {
  .sidebar-wrapper, .topbar, .page-footer, .dreams-skip-link { display: none !important; }
  .page-wrapper { margin: 0 !important; padding: 0 !important; }
  .page-content { padding: 0 !important; }
}

/* Reference sidebar structure: 55px module rail + 240px page panel. */
:root, html.light-theme, html.dark-theme, html.semi-dark, html.minimal-theme {
  --haze-sidebar-width: 295px;
  --haze-sidebar-collapsed: 55px;
}
.sidebar-wrapper.dreams-sidebar {
  display: flex;
  overflow: hidden;
  border-radius: 10px;
  background: var(--haze-sidebar-bg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.dreams-module-rail {
  width: 55px;
  flex: 0 0 55px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 5px 12px;
  border-right: 1px solid var(--haze-border);
  background: var(--haze-rail-bg, var(--haze-sidebar-bg));
  overflow: hidden;
}
.dreams-rail-brand { display: grid; width: 36px; height: 36px; margin-bottom: 20px; place-items: center; }
.dreams-rail-brand .qaran-mark,
.dreams-rail-brand .dreams-rail-mark { grid-area: 1 / 1; width: 36px; height: 36px; object-fit: contain; }
html.dark-theme .qaran-mark-light,
html.dark-theme .dreams-rail-mark-light { display: none; }
html:not(.dark-theme) .qaran-mark-dark,
html:not(.dark-theme) .dreams-rail-mark-dark { display: none; }
html.dark-theme .dreams-rail-mark-dark { filter: brightness(0) invert(1); }
.dreams-module-list { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; flex: 1 1 auto; }
/* Rail icon trial: muted idle, soft hover, strong primary active. Undo: idle color -> --haze-sidebar-text; merge hover+active again. */
.dreams-module-list button, .dreams-module-list a, .dreams-rail-theme {
  display: flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px;
  border: 1px solid transparent; background: transparent; color: var(--haze-muted); border-radius: 8px; font-size: 20px;
}
.dreams-module-list button:hover, .dreams-module-list a:hover, .dreams-rail-theme:hover {
  color: var(--haze-heading); background: var(--haze-surface-3); border-color: transparent;
}
.dreams-module-list [aria-pressed="true"], .dreams-module-list a[aria-current="page"], .dreams-module-list .current-module {
  color: var(--haze-primary); background: var(--haze-primary-soft); border-color: var(--haze-border);
}
.dreams-rail-theme { margin-top: 16px; flex: 0 0 auto; }
.dreams-menu-panel {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--haze-sidebar-bg);
}
.dreams-sidebar .sidebar-header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  height: 86px;
  min-height: 86px;
  padding: 18px 14px !important;
  border: 0;
  border-radius: 0;
  flex: 0 0 auto;
  z-index: 2;
  background: var(--haze-sidebar-bg) !important;
}
.dreams-sidebar .sidebar-header { justify-content: center; text-align: center; }
.dreams-sidebar .sidebar-brand { padding-right: 0; width: 100%; text-align: center; }
.dreams-sidebar .sidebar-header .logo-text { font-size: 18px !important; font-weight: 600 !important; letter-spacing: -.01em; white-space: normal; line-height: 1.3; margin: 0; width: 100%; text-align: center; }
.dreams-sidebar .logo-text span { font-size: .7rem; font-weight: 400; color: var(--haze-muted); letter-spacing: 0; }
.dreams-sidebar-search {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  background: var(--haze-surface-2);
}
.dreams-menu-scroll {
  position: relative;
  z-index: 1;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--haze-sidebar-bg);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--haze-muted) 55%, transparent) transparent;
}
.dreams-menu-scroll::-webkit-scrollbar {
  width: 2px;
}
.dreams-menu-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.dreams-menu-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--haze-muted) 55%, transparent);
  border-radius: 999px;
}
.dreams-menu-scroll::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--haze-muted) 80%, transparent);
}
.dreams-menu-scroll .simplebar-wrapper,
.dreams-menu-scroll .simplebar-mask {
  height: 100%;
  max-width: 100%;
}
.dreams-menu-scroll .simplebar-offset,
.dreams-menu-scroll .simplebar-content-wrapper {
  max-width: 100%;
}
.dreams-menu-scroll .simplebar-content-wrapper {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
}
.dreams-menu-scroll .simplebar-track.simplebar-vertical {
  width: 2px !important;
  right: 1px;
}
.dreams-menu-scroll .simplebar-scrollbar {
  top: 0 !important;
  width: 2px !important;
  right: 0;
}
.dreams-menu-scroll .simplebar-scrollbar::before {
  width: 2px !important;
  left: 0 !important;
  right: 0 !important;
  background: color-mix(in srgb, var(--haze-muted) 55%, transparent);
}
.dreams-sidebar #navigations { margin-top: 0 !important; padding: 0 12px 28px !important; }
.dreams-sidebar #navigations > .menu-label { margin: 0 4px 2px; font-size: .75rem !important; letter-spacing: .01em; font-weight: 600; padding: 4px 0 2px; color: var(--haze-primary); }
.dreams-sidebar #navigations > li > a { font-size: .84rem !important; min-height: 32px; padding: 6px 10px; font-weight: 400; }
.dreams-sidebar #navigations ul { margin-left: 0 !important; padding-left: 4px !important; border-left: 0 !important; }
.dreams-sidebar #navigations ul a { font-size: .8rem !important; padding: 5px 10px 5px 8px !important; white-space: normal; line-height: 1.4; font-weight: 400; min-height: 30px; }
.dreams-sidebar #navigations li[hidden] { display: none !important; }
.dreams-sidebar #navigations li a::before { display: none !important; }
@media (min-width: 1025px) {
  .wrapper.toggled:not(.sidebar-hovered) .dreams-sidebar .dreams-menu-panel { display: none; }
  .wrapper.toggled:not(.sidebar-hovered) .dreams-sidebar .dreams-module-rail { border-right: 0; }
}
@media (max-width: 1024px) {
  .wrapper.toggled .dreams-sidebar .sidebar-header { width: 100% !important; }
}

/* Shared color/state audit. Solid fills and readable text use separate tokens. */
:root, html.light-theme, html.semi-dark, html.minimal-theme {
  --haze-success: #137747;
  --haze-warning: #925800;
  --haze-info: #08768c;
  --haze-danger: #c6283d;
  --dreams-focus: #0080FF;
  --bs-body-color: var(--haze-text);
  --bs-body-bg: var(--haze-surface);
  --bs-border-color: var(--haze-border);
}
html.dark-theme { --dreams-focus: #4DA3FF; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .text-secondary, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .text-muted { color: var(--haze-muted) !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .modal-title { color: var(--haze-heading) !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dropdown-menu, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .list-group-item, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .accordion-item,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .popover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .toast { color: var(--haze-text); background-color: var(--haze-surface); border-color: var(--haze-border); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dropdown-item { color: var(--haze-text); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dropdown-item:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dropdown-item:focus,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .list-group-item-action:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .list-group-item-action:focus {
  background: var(--haze-surface-2); color: var(--haze-heading);
}
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dropdown-item.active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dropdown-item:active,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .list-group-item.active { background: var(--haze-primary); color: #fff; border-color: var(--haze-primary); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dropdown-item.disabled, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dropdown-item:disabled { color: var(--haze-muted); opacity: .55; background: transparent; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-light, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-white { background: var(--haze-surface-2); color: var(--haze-text); border-color: var(--haze-border); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-light:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-white:hover { background: var(--haze-surface-3); color: var(--haze-heading); border-color: var(--haze-border-strong); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn:disabled, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn.disabled { opacity: .5; cursor: not-allowed; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .form-control, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .form-select, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .select2-container--bootstrap-5 .select2-selection {
  background-color: var(--haze-surface); color: var(--haze-text); border-color: var(--haze-border-strong);
}
html:is(.light-theme, .semi-dark, .minimal-theme) .form-control::placeholder { color: var(--haze-placeholder, var(--haze-soft)); opacity: 1; }
html.dark-theme .form-control::placeholder { color: var(--haze-muted); opacity: 1; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .form-control:disabled, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .form-control[readonly], html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .form-select:disabled {
  background-color: var(--haze-surface-2); color: var(--haze-muted); border-color: var(--haze-border);
}
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .form-control.is-invalid, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .form-select.is-invalid { border-color: var(--haze-danger) !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .form-control.is-valid, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .form-select.is-valid { border-color: var(--haze-success) !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .form-check-input:checked { background-color: var(--haze-primary) !important; border-color: var(--haze-primary) !important; }
html :is(.btn, .nav-link, .page-link, .dropdown-item, .mobile-toggle-menu, .toggle-icon):focus-visible,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dreams-module-list :is(a, button):focus-visible {
  outline: 2px solid var(--dreams-focus) !important; outline-offset: 3px; box-shadow: none !important;
}
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .nav-tabs .nav-link:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .nav-pills .nav-link:hover { color: var(--haze-primary); background: var(--haze-primary-soft) !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .nav-link.disabled { color: var(--haze-muted) !important; opacity: .5; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .table { --bs-table-bg: var(--haze-surface); --bs-table-color: var(--haze-text); --bs-table-striped-bg: var(--haze-info-soft); --bs-table-striped-color: var(--haze-text); --bs-table-hover-bg: var(--haze-info-soft); --bs-table-hover-color: var(--haze-heading); --bs-table-active-bg: var(--haze-primary-soft); --bs-table-active-color: var(--haze-text); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .table-striped > tbody > tr:nth-of-type(odd) > * { background: var(--haze-info-soft); color: var(--haze-text); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .table-hover > tbody > tr:hover > *, html table.dataTable tbody tr:hover > * { background: color-mix(in srgb, var(--haze-info) 12%, var(--haze-info-soft)); color: var(--haze-heading); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .select2-container--bootstrap-5 .select2-dropdown { background: var(--haze-surface); color: var(--haze-text); border-color: var(--haze-border-strong); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .select2-container--bootstrap-5 .select2-results__option--selected { background: var(--haze-primary-soft); color: var(--haze-primary); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .select2-container--bootstrap-5 .select2-results__option--highlighted { background: #0080FF !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .select2-container--bootstrap-5 .select2-results__option[aria-disabled="true"] { color: var(--haze-muted); opacity: .55; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-calendar, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-months .flatpickr-month, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-current-month .flatpickr-monthDropdown-months { background: var(--haze-surface); color: var(--haze-heading); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-weekday, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-day { color: var(--haze-text); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-day:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-day:focus { background: var(--haze-surface-3); border-color: var(--haze-border); color: var(--haze-heading); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-day.selected, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-day.selected:hover { background: #0080FF; border-color: #0080FF; color: #fff; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-day.flatpickr-disabled, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-day.prevMonthDay, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-day.nextMonthDay { color: var(--haze-muted); opacity: .5; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .flatpickr-months :is(.flatpickr-prev-month, .flatpickr-next-month) svg { fill: var(--haze-text); }
/* Avoid legacy green hover fills and rotated arrows in the navigation controls. */
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .mobile-toggle-menu:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .toggle-icon:hover,
html.dark-theme .sidebar-wrapper .toggle-icon:hover { background: var(--haze-primary-soft) !important; color: var(--haze-primary) !important; border-color: var(--haze-primary) !important; transform: none !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .toggle-icon, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .wrapper.toggled .sidebar-wrapper .toggle-icon { transform: none !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu li.mm-active > a:hover,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu li > a.active:hover,
html.dark-theme .sidebar-wrapper .metismenu li.mm-active > a:hover,
html.dark-theme .sidebar-wrapper .metismenu li > a.active:hover { background: var(--dreams-gradient) !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu ul li.mm-active > a:hover,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .sidebar-wrapper .metismenu ul li > a.active:hover,
html.dark-theme .sidebar-wrapper .metismenu ul li.mm-active > a:hover,
html.dark-theme .sidebar-wrapper .metismenu ul li > a.active:hover { background: var(--haze-primary-soft) !important; color: var(--haze-primary) !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dreams-module-list [aria-pressed="true"], html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dreams-module-list a[aria-current="page"] { box-shadow: inset 3px 0 var(--haze-primary); }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dreams-skip-link { background: #0080FF; color: #fff; }

html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-primary, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-primary:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-primary.active { background: var(--haze-primary, #0080FF) !important; border-color: var(--haze-primary, #0080FF) !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-primary:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-primary:focus-visible { background: var(--haze-primary-hover, #0066CC) !important; border-color: var(--haze-primary-hover, #0066CC) !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .bg-primary:not(.card) { background-color: var(--haze-primary, #0080FF) !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-primary { color: var(--haze-primary, var(--haze-text)); border-color: var(--haze-primary, var(--haze-border-strong)); background: transparent; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-primary:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-primary:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-primary.active { background: #0080FF !important; border-color: #0080FF !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn.bg-light-primary:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-light-primary:hover { background: #0080FF !important; color: #fff !important; border-color: #0080FF !important; }

html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-success, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-success:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-success.active { background: #137747 !important; border-color: #137747 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-success:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-success:focus-visible { background: #0e6038 !important; border-color: #0e6038 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .bg-success:not(.card) { background-color: #137747 !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-success { color: var(--haze-success, var(--haze-text)); border-color: var(--haze-success, var(--haze-border-strong)); background: transparent; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-success:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-success:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-success.active { background: #137747 !important; border-color: #137747 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn.bg-light-success:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-light-success:hover { background: #137747 !important; color: #fff !important; border-color: #137747 !important; }

html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-danger, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-danger:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-danger.active { background: #c6283d !important; border-color: #c6283d !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-danger:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-danger:focus-visible { background: #a31f32 !important; border-color: #a31f32 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .bg-danger:not(.card) { background-color: #c6283d !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-danger { color: var(--haze-danger, var(--haze-text)); border-color: var(--haze-danger, var(--haze-border-strong)); background: transparent; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-danger:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-danger:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-danger.active { background: #c6283d !important; border-color: #c6283d !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn.bg-light-danger:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-light-danger:hover { background: #c6283d !important; color: #fff !important; border-color: #c6283d !important; }

html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-warning, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-warning:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-warning.active { background: #f5b942 !important; border-color: #f5b942 !important; color: #241b08 !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-warning:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-warning:focus-visible { background: #dfa329 !important; border-color: #dfa329 !important; color: #241b08 !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .bg-warning:not(.card) { background-color: #f5b942 !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-warning { color: var(--haze-warning, var(--haze-text)); border-color: var(--haze-warning, var(--haze-border-strong)); background: transparent; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-warning:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-warning:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-warning.active { background: #f5b942 !important; border-color: #f5b942 !important; color: #241b08 !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn.bg-light-warning:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-light-warning:hover { background: #f5b942 !important; color: #241b08 !important; border-color: #f5b942 !important; }

html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-info, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-info:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-info.active { background: #08768c !important; border-color: #08768c !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-info:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-info:focus-visible { background: #065e70 !important; border-color: #065e70 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .bg-info:not(.card) { background-color: #08768c !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-info { color: var(--haze-info, var(--haze-text)); border-color: var(--haze-info, var(--haze-border-strong)); background: transparent; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-info:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-info:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-info.active { background: #08768c !important; border-color: #08768c !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn.bg-light-info:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-light-info:hover { background: #08768c !important; color: #fff !important; border-color: #08768c !important; }

html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-secondary, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-secondary:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-secondary.active { background: #596579 !important; border-color: #596579 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-secondary:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-secondary:focus-visible { background: #465164 !important; border-color: #465164 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .bg-secondary:not(.card) { background-color: #596579 !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-secondary { color: var(--haze-secondary, var(--haze-text)); border-color: var(--haze-secondary, var(--haze-border-strong)); background: transparent; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-secondary:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-secondary:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-secondary.active { background: #596579 !important; border-color: #596579 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn.bg-light-secondary:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-light-secondary:hover { background: #596579 !important; color: #fff !important; border-color: #596579 !important; }

html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-dark, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-dark:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-dark.active { background: #263043 !important; border-color: #263043 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-dark:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-dark:focus-visible { background: #161e2d !important; border-color: #161e2d !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .bg-dark:not(.card) { background-color: #263043 !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-dark { color: var(--haze-dark, var(--haze-text)); border-color: var(--haze-dark, var(--haze-border-strong)); background: transparent; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-dark:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-dark:active, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-outline-dark.active { background: #263043 !important; border-color: #263043 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn.bg-light-dark:hover, html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .btn-light-dark:hover { background: #263043 !important; color: #fff !important; border-color: #263043 !important; }
/* Selected pagination and controls keep a solid fill in either palette. */
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .page-item.active .page-link {
  background: #0080FF !important; border-color: #0080FF !important; color: #fff !important; box-shadow: none !important;
}
html .page-link { background: var(--haze-surface); color: var(--haze-primary); border-color: var(--haze-border); }
html .page-link:hover { background: var(--haze-primary-soft); color: var(--haze-primary); }
html .page-item.disabled .page-link { background: var(--haze-surface-2); color: var(--haze-muted); }
html .bg-light-secondary, html .bg-light-dark { background: var(--haze-surface-3) !important; color: var(--haze-text) !important; }
html .accordion-button { background: var(--haze-surface); color: var(--haze-heading); }
html .accordion-button:not(.collapsed) { background: var(--haze-primary-soft); color: var(--haze-primary); box-shadow: inset 0 -1px var(--haze-border); }
html .select2-container--bootstrap-5.select2-container--focus .select2-selection,
html .select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--haze-primary) !important; outline: 2px solid var(--dreams-focus); outline-offset: 2px;
}

/* Brand text stays readable on the theme's sidebar surface in every state. */
html .sidebar-wrapper .sidebar-header .logo-text,
html .sidebar-wrapper .sidebar-header .logo-text:hover,
html .sidebar-wrapper .sidebar-header .logo-text:focus,
html.dark-theme .sidebar-wrapper .sidebar-header .logo-text,
html.dark-theme .sidebar-wrapper .sidebar-header .logo-text:hover,
html.dark-theme .sidebar-wrapper .sidebar-header .logo-text:focus {
  color: var(--haze-heading) !important;
}
html .sidebar-wrapper .sidebar-header .logo-text span,
html .sidebar-wrapper .sidebar-header .logo-text:hover span { color: var(--haze-muted) !important; }

/* Form focus: match Select2 active border (primary + soft ring). */
html :is(.form-control, .form-select, .form-check-input, .picker__input):is(:focus, :focus-visible, :active),
html .dataTables_wrapper :is(input, select):focus,
html .select2-container--bootstrap-5:is(.select2-container--focus, .select2-container--open) .select2-selection,
html .select2-container--bootstrap-5 .select2-selection:focus-visible,
html .select2-container--bootstrap-5 .select2-search__field:focus {
  outline: none !important;
  border-width: 1px !important;
  border-color: var(--haze-primary) !important;
  box-shadow: 0 0 0 1px var(--haze-primary-soft) !important;
}
html .form-control.is-invalid:focus, html .form-select.is-invalid:focus { border-color: var(--haze-danger) !important; }
html .form-control.is-valid:focus, html .form-select.is-valid:focus { border-color: var(--haze-success) !important; }

