/* Nexlink-inspired visual adaptation for the existing Bootstrap 5 components.
 * Keep legacy variable names so page-specific styles inherit the same palette.
 */
:root, html.light-theme, html.semi-dark, html.minimal-theme {
  --haze-sidebar-bg: #fff;
  --haze-sidebar-text: #56566c;
  --haze-sidebar-active-bg: #f0eefb;
  --haze-bg: #fbfbfe;
  --haze-surface: #fff;
  --haze-surface-2: #fbfbfe;
  --haze-surface-3: #f0f1f5;
  --haze-border: #e4e4ec;
  --haze-border-strong: #b0b0c2;
  --haze-text: #56566c;
  --haze-heading: #18283b;
  --haze-muted: #737387;
  --haze-soft: #757d8a;
  --haze-primary: #6054ce;
  --haze-primary-hover: #4f43b6;
  --haze-primary-soft: #f0eefb;
  --haze-radius: 12px;
  --haze-control-radius: 8px;
  --haze-shadow-sm: 0 1px 3px rgb(17 24 39 / 3%);
  --dreams-gradient: linear-gradient(90deg, #6054ce 50%, #9485e8 100%);
  --dreams-focus: rgb(96 84 206 / 22%);
}
html.dark-theme {
  --haze-sidebar-bg: #171923;
  --haze-sidebar-text: #c6c0d0;
  --haze-sidebar-active-bg: #32304e;
  --haze-bg: #1b1d29;
  --haze-surface: #232634;
  --haze-surface-2: #2a2d3d;
  --haze-surface-3: #303448;
  --haze-border: rgba(255,255,255,.08);
  --haze-border-strong: rgba(255,255,255,.24);
  --haze-text: #d6d0df;
  --haze-heading: #f5f3f8;
  --haze-muted: #b0a6be;
  --haze-soft: #a399b0;
  --haze-primary: #b1a7ff;
  --haze-primary-hover: #c5bdff;
  --haze-primary-soft: #343050;
  --haze-toggle-bg: #2a2d3d;
  --haze-toggle-border: #555b73;
  --haze-toggle-bridge: #1b1d29;
  --haze-shadow-sm: 0 1px 3px rgb(0 0 0 / 12%);
}
html { --bs-primary-rgb: 96, 84, 206; }
html.dark-theme { --bs-primary-rgb: 177, 167, 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: #6054ce !important;
  border-color: #6054ce !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: #4f43b6 !important;
  border-color: #4f43b6 !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(--haze-surface-2) !important;
  color: var(--haze-muted) !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;
}
html.dark-theme .text-dark, html.dark-theme .text-body { color: var(--haze-heading) !important; }
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-bg) !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; }
/* Footer directly under content — kill fixed-bar + sticky-flex leftovers. */
.wrapper:has(> .page-wrapper):has(> .page-footer) {
  display: block;
  min-height: 0;
}
.page-wrapper {
  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;
  display: flex;
  align-items: center;
  clear: both;
  min-height: 52px;
  margin-left: calc(var(--haze-sidebar-width) + 12px);
  margin-top: 0;
  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: .75rem; }
.dreams-page-context { display: flex; align-items: center; gap: 8px; color: var(--haze-muted); font-size: .75rem; }
.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: #f5eaff !important; color: #6054ce !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.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: 13px !important; padding-bottom: 13px !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:
    radial-gradient(ellipse at 12% 18%, color-mix(in srgb, var(--haze-primary) 16%, transparent), transparent 55%),
    var(--haze-bg) !important;
}
.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: 64px module rail + 234px page panel. */
:root, html.light-theme, html.dark-theme, html.semi-dark, html.minimal-theme {
  --haze-sidebar-width: 298px;
  --haze-sidebar-collapsed: 64px;
}
.sidebar-wrapper.dreams-sidebar { display: flex; overflow: hidden; border-radius: 10px; }
.dreams-module-rail { width: 64px; flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; padding: 16px 10px 12px; border-right: 1px solid var(--haze-border); background: var(--haze-sidebar-bg); }
.dreams-rail-brand { display: block; margin-bottom: 24px; }
.dreams-module-list { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; overflow-y: auto; scrollbar-width: thin; flex: 1; }
.dreams-module-list button, .dreams-module-list a, .dreams-rail-theme {
  display: flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px;
  border: 1px solid transparent; background: transparent; color: var(--haze-sidebar-text); border-radius: 8px; font-size: 22px;
}
.dreams-module-list [aria-pressed="true"], .dreams-module-list a[aria-current="page"], .dreams-module-list button:hover, .dreams-module-list a:hover, .dreams-rail-theme:hover {
  color: var(--haze-primary); background: var(--haze-primary-soft); border-color: var(--haze-border);
}
.dreams-rail-theme { margin-top: 16px; }
.dreams-menu-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.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; }
.dreams-sidebar .sidebar-brand { padding-right: 22px; }
.dreams-sidebar .sidebar-header .logo-text { font-size: .94rem !important; font-weight: 600 !important; letter-spacing: -.01em; }
.dreams-sidebar .logo-text span { font-size: .7rem; font-weight: 400; color: var(--haze-muted); letter-spacing: 0; }
.dreams-menu-scroll { min-height: 0; flex: 1; overflow-y: auto; }
.dreams-sidebar #navigations { margin-top: 0 !important; padding: 0 12px 20px !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: #6054ce;
  --bs-body-color: var(--haze-text);
  --bs-body-bg: var(--haze-surface);
  --bs-border-color: var(--haze-border);
}
html.dark-theme { --dreams-focus: #c5acff; }
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: #6054ce; color: #fff; border-color: #6054ce; }
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, .dark-theme, .semi-dark, .minimal-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: #6054ce !important; border-color: #6054ce !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-surface-2); --bs-table-striped-color: var(--haze-text); --bs-table-hover-bg: var(--haze-surface-3); --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-surface-2); 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: var(--haze-surface-3); 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: #6054ce !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: #6054ce; border-color: #6054ce; 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: #6054ce; 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: #6054ce !important; border-color: #6054ce !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: #4f43b6 !important; border-color: #4f43b6 !important; color: #fff !important; }
html:is(.light-theme, .dark-theme, .semi-dark, .minimal-theme) .bg-primary:not(.card) { background-color: #6054ce !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: #6054ce !important; border-color: #6054ce !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: #6054ce !important; color: #fff !important; border-color: #6054ce !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: #6054ce !important; border-color: #6054ce !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; }

