/* ============================================
   MakanBang — Modern UI Component Styles
   ============================================
   Shared CSS for all pages.
   Loaded once via <x-mb.styles> component.
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  --mb-radius: 0.75rem;
  --mb-radius-sm: 0.5rem;
  --mb-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  --mb-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.08);
  --mb-border: #e0e3e8;
  --mb-bg-header: #edf0f5;
  --mb-text-muted: #4a4e69;
  --mb-text-heading: #181c32;
  --mb-text-sub: #6f7385; /* darkened for WCAG AA — 4.70:1 on #fff */
  --mb-stripe: #f5f7fa;
  --mb-primary: #2678c9;
  --mb-primary-light: rgba(38, 120, 201, 0.08);
  --mb-bg-card: #fff;
  --mb-bg-body: transparent;
  --mb-modal-header-bg: #fff;
  --mb-modal-header-border: #e0e3e8;
  /* Semantic status tokens — sourced from the table-row-variant accents/tints.
     Defined for reuse; the two live palettes are not rewired yet. */
  --mb-success: #22c55e;
  --mb-success-light: #f0fdf4;
  --mb-warning: #f59e0b;
  --mb-warning-light: #fffbeb;
  --mb-danger: #ef4444;
  --mb-danger-light: #fef2f2;
  --mb-info: #06b6d4;
  --mb-info-light: #ecfeff;
}

/* Dark mode tokens */
[data-bs-theme="dark"] {
  --mb-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  --mb-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.3);
  --mb-border: #3a3a4a;
  --mb-bg-header: #2a2a40;
  --mb-text-muted: #a0a0b0;
  --mb-text-heading: #ffffff;
  --mb-text-sub: #8a8aa0; /* lightened for WCAG AA — 4.87:1 on #1e1e2d */
  --mb-stripe: rgba(35, 35, 54, 0.6);
  --mb-primary-light: rgba(38, 120, 201, 0.15);
  --mb-bg-card: #1e1e2d;
  --mb-modal-header-bg: #1e1e2d;
  --mb-modal-header-border: #3a3a4a;
  /* Semantic status tokens — dark. Accent hues held constant; light tints use
     the table-row-variant dark alpha values. */
  --mb-success: #22c55e;
  --mb-success-light: rgba(34, 197, 94, 0.1);
  --mb-warning: #f59e0b;
  --mb-warning-light: rgba(245, 158, 11, 0.1);
  --mb-danger: #ef4444;
  --mb-danger-light: rgba(239, 68, 68, 0.12);
  --mb-info: #06b6d4;
  --mb-info-light: rgba(6, 182, 212, 0.1);
}

/* ---------- Section Card ---------- */
.mb-section-card {
  border: none;
  border-radius: var(--mb-radius);
  box-shadow: var(--mb-shadow);
  background: var(--mb-bg-card);
  transition: box-shadow 0.2s ease;
}
.mb-section-card .card-header {
  border-bottom: 1px solid var(--mb-border);
  background: transparent;
  border-radius: var(--mb-radius) var(--mb-radius) 0 0;
  padding: 1.25rem 1.5rem;
}
.mb-section-card .card-body {
  padding: 1.5rem;
}

/* ---------- Page Header ---------- */
.mb-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
/* page-title & page-subtitle classes are defined globally in mb-overrides.css */

/* ---------- Font Hierarchy ---------- */
/*
   Level 1: .page-title         — 28px/700 (page header, defined in mb-overrides.css)
   Level 2: .page-subtitle      — 16px/500 (page description, defined in mb-overrides.css)
   Level 3: .mb-section-title   — 18px/700 (card/section headers)
   Level 4: .mb-body-text       — 14px/400 (body text, table cells)
   Level 5: .mb-caption         — 12px/500 (labels, captions, KPI labels)
   Level 6: .mb-micro           — 11px/400 (footnotes, helper text)
*/
.mb-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--mb-text-heading);
  margin: 0;
}
.mb-body-text {
  font-size: 14px;
  color: var(--mb-text-heading);
}
.mb-caption {
  font-size: 12px;
  font-weight: 500;
  color: var(--mb-text-muted);
}
.mb-micro {
  font-size: 11px;
  color: var(--mb-text-sub);
}
/* .mb-page-header__help lives with the page-header block further down (it was
   declared twice with identical specificity; the later rule won, so the earlier
   copy was removed rather than left as dead weight). */
.mb-page-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ---------- Modern Table ---------- */
.mb-table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.mb-table-modern thead {
  background-color: var(--mb-bg-header);
}
.mb-table-modern thead th {
  color: var(--mb-text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
  border-bottom: 2px solid var(--mb-border);
  padding: 0.9rem 0.75rem;
  /* Keep headers visible while scrolling tall lists. The th needs its own
     opaque bg (the thead's bg does not travel with a sticky child), so rows
     never show through. */
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: var(--mb-bg-header);
}
/* Several server-side DataTables tag secondary columns with
   `columns.className: 'text-muted'` to de-emphasize their VALUES. DataTables
   copies that class onto the header <th> too, and Bootstrap's `.text-muted`
   (an !important utility) then greys the label — so the column reads as
   disabled. The body cells are already pinned to --mb-text-heading above, so
   the class has no data-side effect anyway; keep the header at the normal
   heading colour (theme-adaptive via the token). */
.mb-table-modern thead th.text-muted {
  color: var(--mb-text-muted) !important;
}

/* Charts (x-mb.chart) run with responsive:true + maintainAspectRatio:false, so
   each canvas sizes to its PARENT's height. .mb-chart-wrap had none, so every
   chart collapsed to ~0 — worst inside a hidden tab pane, where it never
   recovers on tab switch. Give the wrapper a responsive height (a page can
   override per-chart with higher specificity). */
.mb-chart-wrap {
  position: relative;
  height: clamp(240px, 42vw, 340px);
}
/* Striping: even rows get subtle bg, odd rows stay white — avoids clash with header color */
.mb-table-modern.table-striped > tbody > tr:nth-of-type(even) > * {
  background-color: var(--mb-stripe);
}
.mb-table-modern.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: transparent;
}
.mb-table-modern tbody td {
  padding: 0.7rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--mb-border);
  font-size: 13px;
  color: var(--mb-text-heading) !important;
}
.mb-table-modern tbody td:first-child,
.mb-table-modern thead th:first-child {
  padding-left: 1.25rem;
}
.mb-table-modern tbody td:last-child,
.mb-table-modern thead th:last-child {
  padding-right: 1.25rem;
}
/* Subtle left/right border for better cell separation & readability */
.mb-table-modern tbody td:not(:last-child) {
  border-right: 1px solid var(--mb-border);
}
.mb-table-modern thead th:not(:last-child) {
  border-right: 1px solid var(--mb-border);
}
.mb-table-modern tfoot td,
.mb-table-modern tfoot th {
  font-weight: 600;
  background-color: var(--mb-bg-header);
  color: var(--mb-text-heading) !important;
  border-top: 2px solid var(--mb-border);
}
.mb-table-modern tfoot td:first-child,
.mb-table-modern tfoot th:first-child {
  padding-left: 1.25rem;
}
.mb-table-modern tfoot td:last-child,
.mb-table-modern tfoot th:last-child {
  padding-right: 1.25rem;
}
/* Outer border for the whole table */
.mb-table-modern {
  border: 1px solid var(--mb-border);
  border-radius: var(--mb-radius-sm);
  overflow: hidden;
}

/* ==========================================================================
   Bootstrap table-* row variants — Light & Dark mode
   ==========================================================================
   Strategy: subtle background tint + left accent border for visual scanning.
   Text stays default (--mb-text-heading) so numbers & links remain readable.
   Override Bootstrap CSS variables AND direct properties to beat Metronic.
   ========================================================================== */

/* --- Shared: left accent via box-shadow on first cell --- */
.mb-table-modern tbody tr.table-success td:first-child {
  box-shadow: inset 3px 0 0 var(--mb-success);
}
.mb-table-modern tbody tr.table-warning td:first-child {
  box-shadow: inset 3px 0 0 var(--mb-warning);
}
.mb-table-modern tbody tr.table-danger td:first-child {
  box-shadow: inset 3px 0 0 var(--mb-danger);
}
.mb-table-modern tbody tr.table-info td:first-child {
  box-shadow: inset 3px 0 0 var(--mb-info);
}
.mb-table-modern tbody tr.table-primary td:first-child {
  box-shadow: inset 3px 0 0 var(--mb-primary);
}

/* --- LIGHT MODE --- */
/* Success (aman) */
.mb-table-modern tbody tr.table-success {
  --bs-table-bg: var(--mb-success-light);
  --bs-table-color: var(--mb-text-heading);
  --bs-table-striped-bg: #ecfce8;
  --bs-table-striped-color: var(--mb-text-heading);
}
.mb-table-modern tbody tr.table-success > td {
  background-color: var(--mb-success-light) !important;
  color: var(--mb-text-heading) !important;
}
/* Warning (hampir habis) */
.mb-table-modern tbody tr.table-warning {
  --bs-table-bg: var(--mb-warning-light);
  --bs-table-color: var(--mb-text-heading);
  --bs-table-striped-bg: #fef7e0;
  --bs-table-striped-color: var(--mb-text-heading);
}
.mb-table-modern tbody tr.table-warning > td {
  background-color: var(--mb-warning-light) !important;
  color: var(--mb-text-heading) !important;
}
/* Danger (kritis) */
.mb-table-modern tbody tr.table-danger {
  --bs-table-bg: var(--mb-danger-light);
  --bs-table-color: var(--mb-text-heading);
  --bs-table-striped-bg: #fee8e8;
  --bs-table-striped-color: var(--mb-text-heading);
}
.mb-table-modern tbody tr.table-danger > td {
  background-color: var(--mb-danger-light) !important;
  color: var(--mb-text-heading) !important;
}
/* Info */
.mb-table-modern tbody tr.table-info {
  --bs-table-bg: var(--mb-info-light);
  --bs-table-color: var(--mb-text-heading);
  --bs-table-striped-bg: #e4fbfc;
  --bs-table-striped-color: var(--mb-text-heading);
}
.mb-table-modern tbody tr.table-info > td {
  background-color: var(--mb-info-light) !important;
  color: var(--mb-text-heading) !important;
}
/* Primary */
.mb-table-modern tbody tr.table-primary {
  --bs-table-bg: #eff6ff;
  --bs-table-color: var(--mb-text-heading);
  --bs-table-striped-bg: #e8f1fd;
  --bs-table-striped-color: var(--mb-text-heading);
}
.mb-table-modern tbody tr.table-primary > td {
  background-color: #eff6ff !important;
  color: var(--mb-text-heading) !important;
}

/* --- DARK MODE --- */
[data-bs-theme="dark"] .mb-table-modern tbody tr.table-success {
  --bs-table-bg: var(--mb-success-light);
  --bs-table-color: var(--mb-text-heading);
  --bs-table-striped-bg: rgba(34, 197, 94, 0.14);
  --bs-table-striped-color: var(--mb-text-heading);
}
[data-bs-theme="dark"] .mb-table-modern tbody tr.table-success > td {
  background-color: var(--mb-success-light) !important;
  color: var(--mb-text-heading) !important;
}
[data-bs-theme="dark"] .mb-table-modern tbody tr.table-warning {
  --bs-table-bg: var(--mb-warning-light);
  --bs-table-color: var(--mb-text-heading);
  --bs-table-striped-bg: rgba(245, 158, 11, 0.14);
  --bs-table-striped-color: var(--mb-text-heading);
}
[data-bs-theme="dark"] .mb-table-modern tbody tr.table-warning > td {
  background-color: var(--mb-warning-light) !important;
  color: var(--mb-text-heading) !important;
}
[data-bs-theme="dark"] .mb-table-modern tbody tr.table-danger {
  --bs-table-bg: var(--mb-danger-light);
  --bs-table-color: var(--mb-text-heading);
  --bs-table-striped-bg: rgba(239, 68, 68, 0.16);
  --bs-table-striped-color: var(--mb-text-heading);
}
[data-bs-theme="dark"] .mb-table-modern tbody tr.table-danger > td {
  background-color: var(--mb-danger-light) !important;
  color: var(--mb-text-heading) !important;
}
[data-bs-theme="dark"] .mb-table-modern tbody tr.table-info {
  --bs-table-bg: var(--mb-info-light);
  --bs-table-color: var(--mb-text-heading);
  --bs-table-striped-bg: rgba(6, 182, 212, 0.14);
  --bs-table-striped-color: var(--mb-text-heading);
}
[data-bs-theme="dark"] .mb-table-modern tbody tr.table-info > td {
  background-color: var(--mb-info-light) !important;
  color: var(--mb-text-heading) !important;
}
[data-bs-theme="dark"] .mb-table-modern tbody tr.table-primary {
  --bs-table-bg: rgba(38, 120, 201, 0.12);
  --bs-table-color: var(--mb-text-heading);
  --bs-table-striped-bg: rgba(38, 120, 201, 0.16);
  --bs-table-striped-color: var(--mb-text-heading);
}
[data-bs-theme="dark"] .mb-table-modern tbody tr.table-primary > td {
  background-color: rgba(38, 120, 201, 0.12) !important;
  color: var(--mb-text-heading) !important;
}

/* Links inside colored rows inherit text color for readability */
.mb-table-modern tbody tr[class*="table-"] a {
  color: inherit !important;
}

/* Generic fallback for tables without mb-table-modern */
[data-bs-theme="dark"] .table-danger > * {
  background-color: var(--mb-danger-light) !important;
  color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .table-warning > * {
  background-color: var(--mb-warning-light) !important;
  color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .table-success > * {
  background-color: var(--mb-success-light) !important;
  color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .table-info > * {
  background-color: var(--mb-info-light) !important;
  color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .table-primary > * {
  background-color: rgba(38, 120, 201, 0.12) !important;
  color: #e0e0e0 !important;
}

/* link-dark dark mode fix */
[data-bs-theme="dark"] .link-dark {
  color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .link-dark:hover {
  color: #fff !important;
}

/* ---------- Modal ---------- */
.mb-modal .modal-content {
  border: none;
  border-radius: var(--mb-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
.mb-modal .modal-header {
  background: linear-gradient(
    135deg,
    rgba(38, 120, 201, 0.12) 0%,
    transparent 60%
  );
  border-bottom: 1px solid var(--mb-border);
  padding: 1.35rem 1.75rem;
}
[data-bs-theme="dark"] .mb-modal .modal-header {
  background: linear-gradient(
    135deg,
    rgba(38, 120, 201, 0.18) 0%,
    transparent 60%
  );
}
.mb-modal .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--mb-text-heading);
  line-height: 1.3;
}
.mb-modal .modal-subtitle {
  font-size: 0.85rem;
  color: var(--mb-text-muted);
  margin-top: 0.2rem;
  font-weight: 400;
}
.mb-modal .modal-body {
  padding: 1.25rem 1.75rem;
}
.mb-modal .modal-footer {
  border-top: 1px solid var(--mb-border);
  padding: 1rem 1.75rem;
  background: var(--mb-bg-card);
}
.mb-modal .btn-close-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--mb-text-sub);
  transition: all 0.15s ease;
  cursor: pointer;
  font-size: 1rem;
}
.mb-modal .btn-close-modal:hover {
  background: var(--mb-bg-header);
  color: var(--mb-text-heading);
}
[data-bs-theme="dark"] .mb-modal .btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* Fix: select2 multiple disabled overflow in modal */
.select2-container--disabled .select2-selection--multiple {
  max-height: 120px;
  overflow-y: auto !important;
}

/* ---------- Filter Badges ---------- */
.mb-filter-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.mb-filter-badges:empty {
  display: none;
}
.mb-filter-badges .badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  border-radius: 2rem;
}

/* ---------- DataTable Empty State (zeroRecords) ---------- */
.mb-table-modern .dataTables_empty {
  padding: 2rem 1rem !important;
  text-align: center;
  border-right: none !important;
}
.mb-table-modern .dataTables_empty img {
  max-width: 140px;
  opacity: 0.7;
  margin-bottom: 0.75rem;
}
.mb-table-modern .dataTables_empty p {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--mb-text-sub);
  margin: 0;
}

/* ---------- Empty State ---------- */
.mb-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}
.mb-empty-state__icon {
  font-size: 3.5rem;
  color: var(--mb-text-sub);
  margin-bottom: 1rem;
  opacity: 0.6;
}
/* Metronic's style.bundle.css sets a bare `i{font-size:1rem}` rule — a direct
   match on the icon element itself beats the inherited 3.5rem from its parent
   (inheritance always loses to any directly-matching rule, regardless of
   specificity), shrinking the icon back down to 1rem. Force it back explicitly. */
.mb-empty-state__icon i {
  font-size: inherit;
}
.mb-empty-state__message {
  font-size: 0.9rem;
  color: var(--mb-text-muted);
  font-weight: 500;
}

/* ---------- Segmented Toggle (e.g. Aktif/Nonaktif) ---------- */
.mb-segmented {
  display: inline-flex;
  background: var(--mb-bg-header);
  border-radius: var(--mb-radius-sm);
  padding: 0.25rem;
  gap: 0.25rem;
}
.mb-segmented__item {
  padding: 0.4rem 1.1rem;
  border-radius: calc(var(--mb-radius-sm) - 0.15rem);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--mb-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.mb-segmented__item:hover {
  color: var(--mb-text-heading);
  text-decoration: none;
}
.mb-segmented__item.active {
  background: var(--mb-bg-card);
  color: var(--mb-primary);
  box-shadow: var(--mb-shadow);
}

/* ---------- Date Range ---------- */
.mb-date-range {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}
.mb-date-range > div {
  flex: 1;
}
.mb-date-range .form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mb-text-muted);
  margin-bottom: 0.35rem;
}

/* ---------- KPI Card (from Dashboard PR) ---------- */
.mb-kpi-card {
  border: none;
  border-radius: var(--mb-radius);
  box-shadow: var(--mb-shadow);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  overflow: hidden;
  position: relative;
  background: var(--mb-bg-card);
}
.mb-kpi-card:hover {
  box-shadow: var(--mb-shadow-hover);
  transform: translateY(-2px);
}
.mb-kpi-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.mb-kpi-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--mb-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ---------- Nav Pills (Tab Toggle) ---------- */
.mb-nav-pills .nav-link {
  border-radius: var(--mb-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--mb-text-muted);
  background: var(--mb-bg-card);
  border: 1.5px solid var(--mb-border);
  padding: 0.55rem 1.4rem;
  transition: all 0.15s ease;
  cursor: pointer;
  position: relative;
}
.mb-nav-pills .nav-link.active {
  color: #fff;
  background-color: var(--mb-primary);
  border-color: var(--mb-primary);
  box-shadow: 0 2px 8px rgba(38, 120, 201, 0.25);
}
.mb-nav-pills .nav-link:not(.active) {
  color: var(--mb-text-muted);
  background: var(--mb-bg-card);
}
.mb-nav-pills .nav-link:not(.active):hover {
  color: var(--mb-primary);
  border-color: var(--mb-primary);
  background: var(--mb-primary-light);
  transform: translateY(-1px);
}
/* Fix: when .btn class is also present, Bootstrap/Metronic resets via CSS vars — override everything */
.mb-nav-pills .nav-link.btn,
.mb-nav-pills .nav-link.btn:focus,
.mb-nav-pills .nav-link.btn:active:not(.active) {
  border: 1.5px solid var(--mb-border) !important;
  background: var(--mb-bg-card) !important;
  background-color: var(--mb-bg-card) !important;
  color: var(--mb-text-muted) !important;
  font-weight: 600;
  --bs-btn-bg: var(--mb-bg-card);
  --bs-btn-active-bg: var(--mb-bg-card);
  --bs-btn-hover-bg: var(--mb-bg-card);
  --bs-btn-color: var(--mb-text-muted);
  --bs-btn-active-color: var(--mb-text-muted);
  --bs-btn-hover-color: var(--mb-text-muted);
  --bs-btn-border-color: var(--mb-border);
  --bs-btn-active-border-color: var(--mb-border);
  --bs-btn-hover-border-color: var(--mb-border);
}
.mb-nav-pills .nav-link.btn.active,
.mb-nav-pills .nav-link.btn.active:focus,
.mb-nav-pills .nav-link.btn.active:active {
  color: #fff !important;
  background: var(--mb-primary) !important;
  background-color: var(--mb-primary) !important;
  border-color: var(--mb-primary) !important;
  box-shadow: 0 2px 8px rgba(38, 120, 201, 0.25);
  --bs-btn-bg: var(--mb-primary);
  --bs-btn-active-bg: var(--mb-primary);
  --bs-btn-color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-border-color: var(--mb-primary);
  --bs-btn-active-border-color: var(--mb-primary);
}
.mb-nav-pills .nav-link.btn:not(.active):hover {
  color: var(--mb-primary) !important;
  border-color: var(--mb-primary) !important;
  background: var(--mb-primary-light) !important;
  background-color: var(--mb-primary-light) !important;
  --bs-btn-hover-bg: var(--mb-primary-light);
  --bs-btn-hover-color: var(--mb-primary);
  --bs-btn-hover-border-color: var(--mb-primary);
  transform: translateY(-1px);
}

/* ---------- Utility: Transitions ---------- */
.mb-transition {
  transition: all 0.2s ease;
}

/* ---------- Tablet Responsive ---------- */
@media (max-width: 991.98px) {
  /* Table: scale down for tablet */
  .mb-table-modern tbody td {
    font-size: 12px;
    padding: 0.55rem 0.5rem;
  }
  .mb-table-modern thead th {
    font-size: 12px !important;
    padding: 0.65rem 0.5rem !important;
  }
  .mb-table-modern tbody td:first-child,
  .mb-table-modern thead th:first-child {
    padding-left: 0.75rem;
  }
  .mb-table-modern tbody td:last-child,
  .mb-table-modern thead th:last-child {
    padding-right: 0.75rem;
  }
  /* Nav pills wrap */
  .mb-nav-pills {
    flex-wrap: wrap;
  }
  .mb-nav-pills .nav-link {
    font-size: 0.78rem;
    padding: 0.4rem 0.85rem;
  }
  /* Filter badges smaller */
  .mb-filter-badges .badge {
    font-size: 0.7rem;
  }
  /* Section card breathing room */
  .mb-section-card .card-body {
    padding: 1rem;
  }
  /* KPI cards compact */
  .mb-kpi-card .card-body {
    padding: 0.75rem 1rem;
  }
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 767.98px) {
  .mb-section-card .card-body {
    padding: 1rem;
  }
  .mb-modal .modal-body {
    padding: 1rem;
  }
  .mb-modal .modal-header {
    padding: 0.85rem 1rem;
  }
  .mb-modal .modal-footer {
    padding: 0.75rem 1rem;
  }
  .mb-date-range {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }
  /* Font hierarchy scales down on mobile */
  .mb-section-title {
    font-size: 15px;
  }
  .mb-body-text {
    font-size: 13px;
  }
  .mb-caption {
    font-size: 11px;
  }
  .mb-micro {
    font-size: 10px;
  }
  /* Table: even smaller on phone */
  .mb-table-modern tbody td {
    font-size: 11px;
    padding: 0.45rem 0.4rem;
  }
  .mb-table-modern thead th {
    font-size: 11px !important;
    padding: 0.5rem 0.4rem !important;
  }
}

/* ==========================================================================
   FILTER SYSTEM
   Berlaku global di semua halaman yang menggunakan x-mb.page-header
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page Header — separator visual dari konten di bawah
   -------------------------------------------------------------------------- */
.mb-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 0 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--mb-border, #e0e3e8);
  transition: border-color 0.2s ease;
}

.mb-page-header .page-title {
  /* font-size: 1.25rem; */
  font-weight: 700;
  margin: 0;
  color: var(--mb-text-heading);
  line-height: 1.3;
}

.mb-page-header .page-subtitle {
  font-size: 0.85rem;
  color: var(--mb-text-muted, #4a4e69);
  margin-top: 0.15rem;
}

.mb-page-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  align-self: flex-start;  /* jangan stretch saat wrap ke baris baru di mobile */
}

/* The per-page help "?" next to a page title. It used to sit flat and muted,
   which made it read as decoration and disappear next to the heading. It now
   carries a resting tinted disc so it reads as a control at a glance, and
   strengthens to solid primary on hover/focus. */
.mb-page-header__help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
  color: var(--mb-primary, #2678c9);
  background-color: var(--mb-primary-light, rgba(38, 120, 201, 0.08));
  border-radius: 50%;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
  font-size: 0.8rem;
  line-height: 1;
}
.mb-page-header__help:hover,
.mb-page-header__help:focus-visible {
  color: #fff;
  background-color: var(--mb-primary, #2678c9);
}
.mb-page-header__help:focus-visible {
  outline: 2px solid var(--mb-primary, #2678c9);
  outline-offset: 2px;
}
/* When the KB help "?" is rendered as a <button> (x-mb.help-button inline,
   next to the page title) strip the user-agent button chrome so it reads as
   the same disc as the helpUrl "?" link. Sizing/colour inherited above. */
button.mb-page-header__help {
  padding: 0;
  border: 0;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
/* Phone/tablet: meet the >= 40px tappable-target floor used elsewhere in this
   file without inflating the desktop header. */
@media (max-width: 767.98px) {
  .mb-page-header__help {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.9rem;
  }
}

/* --------------------------------------------------------------------------
   Inline list-page filters (x-mb.search-filter-bar) — the space-minimal
   replacement for the retired filter-MODAL button. For a few filters the
   control cluster is injected INTO the DataTable toolbar row (next to the
   "Show N entries" length menu); for many filters a compact "Filter" button
   opens an anchored dropdown that floats over the page (no backdrop, no
   reflow). Active filters show as removable chips (see Filter Badges below).
   -------------------------------------------------------------------------- */
.mb-inline-filters {
  row-gap: 0.4rem;
}
.mb-inline-filters .form-label,
.mb-filter__panel .form-label {
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bs-secondary-color, #6c757d);
}

/* The DataTable length col once a filter cluster has been injected beside the
   length menu: keep length + filters inline, wrapping on narrow screens. */
.mb-dt-toolbar-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.mb-dt-toolbar-filters .dataTables_length {
  margin-bottom: 0;
}

/* A Select2-upgraded toolbar filter keeps a sensible, non-stretching width. */
.mb-inline-filters .select2-container,
.mb-inline-filters .form-select-sm,
.mb-inline-filters .form-control-sm {
  min-width: 150px;
  width: auto;
}

/* Compact anchored "Filter" dropdown (mode="popover"). */
.mb-filter__toggle {
  display: inline-flex;
  align-items: center;
}
.mb-filter__toggle .mb-filter__count {
  background: var(--mb-primary, #2678c9);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
}
.mb-filter__panel {
  min-width: 260px;
  max-width: min(92vw, 360px);
  border-radius: 0.6rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
[data-bs-theme="dark"] .mb-filter__panel {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

/* Mobile: filter controls go full-width in the wrapped toolbar column. */
@media (max-width: 578px) {
  .mb-inline-filters .form-select-sm,
  .mb-inline-filters .form-control-sm,
  .mb-inline-filters .select2-container {
    min-width: 0;
    width: 100%;
  }
}


/* --------------------------------------------------------------------------
   Filter Badges — pill animasi, container yang tidak collapse
   -------------------------------------------------------------------------- */
.mb-filter-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  min-height: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Animasi masuk untuk badge yang muncul; warna brand-biru lembut (chip filter). */
.mb-filter-badges .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--mb-primary, #2678c9);
  background: rgba(38, 120, 201, 0.10);
  border: 1px solid rgba(38, 120, 201, 0.20);
  transition: opacity 0.15s ease, transform 0.15s ease;
  animation: badgeFadeIn 0.2s ease both;
}

@keyframes badgeFadeIn {
  from { opacity: 0; transform: scale(0.8) translateY(-4px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Badge keluar: kelas .removing bisa ditambahkan via JS sebelum d-none */
.mb-filter-badges .badge.removing {
  animation: badgeFadeOut 0.18s ease both;
}

@keyframes badgeFadeOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.8); }
}

/* Tombol × pada badge — reset chrome tombol native, warisi warna chip. */
.mb-filter-badges .badge .badge-remove {
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.15s ease;
  margin-left: 0.1rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
}
.mb-filter-badges .badge .badge-remove:hover {
  opacity: 1;
}

/* Dark mode: filter badges */
[data-bs-theme="dark"] .mb-filter-badges .badge {
  color: #a9cef1;
  background: rgba(38, 120, 201, 0.18);
  border-color: rgba(38, 120, 201, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .mb-page-header {
  border-bottom-color: var(--mb-border, #3a3a4a);
}

[data-bs-theme="dark"] .mb-page-header .page-title {
  color: var(--mb-text-heading);
}

/* ---------- Timeline (x-mb.timeline / x-mb.timeline-item) ---------- */
.mb-timeline {
  position: relative;
  padding-left: 28px;
}
.mb-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--mb-border, #e0e3e8);
}
.mb-timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}
.mb-timeline-item:last-child {
  padding-bottom: 0;
}
.mb-timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff;
}
[data-bs-theme="dark"] .mb-timeline-dot {
  box-shadow: 0 0 0 3px #1e1e2d;
}
.mb-timeline-time {
  font-size: 0.8rem;
  color: #99a1b7;
  margin-bottom: 0.15rem;
}

/* ---------- Stepper (x-mb.stepper) ---------- */
.mb-stepper {
  display: flex;
  align-items: flex-start;
}
.mb-stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  text-align: center;
}
.mb-stepper-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--mb-border, #e0e3e8);
  z-index: 0;
}
.mb-stepper-item.is-done:not(:last-child)::after {
  background: #17c653;
}
.mb-stepper-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mb-border, #e0e3e8);
  color: #99a1b7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}
.mb-stepper-item.is-active .mb-stepper-circle {
  background: #009ef7;
  color: #fff;
}
.mb-stepper-item.is-done .mb-stepper-circle {
  background: #17c653;
  color: #fff;
}
.mb-stepper-label {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #99a1b7;
}
.mb-stepper-item.is-active .mb-stepper-label {
  color: #181c32;
  font-weight: 600;
}
[data-bs-theme="dark"] .mb-stepper-item.is-active .mb-stepper-label {
  color: #ffffff;
}

/* ---------- Form Section (x-mb.form-section) ---------- */
.mb-form-section {
  margin-bottom: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--mb-border);
}
.mb-form-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.mb-form-section-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.mb-form-section-icon {
  font-size: 1rem;
  color: var(--mb-primary);
  margin-top: 0.15rem;
}
.mb-form-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mb-text-heading);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mb-form-section-desc {
  font-size: 0.8rem;
  color: var(--mb-text-sub);
  margin-top: 0.1rem;
}

/* ---------- Switch List ---------- */
.mb-switch-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.mb-switch-list .form-check.form-switch {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-left: 0;
  margin: 0;
}
.mb-switch-list .form-check.form-switch .form-check-input {
  margin-left: 0;
  flex-shrink: 0;
}
.mb-switch-row-label {
  display: block;
  font-weight: 600;
  color: var(--mb-text-heading);
}
.mb-switch-row-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--mb-text-sub);
  margin-top: 0.1rem;
}

/* ---------- File Input (restyle native ::file-selector-button) ---------- */
.form-control[type="file"]::file-selector-button {
  margin: -0.55rem -0.75rem;
  margin-inline-end: 0.75rem;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-inline-end: 1px solid var(--mb-border);
  border-radius: var(--mb-radius-sm) 0 0 var(--mb-radius-sm);
  background: var(--mb-bg-header);
  color: var(--mb-text-muted);
  font-weight: 500;
  transition: background 0.15s ease;
}
.form-control[type="file"]::file-selector-button:hover {
  background: var(--mb-stripe);
}

/* ---------- DataTables processing overlay ----------
   Default DataTables just floats plain text in the middle of the table —
   replace with a full-table semi-transparent overlay + spinner (spinner
   HTML supplied via language.processing, see examples/list*.blade.php).
   Requires the table's wrapper to be position:relative (set below) so the
   overlay covers only the table, not the whole page. */
.table-responsive {
  position: relative;
}
div.dataTables_processing {
  /* DataTables toggles this element's display (block/none) via inline
     style — don't fight that with `display: flex` here (an !important
     would also force it to stay visible when DataTables hides it).
     Center the spinner via the child wrapper below instead. */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.75);
  z-index: 10;
}
div.dataTables_processing > div {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
[data-bs-theme="dark"] div.dataTables_processing {
  background: rgba(30, 30, 45, 0.75);
}

/* ==========================================================================
   RESPONSIVE FOUNDATION (shared)
   Always loaded (public/css, via asset_v in head.blade.php) so it applies with
   or without a Vite build. Layers on top of Metronic's Bootstrap-5 breakpoints
   and its already-wired KTDrawer aside. Mobile-first intent: relax / scroll
   wide UI on small screens, and never let anything overflow the page body
   horizontally. Breakpoints mirror Bootstrap: lg = 992px, md = 768px,
   sm = 576px.
   ========================================================================== */

/* ---- Horizontal-overflow safety ------------------------------------------
   The shell is a flex row (.page > #kt_wrapper.mb-app-wrapper). A flex item
   defaults to min-width:auto, so a wide child (e.g. a data table) can force the
   wrapper — and the whole page body — wider than the viewport. Letting these
   containers shrink means wide content scrolls inside its OWN container
   (.table-responsive) instead of the page. */
.page,
.mb-app-wrapper,
.mb-app-wrapper .content,
.mb-app-wrapper .container,
.mb-app-wrapper .container-fluid,
.mb-app-wrapper .container-xxl {
  min-width: 0;
}
.mb-app-wrapper {
  max-width: 100%;
}
/* Wide content scrolls inside its own container, with momentum on iOS. */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

/* ---- Tab strips: scroll horizontally on narrow screens -------------------
   x-mb.nav-tabs wraps its <ul.nav-tabs> in .mb-nav-tabs__scroll. Force a single
   row that scrolls instead of wrapping/overflowing (the report / payment / kas
   / transfer hubs rely on this). Thin, unobtrusive scrollbar. */
.mb-nav-tabs__scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
/* Hub tabs: a clean line/underline strip (active = primary text + underline).
   Rules live at .mb-nav-tabs__scroll > .nav depth so they beat Metronic's
   .nav-line-tabs and the raw <button> UA defaults (grey bg, no padding). */
.mb-nav-tabs__scroll > .nav {
  flex-wrap: nowrap;
  min-width: 100%;
  border-bottom: 1px solid var(--mb-border);
}
.mb-nav-tabs__scroll > .nav .nav-link {
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--mb-text-sub);
  font-weight: 600;
  padding: 0.7rem 1.15rem;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.mb-nav-tabs__scroll > .nav .nav-link:hover {
  color: var(--mb-text-muted);
}
.mb-nav-tabs__scroll > .nav .nav-link.active {
  color: var(--mb-primary);
  background: transparent;
  border-bottom-color: var(--mb-primary);
}
.mb-nav-tabs__scroll::-webkit-scrollbar {
  height: 4px;
}
.mb-nav-tabs__scroll::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
}
[data-bs-theme="dark"] .mb-nav-tabs__scroll::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.22);
}

/* ---- Phone modals: true full-screen sheet --------------------------------
   x-mb.modal carries .modal-fullscreen-sm-down, so on phones the dialog fills
   the viewport and the body scrolls (never taller than the viewport). Drop the
   custom rounded corners / border in that state so it reads as a real sheet.
   Stacked quick-create modals inherit the same treatment and still stack (their
   z-index is lifted in scripts.blade.php). */
@media (max-width: 575.98px) {
  .mb-modal .modal-fullscreen-sm-down .modal-content {
    border-radius: 0;
    border: 0;
    min-height: 100%;
  }
}

/* ---- Touch targets (>= 44px on mobile) -----------------------------------
   Give tappable navbar controls a comfortable hit area across the phone/tablet
   (drawer) range, and table action buttons the same on phone. 44px is the WCAG
   2.5.5 (AAA) / 2.5.8 (AA, 24px) comfortable target size. min-* wins over
   Metronic's fixed w-30px/h-30px utilities without touching desktop density. */
@media (max-width: 991.98px) {
  #kt_header .btn-icon,
  #kt_header .symbol {
    min-width: 44px;
    min-height: 44px;
  }
}
@media (max-width: 767.98px) {
  .mb-table-modern td .btn {
    min-height: 44px;
  }
  /* .btn-icon is also a .btn, so it inherits the 44px min-height above;
     pin the width to match for a full 44x44 icon-button hit area. */
  .mb-table-modern td .btn-icon {
    min-width: 44px;
  }
}

/* ==========================================================================
   REDUCED MOTION (prefers-reduced-motion: reduce) — WCAG 2.3.3
   ==========================================================================
   Users who opt out of motion get a static UI. Two parts:
   1) Near-instant animations/transitions on every element, so nothing slides,
      fades, or crossfades — this also flattens the light <-> dark theme colour
      transition (border/background/color easing) into an instant swap.
   2) Duration alone does not stop a transform-based hover "lift": the transform
      still applies, just without easing, so the element would still jump. Zero
      the transforms on the house hover-lifts (KPI cards, nav pills) and the
      filter-badge enter/exit so nothing moves at all.
   Applies in both light and dark (the query is theme-independent). Additive:
   only affects visitors whose OS reports reduce.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Hover lifts / crossfades — hold position, no translate. */
  .mb-kpi-card:hover,
  .mb-nav-pills .nav-link:not(.active):hover,
  .mb-nav-pills .nav-link.btn:not(.active):hover {
    transform: none !important;
  }
  /* Filter badges: no scale/translate entrance or exit. */
  .mb-filter-badges .badge,
  .mb-filter-badges .badge.removing {
    animation: none !important;
    transform: none !important;
  }
}

/* ============================================================================
   Onboarding checklist (x-mb.onboarding-checklist)
   ============================================================================
   First-run "Mulai dengan Cepat" card. Three readable states, all driven by
   how many steps are done (progress is computed live server-side):
     - default        : neutral card, next step flagged + solid CTA
     - .mb-onboard--almost : one step left, success-tinted
     - .mb-onboard--done   : the one-time completion acknowledgement
   Rationale + sources: docs/superpowers/research/onboarding-ux-patterns.md */

/* Deliberately darker than Metronic's --bs-primary (#009ef7) / --bs-success
   (#50cd89): those sit at ~2.9:1 and ~2.3:1 on white, which fails WCAG AA for
   the small badge/counter text AND the 3:1 floor for the progress segments and
   status markers. These pass both, in each theme. */
:root {
  --mb-onb-track: #e4e6ef;
  --mb-onb-accent: #0a66a8;
  --mb-onb-badge-bg: #0a66a8;
  --mb-onb-badge-fg: #ffffff;
  --mb-onb-success: #157347;
  --mb-onb-success-fg: #ffffff;
  --mb-onb-success-soft: #e6f6ed;
  --mb-onb-tint: rgba(10, 102, 168, 0.06);
}
[data-bs-theme="dark"] {
  --mb-onb-track: #3a3a4a;
  --mb-onb-accent: #5cb8ff;
  --mb-onb-badge-bg: #5cb8ff;
  --mb-onb-badge-fg: #0d2338;
  --mb-onb-success: #56d68f;
  --mb-onb-success-fg: #0d2b1c;
  --mb-onb-success-soft: rgba(86, 214, 143, 0.16);
  --mb-onb-tint: rgba(92, 184, 255, 0.10);
}

.mb-onboard {
  border: none;
  border-radius: var(--mb-radius);
  box-shadow: var(--mb-shadow);
  background: var(--mb-bg-card);
  border-top: 3px solid var(--mb-onb-accent);
}
.mb-onboard--almost {
  border-top-color: var(--mb-onb-success);
}

/* ---- Header ---- */
.mb-onboard__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.mb-onboard__headline {
  flex: 1 1 12rem;
  min-width: 0;
}
.mb-onboard__title {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--mb-text-heading);
  line-height: 1.3;
}
.mb-onboard__lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--mb-text-muted);
}
.mb-onboard__count {
  flex: 0 0 auto;
  align-self: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--mb-onb-tint);
  color: var(--mb-onb-accent);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.mb-onboard--almost .mb-onboard__count {
  background: var(--mb-onb-success-soft);
  color: var(--mb-onb-success);
}
.mb-onboard__dismiss {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--mb-radius-sm);
  background: transparent;
  color: var(--mb-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.mb-onboard__dismiss:hover {
  background: var(--mb-bg-header);
  color: var(--mb-text-heading);
}

/* ---- Segmented progress ----
   role="progressbar" lives on the container; the cells are aria-hidden and
   exist so the remaining count is readable without parsing the number. */
.mb-onboard__progress {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}
.mb-onboard__seg {
  flex: 1 1 0;
  height: 6px;
  border-radius: 999px;
  background: var(--mb-onb-track);
  transition: background 0.2s ease;
}
.mb-onboard__seg.is-on {
  background: var(--mb-onb-accent);
}
.mb-onboard--almost .mb-onboard__seg.is-on {
  background: var(--mb-onb-success);
}

/* ---- Steps ---- */
.mb-onboard__steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mb-onboard__step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 0.75rem;
  border-top: 1px solid var(--mb-border);
  border-radius: var(--mb-radius-sm);
  margin: 0 -0.75rem;
}
.mb-onboard__step:first-child {
  border-top: 0;
}
.mb-onboard__step.is-next {
  background: var(--mb-onb-tint);
  border-top-color: transparent;
}
.mb-onboard--almost .mb-onboard__step.is-next {
  background: var(--mb-onb-success-soft);
}

.mb-onboard__marker {
  flex: 0 0 1.25rem;
  line-height: 1.5;
  color: var(--mb-text-muted);
}
/* Metronic sets a bare `i{font-size:1rem}`; a direct match on the element beats
   inheritance, so size the glyph on the <i> itself. */
.mb-onboard__marker i {
  font-size: 1.05rem;
}
.mb-onboard__step.is-done .mb-onboard__marker {
  color: var(--mb-onb-success);
}

.mb-onboard__body {
  flex: 1 1 12rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.mb-onboard__label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--mb-text-heading);
  line-height: 1.4;
}
.mb-onboard__step.is-done .mb-onboard__label {
  font-weight: 500;
  color: var(--mb-text-muted);
}
.mb-onboard__glyph {
  color: var(--mb-text-muted);
}
.mb-onboard__step.is-next .mb-onboard__glyph {
  color: var(--mb-onb-accent);
}
.mb-onboard__desc {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--mb-text-muted);
}
.mb-onboard__desc--auto {
  font-style: italic;
}
.mb-onboard__badge {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--mb-onb-badge-bg);
  color: var(--mb-onb-badge-fg);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.mb-onboard--almost .mb-onboard__badge {
  background: var(--mb-onb-success);
  color: var(--mb-onb-success-fg);
}
.mb-onboard__badge--required {
  background: transparent;
  color: var(--mb-text-muted);
  border: 1px solid var(--mb-border);
  font-weight: 500;
}

.mb-onboard__action {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
}
.mb-onboard__locked {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mb-text-muted);
  white-space: nowrap;
}

.mb-onboard__auto-toast {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--mb-onb-success-soft);
  color: var(--mb-onb-success);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ---- Footer (demo / KB affordance) ---- */
.mb-onboard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--mb-border);
}
.mb-onboard__foot-text {
  font-size: 0.8125rem;
  color: var(--mb-text-muted);
}
.mb-onboard__foot form {
  margin: 0;
}

/* ---- Completion acknowledgement ---- */
.mb-onboard--done {
  border-top-color: var(--mb-onb-success);
}
.mb-onboard__done-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.mb-onboard__done-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mb-onb-success-soft);
  color: var(--mb-onb-success);
}
.mb-onboard__done-icon i {
  font-size: 1.4rem;
}
.mb-onboard__done-text {
  flex: 1 1 14rem;
  min-width: 0;
}
.mb-onboard__done-title {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mb-text-heading);
}
.mb-onboard__done-lead {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--mb-text-muted);
}

/* ---- Keyboard focus: Metronic strips outlines on .btn, so restore an
   unmistakable ring on every interactive element inside the card. ---- */
.mb-onboard a:focus-visible,
.mb-onboard button:focus-visible {
  outline: 2px solid var(--mb-onb-accent);
  outline-offset: 2px;
  border-radius: var(--mb-radius-sm);
}

/* ---- Phone (down to 360px): the CTA drops to its own full-width row,
   indented to line up with the step text instead of the marker. ---- */
@media (max-width: 575.98px) {
  .mb-onboard__step {
    flex-wrap: wrap;
  }
  .mb-onboard__action {
    flex: 1 0 100%;
    margin-left: 0;
    padding-left: 2rem;
  }
  .mb-onboard__action .btn {
    width: 100%;
  }
  /* Row 1 = headline + dismiss, row 2 = the counter pill. The zero-height
     ::after is the standard flex line-break: ordered between the two groups,
     its 100% basis forces a wrap without stretching the pill itself. */
  .mb-onboard__head {
    flex-wrap: wrap;
  }
  .mb-onboard__head::after {
    content: "";
    flex: 0 0 100%;
    height: 0;
    order: 1;
  }
  .mb-onboard__headline {
    order: 0;
    flex: 1 1 8rem;
  }
  .mb-onboard__dismiss {
    order: 0;
  }
  .mb-onboard__count {
    order: 2;
    align-self: flex-start;
    margin-top: 0.25rem;
  }
  .mb-onboard__foot {
    flex-direction: column;
    align-items: stretch;
  }
  .mb-onboard__foot .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Page Help Modal (x-mb.help-scripts)
   --------------------------------------------------------------------------
   The single shared KB help modal. Carries .mb-modal too, so it inherits the
   house modal chrome (radius, header gradient, shadow, phone full-screen
   sheet); everything below is help-specific reading typography.

   Layout is header / tab strip / scrollable body / footer. The tab strip is
   a SIBLING of .modal-body rather than a position:sticky child, because with
   .modal-dialog-scrollable the body is the scroll container and a sticky child
   would scroll its own padding away. Only the active tab's pane is rendered
   visible at a time (no combined scroll, no scroll-spy) — same underline tab
   language as .mb-nav-tabs__scroll (report/payment/kas/transfer hubs), just
   scoped to this component's own class names since the nav here is built in
   JS rather than server-rendered.
   ========================================================================== */

/* The renderer toggles the [hidden] attribute on flex elements (who chip, tab
   strip, copy/back-to-top buttons) and on inactive .mb-help__panel tab panes;
   an explicit display would otherwise win over Reboot's [hidden] rule, so
   restate it with the same weight the flex rules use. */
.mb-help [hidden] {
  display: none !important;
}
/* Title block stacks eyebrow + title + who chip — align it to the top of the
   header instead of Bootstrap's default vertical centring. Three stacked
   lines read as cramped at the house modal's default padding/gaps (reported),
   so this header gets a bit more of both, scoped to .mb-help only. */
.mb-help .modal-header {
  align-items: flex-start;
  padding: 1.6rem 1.75rem 1.5rem;
}
.mb-help__eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mb-primary);
  margin-bottom: 0.4rem;
}
.mb-help .modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--mb-text-heading);
  line-height: 1.3;
  margin: 0;
}
.mb-help .modal-title:focus {
  outline: none;
}
.mb-help .modal-title:focus-visible {
  outline: 2px solid var(--mb-primary);
  outline-offset: 3px;
  border-radius: 3px;
}
/* "who" — audience chip under the title. Hidden until populated. */
.mb-help__who {
  display: inline-block;
  margin-top: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--mb-primary-light);
  color: var(--mb-primary);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}
.mb-help__header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.mb-help__iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 50rem;
  background: transparent;
  color: var(--mb-text-sub);
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.mb-help__iconbtn:hover {
  background: var(--mb-bg-header);
  color: var(--mb-text-heading);
}
.mb-help__iconbtn:focus-visible {
  outline: 2px solid var(--mb-primary);
  outline-offset: 2px;
}
.mb-help__iconbtn.is-done {
  color: #17c653;
}
.mb-help__iconbtn-label {
  font-size: 0.78rem;
  font-weight: 600;
}

/* ---- Section tabs ----
   Real tab strip (role="tablist"/"tab"): only the active pane renders, no
   scroll-spy. Same underline language as .mb-nav-tabs__scroll (report/payment/
   kas/transfer hubs) — active = primary text + underline, thin border under
   the strip — reimplemented against this component's own class names since
   the nav here is built dynamically in JS, not server-rendered. */
.mb-help__nav {
  display: flex;
  gap: 0;
  padding: 0 1.75rem;
  border-bottom: 1px solid var(--mb-border);
  background: var(--mb-bg-card);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  flex-shrink: 0;
}
.mb-help__nav::-webkit-scrollbar {
  height: 4px;
}
.mb-help__nav::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
}
[data-bs-theme="dark"] .mb-help__nav::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.22);
}
.mb-help__nav-link {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-radius: 0;
  padding: 0.75rem 1rem;
  margin-bottom: -1px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mb-text-sub);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.mb-help__nav-link:hover {
  color: var(--mb-text-muted);
}
.mb-help__nav-link.is-active {
  color: var(--mb-primary);
  border-bottom-color: var(--mb-primary);
}
.mb-help__nav-link:focus-visible {
  outline: 2px solid var(--mb-primary);
  outline-offset: -2px;
}

/* ---- Body: readable measure + spacing rhythm ---- */
.mb-help .modal-body {
  padding: 1.5rem 1.75rem 1.75rem;
  scroll-behavior: smooth;
}
/* No max-width here: modal-lg is 800px, and a 68ch reading-measure constraint
   left a wide, empty dead column on the right with nothing to fill it
   (reported). Fill the modal's own width instead — the FAQ/task-step content
   is short-line/structured (not long-form prose), so it doesn't need a
   typographic measure clamp the way a full article would. */
.mb-help__lead {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--mb-text-muted);
  margin: 0;
}
/* Only one .mb-help__panel is ever visible at a time (the rest carry
   [hidden]), so spacing only has to account for the summary lead sitting
   above whichever pane is active. */
.mb-help__lead + .mb-help__panel {
  margin-top: 1.75rem;
}
/* Text-only heading (no icon) — with the tab strip already naming the
   section, an icon here was pure repetition. Kept small/muted like a caption
   so it doesn't compete with the tab strip above it. */
.mb-help__section-title {
  margin: 0 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--mb-border);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mb-text-sub);
}

/* ---- Cara pakai: task heading + numbered rail of actions ---- */
.mb-help__task + .mb-help__task {
  margin-top: 1.4rem;
}
.mb-help__task-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mb-text-heading);
  line-height: 1.4;
}
.mb-help__task-title::before {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--mb-primary);
  transform: translateY(-0.15rem);
}
.mb-help__task-steps {
  counter-reset: mb-help-step;
  list-style: none;
  margin: 0 0 0 0.2rem;
  padding: 0.15rem 0 0.15rem 1.75rem;
  border-left: 2px solid var(--mb-border);
}
.mb-help__task-steps > li {
  counter-increment: mb-help-step;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--mb-text-muted);
}
.mb-help__task-steps > li + li {
  margin-top: 0.55rem;
}
.mb-help__task-steps > li::before {
  content: counter(mb-help-step);
  position: absolute;
  left: -2.5rem;
  top: 0.05rem;
  width: 1.4rem;
  height: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mb-primary-light);
  color: var(--mb-primary);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

/* ---- Tips ----
   Small dot marker instead of a checkmark icon — same "quiet bullet" language
   as .mb-help__task-title's dot, no icon font involved. */
.mb-help__tips {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mb-help__tips > li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--mb-text-muted);
}
.mb-help__tips > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--mb-primary);
}
.mb-help__tips > li + li {
  margin-top: 0.6rem;
}

/* ---- FAQ accordion: flat, separator-only (no boxes-in-boxes) ---- */
.mb-help__faq .accordion-item {
  border: 0;
  border-bottom: 1px solid var(--mb-border);
  background: transparent;
  border-radius: 0;
}
.mb-help__faq .accordion-item:last-child {
  border-bottom: 0;
}
.mb-help__faq .accordion-header {
  margin: 0;
}
.mb-help__faq .accordion-button {
  padding: 0.85rem 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mb-text-heading);
  line-height: 1.5;
}
.mb-help__faq .accordion-button:not(.collapsed) {
  color: var(--mb-primary);
  background: transparent;
  box-shadow: none;
}
.mb-help__faq .accordion-button:focus {
  box-shadow: none;
}
.mb-help__faq .accordion-button:focus-visible {
  outline: 2px solid var(--mb-primary);
  outline-offset: -2px;
}
.mb-help__faq .accordion-body {
  padding: 0 1.5rem 1rem 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--mb-text-muted);
}
/* Bootstrap's collapse plugin left `.accordion-collapse.show` / its
   `.accordion-body` computing `visibility: collapse` after opening (reported:
   the answer's box renders at the right size/position but paints nothing).
   No stylesheet rule or inline style sets that value anywhere in the app or
   the vendored Bootstrap/Metronic bundles, and it reproduced with generous
   waits + a forced reflow, ruling out an animation-timing race — the exact
   mechanism wasn't pinned down, but forcing the correct, always-intended
   state directly and safely neutralises it regardless of source. */
.mb-help__faq .accordion-collapse.show,
.mb-help__faq .accordion-body {
  visibility: visible !important;
}

/* ---- Loading skeleton ----
   NN/G: a slow, steady left-to-right shimmer reads as faster than a pulse. */
.mb-help__skel-bar {
  height: 0.75rem;
  border-radius: 50rem;
  background: var(--mb-bg-header);
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: mb-help-shimmer 1.6s ease-in-out infinite;
}
[data-bs-theme="dark"] .mb-help__skel-bar {
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.09) 50%,
    transparent 100%
  );
}
.mb-help__skel-bar + .mb-help__skel-bar {
  margin-top: 0.7rem;
}
.mb-help__skel-group {
  margin-top: 1.75rem;
}
@keyframes mb-help-shimmer {
  0% {
    background-position: 150% 0;
  }
  100% {
    background-position: -50% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mb-help__skel-bar {
    animation: none;
  }
  .mb-help .modal-body {
    scroll-behavior: auto;
  }
}

/* ---- Empty / error states ---- */
.mb-help__state {
  text-align: center;
  padding: 2.5rem 1rem;
  max-width: 34rem;
  margin: 0 auto;
}
.mb-help__state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--mb-bg-header);
  color: var(--mb-text-sub);
  font-size: 1.5rem;
  margin-bottom: 0.9rem;
}
.mb-help__state--error .mb-help__state-icon {
  background: rgba(241, 65, 108, 0.1);
  color: #f1416c;
}
.mb-help__state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--mb-text-heading);
  margin: 0 0 0.35rem;
}
.mb-help__state-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--mb-text-muted);
  margin: 0;
}
.mb-help__state-action {
  margin-top: 1.1rem;
}

/* ---- Footer: shortcut hint + back to top ---- */
.mb-help .modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1.75rem;
}
.mb-help__hint {
  font-size: 0.76rem;
  color: var(--mb-text-sub);
  margin: 0;
}
.mb-help__hint kbd {
  display: inline-block;
  min-width: 1.35rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--mb-border);
  border-bottom-width: 2px;
  border-radius: 0.3rem;
  background: var(--mb-bg-card);
  color: var(--mb-text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}
.mb-help__totop {
  border: 0;
  background: transparent;
  color: var(--mb-text-sub);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: 50rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}
.mb-help__totop:hover {
  color: var(--mb-primary);
  background: var(--mb-primary-light);
}
.mb-help__totop:focus-visible {
  outline: 2px solid var(--mb-primary);
  outline-offset: 2px;
}

/* ---- Phone: full-height sheet, tighter gutters ---- */
@media (max-width: 575.98px) {
  .mb-help .modal-header {
    padding: 1rem 1.1rem;
  }
  .mb-help__nav {
    padding: 0 1.1rem;
  }
  .mb-help__nav-link {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }
  .mb-help .modal-body {
    padding: 1.15rem 1.1rem 1.5rem;
  }
  .mb-help .modal-footer {
    padding: 0.6rem 1.1rem;
  }
  .mb-help .modal-title {
    font-size: 1.05rem;
  }
  /* Reclaim width: drop the number rail's deep indent on narrow screens. */
  .mb-help__task-steps {
    padding-left: 1.5rem;
  }
  .mb-help__task-steps > li::before {
    left: -2.25rem;
  }
  /* The copy-link label is redundant next to its icon at this width. */
  .mb-help__iconbtn-label {
    display: none;
  }
}

/* ---------- Table density toggle ----------
   Global opt-in via one body class (window.MbTableDensity, scripts.blade.php)
   rather than per-table markup — toggling `.mb-density-compact` on <body>
   tightens every .mb-table-modern's cell padding (set above) at once, so no
   list page has to be edited individually. Header stickiness, borders,
   striping and row-variant accents are untouched — only spacing changes. */
body.mb-density-compact .mb-table-modern thead th {
  padding: 0.45rem 0.75rem;
}
body.mb-density-compact .mb-table-modern tbody td {
  padding: 0.3rem 0.75rem;
}
body.mb-density-compact .mb-table-modern tbody td:first-child,
body.mb-density-compact .mb-table-modern thead th:first-child {
  padding-left: 1.25rem;
}
body.mb-density-compact .mb-table-modern tbody td:last-child,
body.mb-density-compact .mb-table-modern thead th:last-child {
  padding-right: 1.25rem;
}

/* Small floating control (bottom-right), injected once by
   window.MbTableDensity.init() and only on pages that actually contain a
   .mb-table-modern table. A plain chip rather than a full Bootstrap button so
   it stays unobtrusive; the active/compact state gets a primary-tinted
   outline so its state is readable at a glance. */
.mb-density-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1030;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--mb-text-muted);
  background-color: var(--mb-bg-card);
  border: 1px solid var(--mb-border);
  border-radius: 999px;
  box-shadow: var(--mb-shadow-hover);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.mb-density-toggle:hover {
  color: var(--mb-text-heading);
  border-color: var(--mb-primary);
}
.mb-density-toggle.active {
  color: var(--mb-primary);
  border-color: var(--mb-primary);
  background-color: var(--mb-primary-light);
}
.mb-density-toggle:focus-visible {
  outline: 2px solid var(--mb-primary);
  outline-offset: 2px;
}

/* Keep the toggle from overlapping page content on narrow screens (it still
   floats, just tucked further from the edge / a touch smaller). */
@media (max-width: 575.98px) {
  .mb-density-toggle {
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.4rem 0.7rem;
    font-size: 11px;
  }
}
