:root {
  --mbg-primary: #5e72e4;
  --mbg-primary-dark: #2152ff;
  --mbg-success: #2dce89;
  --mbg-warning: #fb6340;
  --mbg-danger: #f5365c;
  --mbg-info: #11cdef;
  --mbg-text: #344767;
  --mbg-muted: #8392ab;
  --mbg-border: #e9ecef;
}

* { box-sizing: border-box; }
body { color: var(--mbg-text); }

/* Layout behavior closer to Argon datatables: fixed blue header + functional sidebar toggle */
.mbg-top-bg {
  z-index: 0;
  pointer-events: none;
}

[data-main-content] {
  will-change: margin-left;
}

@media (min-width: 1200px) {
  html.mbg-sidenav-collapsed #sidenav-main {
    transform: translateX(-110%) !important;
  }

  html.mbg-sidenav-collapsed [data-main-content] {
    margin-left: 0 !important;
  }
}

@media (max-width: 1199px) {
  [data-main-content] {
    margin-left: 0 !important;
  }
}

[navbar-main] {
  min-height: 4.25rem;
}

.mbg-page-actions-shell {
  position: relative;
  z-index: 15;
}
.mbg-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  min-height: 2.75rem;
}
.mbg-page-actions .mbg-btn {
  margin-right: 0 !important;
}

[navbar-main] [data-sidenav-toggle] i {
  width: 1.125rem;
}

[navbar-main] [data-sidenav-toggle]:hover i {
  transform: translateX(0);
}

.mbg-content { position: relative; z-index: 1; }
#sidenav-main { scrollbar-width: thin; }
#sidenav-main::-webkit-scrollbar { width: 5px; }
#sidenav-main::-webkit-scrollbar-thumb { background: rgba(131,146,171,.35); border-radius: 999px; }
[data-sidenav-backdrop] { backdrop-filter: blur(2px); }

/* Closer to Argon page/card structure */
.mbg-page-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 0 solid rgba(0,0,0,.125);
  border-radius: 1rem;
  box-shadow: 0 20px 27px 0 rgba(0,0,0,.05);
}

.mbg-hero {
  position: relative;
  padding: 1rem;
}
.mbg-hero-icon {
  width: 74px;
  height: 74px;
  min-width: 74px;
}
.mbg-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.mbg-stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 0 solid rgba(0,0,0,.125);
  border-radius: 1rem;
  box-shadow: 0 20px 27px 0 rgba(0,0,0,.05);
}

.mbg-icon-gradient {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: .75rem;
  box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(94,114,228,.4);
}
.mbg-icon-blue { background: linear-gradient(310deg, #2152ff, #21d4fd); }
.mbg-icon-purple { background: linear-gradient(310deg, #7928ca, #ff0080); }
.mbg-icon-green { background: linear-gradient(310deg, #17ad37, #98ec2d); }
.mbg-icon-orange { background: linear-gradient(310deg, #f53939, #fbcf33); }
.mbg-icon-slate { background: linear-gradient(310deg, #141727, #3a416f); }

.mbg-progress-line {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9ecef;
}
.mbg-progress-line > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(310deg, #2152ff, #21d4fd);
}
.mbg-progress-line.green > span { background: linear-gradient(310deg, #17ad37, #98ec2d); }
.mbg-progress-line.orange > span { background: linear-gradient(310deg, #f53939, #fbcf33); }

/* Buttons aligned to Argon */
.mbg-btn {
  display: inline-block;
  padding: .625rem 1.25rem;
  margin-bottom: 0;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
  vertical-align: middle;
  border: 0;
  border-radius: .5rem;
  cursor: pointer;
  user-select: none;
  transition: all .15s ease-in;
  letter-spacing: -.025rem;
}
.mbg-btn:hover { transform: translateY(-1px); }
.mbg-btn-primary { color: #fff; background: linear-gradient(310deg, #5e72e4, #825ee4); box-shadow: 0 3px 3px 0 rgba(94,114,228,.15), 0 3px 1px -2px rgba(94,114,228,.2), 0 1px 5px 0 rgba(94,114,228,.15); }
.mbg-btn-secondary { color: #67748e; background: #fff; border: 1px solid #d2d6da; box-shadow: 0 3px 5px -1px rgba(0,0,0,.09), 0 2px 3px -1px rgba(0,0,0,.07); }
.mbg-btn-white { color: #344767; background: #fff; box-shadow: 0 3px 5px -1px rgba(0,0,0,.09), 0 2px 3px -1px rgba(0,0,0,.07); }
.mbg-btn-glass { color: #fff; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28); box-shadow: none; }
.mbg-btn-sm { padding: .45rem .9rem; font-size: .6875rem; }

.mbg-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35em .65em;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: .45rem;
  text-transform: uppercase;
}
.mbg-badge-blue { color: #fff; background: linear-gradient(310deg, #2152ff, #21d4fd); }
.mbg-badge-green { color: #fff; background: linear-gradient(310deg, #17ad37, #98ec2d); }
.mbg-badge-orange { color: #fff; background: linear-gradient(310deg, #f53939, #fbcf33); }
.mbg-badge-red { color: #fff; background: linear-gradient(310deg, #ea0606, #ff667c); }
.mbg-badge-purple { color: #fff; background: linear-gradient(310deg, #7928ca, #ff0080); }
.mbg-badge-slate { color: #344767; background: #e9ecef; }

.mbg-link { color: #5e72e4; font-weight: 700; transition: color .15s ease-in; }
.mbg-link:hover { color: #233dd2; }
.mbg-muted { color: #8392ab; }
.mbg-text { color: #344767; }
.mbg-truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.mbg-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: .75rem;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  background: linear-gradient(310deg, #5e72e4, #825ee4);
}
.mbg-avatar-soft { color: #5e72e4; background: #f0f2ff; }

/* Filter form follows pages/pages/account/settings.html rhythm */
.mbg-filter-card { overflow: visible; z-index: 40; }
.mbg-label {
  display: inline-block;
  margin-bottom: .5rem;
  margin-left: .25rem;
  font-size: .75rem;
  font-weight: 700;
  color: #344767;
}
.mbg-input,
.mbg-select {
  display: block;
  width: 100%;
  appearance: none;
  border-radius: .5rem;
  border: 1px solid #d2d6da;
  background-color: #fff;
  background-clip: padding-box;
  padding: .5rem .75rem;
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.4;
  color: #495057;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.mbg-input::placeholder { color: #adb5bd; opacity: 1; }
.mbg-input:focus,
.mbg-select:focus { border-color: #5e72e4; box-shadow: 0 0 0 2px rgba(94,114,228,.2); }

.mbg-readonly-field {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  padding: .45rem .75rem;
  border: 1px solid #e9ecef;
  border-radius: .5rem;
  background: #f8f9fa;
}
.mbg-readonly-field small {
  color: #8392ab;
  font-size: .7rem;
  font-weight: 600;
}

/* Choices.js adjusted to Argon fields */
.mbg-filter-card .choices { width: 100%; margin-bottom: 0; font-size: .875rem; }
.mbg-filter-card .choices__inner { min-height: 2.5rem; padding: .47rem 2.2rem .47rem .75rem; border: 1px solid #d2d6da; border-radius: .5rem; background: #fff; font-size: .875rem; }
.mbg-filter-card .is-focused .choices__inner,
.mbg-filter-card .is-open .choices__inner { border-color: #5e72e4; box-shadow: 0 0 0 2px rgba(94,114,228,.2); }
.mbg-filter-card .choices__list--single { padding: 0; }
.mbg-filter-card .choices__list--single .choices__item,
.mbg-filter-card .choices__placeholder { color: #495057; font-size: .875rem; line-height: 1.4; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbg-filter-card .choices__placeholder { color: #adb5bd; }
.mbg-filter-card .choices[data-type*="select-one"]::after { right: .875rem; border-color: #8392ab transparent transparent; }
.mbg-filter-card .choices__list--dropdown { z-index: 9999; margin-top: .35rem; border: 0; border-radius: .5rem; background: #fff; box-shadow: 0 8px 26px -4px rgba(20,20,20,.15), 0 8px 9px -5px rgba(20,20,20,.06); }
.mbg-filter-card .choices__list--dropdown .choices__list { max-height: 16rem; padding: .35rem; }
.mbg-filter-card .choices__list--dropdown .choices__item { padding: .55rem .75rem; border-radius: .375rem; color: #344767; font-size: .875rem; }
.mbg-filter-card .choices__list--dropdown .choices__item--selectable.is-highlighted { color: #344767; background: #f8f9fa; }
.mbg-filter-card .choices__input { margin: .25rem 0 .4rem; padding: .5rem .65rem; border-radius: .375rem; background: #f8f9fa; color: #344767; font-size: .875rem; }
.mbg-filter-card .choices.is-open { z-index: 90; }

/* Datatables.html visual target, without forced client-side pagination */
.mbg-table-card { overflow: hidden; }
.table-responsive { width: 100%; overflow-x: auto; }
table.table { width: 100%; margin-bottom: 0; color: #67748e; vertical-align: top; border-color: #e9ecef; border-collapse: collapse; }
table.table thead th {
  padding: .75rem 1.5rem;
  font-size: .65rem;
  font-weight: 700;
  color: #8392ab;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
  border-bottom: 1px solid #e9ecef;
  opacity: .7;
  white-space: nowrap;
}
table.table tbody td {
  padding: .75rem 1.5rem;
  vertical-align: middle;
  border-bottom: 1px solid #e9ecef;
}
table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover { background-color: #f8f9fa; }
table.table .text-right { text-align: right; }
table.table .text-center { text-align: center; }
.mbg-cell-title { margin: 0; color: #344767; font-size: .875rem; font-weight: 700; line-height: 1.4; }
.mbg-cell-subtitle { margin: .1rem 0 0; color: #8392ab; font-size: .75rem; line-height: 1.4; }
.mbg-cell-stack { display: flex; align-items: center; gap: .75rem; min-width: 12rem; }
.mbg-number { color: #344767; font-size: .875rem; font-weight: 700; }
.mbg-empty { padding: 2rem 1.5rem !important; text-align: center; color: #8392ab; font-size: .875rem; }

.mbg-no-column {
  width: 4rem;
  min-width: 4rem;
}

.mbg-row-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .45rem;
  border-radius: 9999px;
  color: #344767;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  font-size: .75rem;
  font-weight: 700;
}

.mbg-pagination { padding: 1rem 1.5rem; border-top: 1px solid #e9ecef; }
.mbg-pagination nav > div:first-child { display: none; }
.mbg-pagination span,
.mbg-pagination a { border-radius: .5rem !important; }

.mbg-chart { position: relative; min-height: 18rem; padding: 1.5rem; }
.mbg-chart canvas { max-height: 20rem; }
.mbg-soft-box { padding: 1rem; border-radius: .75rem; background: #f8f9fa; border: 1px solid #e9ecef; }
.mbg-detail-row { display: grid; grid-template-columns: minmax(8rem, .45fr) minmax(0, 1fr); gap: .75rem; padding: .75rem 0; border-bottom: 1px solid #e9ecef; }
.mbg-detail-row:last-child { border-bottom: 0; }

@media (max-width: 1199px) {
  #sidenav-main.translate-x-0 { transform: translateX(0); }
}

@media (max-width: 767px) {
  .mbg-content { padding-left: 1rem; padding-right: 1rem; }
  .mbg-hero-icon { width: 56px; height: 56px; min-width: 56px; }
  table.table thead th,
  table.table tbody td { padding-left: 1rem; padding-right: 1rem; }
  .mbg-btn { width: 100%; }
}


/* MBG real Simple-DataTables polish */
.dataTable-wrapper {
  width: 100%;
}

.dataTable-wrapper .dataTable-top,
.dataTable-wrapper .dataTable-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-color: rgba(226, 232, 240, 0.9);
}

.dataTable-wrapper .dataTable-top {
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.dataTable-wrapper .dataTable-bottom {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.dataTable-wrapper .dataTable-dropdown,
.dataTable-wrapper .dataTable-search {
  float: none !important;
}

.dataTable-wrapper .dataTable-dropdown label,
.dataTable-wrapper .dataTable-top label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 0;
  color: #64748b;
  font-size: .75rem;
  font-weight: 600;
}

.dataTable-wrapper .dataTable-selector,
.dataTable-wrapper .dataTable-input {
  display: block;
  height: 2.5rem;
  border: 1px solid #d2d6da;
  border-radius: .5rem;
  background-color: #fff;
  color: #344767;
  font-size: .875rem;
  line-height: 1.25rem;
  outline: 0;
  transition: box-shadow .15s ease, border-color .15s ease;
}

.dataTable-wrapper .dataTable-selector {
  min-width: 4.75rem;
  padding: .45rem 2rem .45rem .75rem;
}

.dataTable-wrapper .dataTable-input {
  min-width: 16rem;
  padding: .45rem .85rem;
}

.dataTable-wrapper .dataTable-selector:focus,
.dataTable-wrapper .dataTable-input:focus {
  border-color: #5e72e4;
  box-shadow: 0 0 0 2px rgba(94, 114, 228, .16);
}

.dataTable-wrapper .dataTable-container {
  overflow-x: auto;
}

.dataTable-wrapper .dataTable-table {
  margin-bottom: 0;
}

.dataTable-wrapper .dataTable-table thead th {
  color: #8392ab;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .025em;
  background: #f8fafc;
  border-bottom: 1px solid #e9ecef;
}

.dataTable-wrapper .dataTable-sorter {
  padding-right: 1.25rem;
}

.dataTable-wrapper .dataTable-sorter::before,
.dataTable-wrapper .dataTable-sorter::after {
  right: .15rem;
}

.dataTable-wrapper .dataTable-info {
  margin: 0;
  color: #64748b;
  font-size: .75rem;
  font-weight: 600;
}

.dataTable-wrapper .dataTable-pagination ul {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.dataTable-wrapper .dataTable-pagination li {
  float: none;
}

.dataTable-wrapper .dataTable-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .65rem;
  margin-left: 0;
  border: 1px solid #dee2e6;
  border-radius: 9999px;
  color: #8392ab;
  background: #fff;
  font-size: .75rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(50, 50, 93, .05), 0 1px 3px rgba(0, 0, 0, .04);
}

.dataTable-wrapper .dataTable-pagination a:hover {
  background: #f8fafc;
  color: #344767;
}

.dataTable-wrapper .dataTable-pagination .active a,
.dataTable-wrapper .dataTable-pagination .active a:hover,
.dataTable-wrapper .dataTable-pagination .active a:focus {
  border-color: #5e72e4;
  background: linear-gradient(310deg, #5e72e4, #825ee4);
  color: #fff;
}

@media (max-width: 767px) {
  .dataTable-wrapper .dataTable-top,
  .dataTable-wrapper .dataTable-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .dataTable-wrapper .dataTable-input {
    width: 100%;
    min-width: 0;
  }

  .dataTable-wrapper .dataTable-search,
  .dataTable-wrapper .dataTable-search input {
    width: 100%;
  }

  .dataTable-wrapper .dataTable-pagination ul {
    flex-wrap: wrap;
  }
}

/* Patch: navbar spacing, filter actions, and DataTables control alignment */
[navbar-main] .mbg-navbar-main-group {
  gap: 2rem;
}

[navbar-main] .mbg-sidenav-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-left: .35rem;
  padding: .35rem;
  border: 0;
  border-radius: .5rem;
  background: transparent;
}

[navbar-main] .mbg-sidenav-toggle-btn:hover,
[navbar-main] .mbg-sidenav-toggle-btn:focus {
  background: rgba(255, 255, 255, .14);
  outline: none;
}

.mbg-filter-card .mbg-btn + .mbg-btn {
  margin-left: .5rem;
}

.dataTable-wrapper .dataTable-top,
.dataTable-wrapper .dataTable-bottom {
  width: 100%;
}

.dataTable-wrapper .dataTable-dropdown {
  flex: 0 0 auto;
}

.dataTable-wrapper .dataTable-search {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  margin-left: auto;
  text-align: right;
}

.dataTable-wrapper .dataTable-input {
  width: min(100%, 22rem);
}

.dataTable-wrapper .dataTable-info {
  flex: 1 1 auto;
}

.dataTable-wrapper .dataTable-pagination {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  margin-left: auto;
}

.dataTable-wrapper .dataTable-pagination ul,
.dataTable-wrapper .dataTable-pagination .dataTable-pagination-list {
  justify-content: flex-end;
}

@media (max-width: 767px) {
  [navbar-main] .mbg-navbar-main-group {
    gap: 1rem;
  }

  .mbg-filter-card .mbg-btn + .mbg-btn {
    margin-left: 0;
    margin-top: .625rem;
  }

  .dataTable-wrapper .dataTable-search,
  .dataTable-wrapper .dataTable-pagination {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }
}

/* Patch: SPPG operational profile sections */
.mbg-profile-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid #edf2f7;
}

.mbg-profile-item:first-child {
  padding-top: 0;
}

.mbg-profile-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.mbg-empty-panel {
  display: flex;
  min-height: 8rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  padding: 1rem;
  border: 1px dashed #d8e0ec;
  border-radius: 1rem;
  background: #f8fafc;
  text-align: center;
  color: #8392ab;
}

.mbg-empty-panel i {
  font-size: 1.5rem;
  color: #a8b8d8;
}

.mbg-empty-panel p {
  margin: 0;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.35;
}

/* Patch: internal review penerima page */
.mbg-compact-table td,
.mbg-compact-table th {
  padding: .75rem 1rem;
}

.mbg-review-detail-list .mbg-profile-item {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Internal review penerima: opsi tambah master */
.mbg-add-master-card {
  border-top: 1px solid rgba(45, 206, 137, .18);
}

.mbg-btn-success {
  color: #fff;
  background-image: linear-gradient(310deg, #2dce89 0%, #2dcecc 100%);
  box-shadow: 0 4px 7px -1px rgba(45, 206, 137, .25), 0 2px 4px -1px rgba(45, 206, 137, .15);
}

.mbg-btn-success:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(45, 206, 137, .22);
}

.mbg-add-master-card .mbg-input[disabled] {
  color: #67748e;
  background-color: #f8f9fa;
  cursor: not-allowed;
}

/* Patch 6C: Argon-aligned operational UI + secure document components */
.mbg-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 4.75rem;
  padding: 1.15rem 1.5rem;
  margin: 0;
  color: #344767;
  white-space: nowrap;
}

.mbg-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 2.7rem;
  border-radius: .75rem;
  color: #fff;
  background: linear-gradient(310deg, #5e72e4, #825ee4);
  box-shadow: 0 4px 7px -1px rgba(94,114,228,.28), 0 2px 4px -1px rgba(0,0,0,.07);
  font-size: .9rem;
  font-weight: 800;
}

.mbg-brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.2; }
.mbg-brand-copy strong { color: #344767; font-size: .875rem; font-weight: 700; }
.mbg-brand-copy small { margin-top: .25rem; color: #8392ab; font-size: .68rem; font-weight: 600; }

.mbg-user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  max-width: 25rem;
  min-height: 2.75rem;
  padding: .35rem .55rem;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: .75rem;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.mbg-user-menu-trigger:hover,
.mbg-user-menu-trigger:focus { background: rgba(255,255,255,.16); outline: none; }
.mbg-user-menu-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border-radius: .6rem;
  background: #fff;
  color: #5e72e4;
  font-size: .75rem;
  font-weight: 800;
  box-shadow: 0 3px 5px -1px rgba(0,0,0,.09);
}
.mbg-user-menu-name,
.mbg-user-menu-role { display: block; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbg-user-menu-name { color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.2; }
.mbg-user-menu-role { margin-top: .2rem; color: rgba(255,255,255,.7); font-size: .68rem; font-weight: 500; line-height: 1.2; }
.mbg-user-dropdown {
  top: calc(100% + .35rem) !important;
  margin-top: 0 !important;
  width: 15.5rem;
  transform-origin: top right !important;
  box-shadow: 0 8px 26px -4px rgba(20,20,20,.15), 0 8px 9px -5px rgba(20,20,20,.06);
}
.mbg-user-dropdown.transform-dropdown {
  transform: perspective(999px) rotateX(-4deg) translate3d(0,.4rem,0) !important;
}
.mbg-user-dropdown.transform-dropdown-show {
  transform: perspective(999px) rotateX(0deg) translate3d(0,0,5px) !important;
}
.mbg-user-dropdown::before {
  top: -.7rem !important;
}
.mbg-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .65rem .75rem;
  border: 0;
  border-radius: .6rem;
  background: transparent;
  color: #344767;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease;
}
.mbg-user-dropdown-item:hover { background: #f8f9fa; }
.mbg-user-dropdown-item strong { display: block; color: #344767; font-size: .75rem; font-weight: 700; }
.mbg-user-dropdown-item small { display: block; margin-top: .1rem; color: #8392ab; font-size: .66rem; }
.mbg-user-dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border-radius: .55rem;
  color: #5e72e4;
  background: #f0f2ff;
}
.mbg-user-dropdown-danger .mbg-user-dropdown-icon { color: #f5365c; background: #fff1f3; }

.mbg-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem .5rem;
}
.mbg-card-header h6 { margin: .1rem 0 .25rem; color: #344767; font-size: .95rem; font-weight: 700; }
.mbg-card-header p { max-width: 52rem; margin: 0; color: #8392ab; font-size: .78rem; line-height: 1.55; }
.mbg-card-header-row { align-items: center; padding-bottom: 1.25rem; }
.mbg-card-body { padding: 1.5rem; }
.mbg-eyebrow { display: block; margin-bottom: .15rem; color: #5e72e4; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.mbg-sppg-hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  overflow: visible;
}
.mbg-sppg-hero-main { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.mbg-sppg-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  flex: 0 0 3.5rem;
  border-radius: .9rem;
  color: #fff;
  background: linear-gradient(310deg, #5e72e4, #825ee4);
  box-shadow: 0 4px 20px rgba(94,114,228,.22);
  font-size: 1.25rem;
}
.mbg-sppg-hero-copy { min-width: 0; }
.mbg-sppg-hero-copy h5 { margin: 0 0 .35rem; color: #344767; font-size: 1.05rem; font-weight: 700; }
.mbg-sppg-hero-meta { display: flex; flex-wrap: wrap; gap: .4rem .85rem; color: #8392ab; font-size: .74rem; font-weight: 600; }
.mbg-sppg-hero-actions { flex: 0 0 auto; }

.mbg-two-column-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.mbg-profile-list .mbg-profile-item > span { color: #8392ab; font-size: .75rem; }
.mbg-profile-list .mbg-profile-item > strong { max-width: 65%; color: #344767; font-size: .78rem; text-align: right; word-break: break-word; }

.mbg-mini-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.mbg-mini-stat {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  padding: .85rem;
  border: 1px solid #edf2f7;
  border-radius: .8rem;
  background: #f8fafc;
}
.mbg-mini-stat-icon,
.mbg-action-icon,
.mbg-form-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  border-radius: .7rem;
}
.mbg-mini-stat-icon { width: 2.4rem; height: 2.4rem; }
.mbg-mini-stat div { min-width: 0; }
.mbg-mini-stat small { display: block; color: #8392ab; font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.mbg-mini-stat strong { display: block; margin-top: .15rem; color: #344767; font-size: 1rem; font-weight: 700; }
.mbg-mini-stat .mbg-mini-stat-date { font-size: .78rem; }

.mbg-info-strip {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .85rem 1rem;
  border: 1px solid #e6e9ff;
  border-radius: .75rem;
  background: #f7f8ff;
  color: #67748e;
  font-size: .75rem;
  line-height: 1.5;
}
.mbg-info-strip i { margin-top: .15rem; color: #5e72e4; }

.mbg-sppg-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.mbg-sppg-action-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  min-height: 5.25rem;
  padding: 1rem;
  border: 1px solid rgba(226,232,240,.85);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 20px 27px rgba(0,0,0,.05);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.mbg-sppg-action-card:hover { transform: translateY(-2px); border-color: rgba(94,114,228,.22); box-shadow: 0 12px 25px rgba(50,50,93,.09); }
.mbg-action-icon { width: 2.75rem; height: 2.75rem; }
.mbg-action-copy { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; }
.mbg-action-copy strong { color: #344767; font-size: .82rem; font-weight: 700; }
.mbg-action-copy small { margin-top: .2rem; color: #8392ab; font-size: .69rem; line-height: 1.35; }
.mbg-action-arrow { flex: 0 0 auto; color: #c5ccda; font-size: .7rem; }

.mbg-stat-grid { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.mbg-stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mbg-stat-card-horizontal { flex-direction: row; align-items: center; gap: 1rem; min-height: 6rem; padding: 1.15rem 1.25rem; }
.mbg-stat-card-horizontal div { min-width: 0; }
.mbg-stat-card-horizontal small { display: block; color: #8392ab; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.mbg-stat-card-horizontal strong { display: block; margin-top: .25rem; color: #344767; font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.mbg-stat-card-horizontal .mbg-stat-date { font-size: 1rem; }

.mbg-crud-layout { display: grid; grid-template-columns: minmax(18rem, .38fr) minmax(0, 1fr); align-items: start; gap: 1.5rem; }
.mbg-crud-layout-wide-form { grid-template-columns: minmax(22rem, .48fr) minmax(0, 1fr); }
.mbg-crud-form-card { position: sticky; top: 1rem; }

.mbg-form { min-width: 0; }
.mbg-form > .mbg-btn:last-child { margin-top: .6rem; }
.mbg-form-field { min-width: 0; margin-bottom: 1rem; }
.mbg-form-field:last-child { margin-bottom: 0; }
.mbg-form-grid { display: grid; gap: 0 1rem; }
.mbg-form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mbg-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mbg-form-section { padding: 1rem 0 1.25rem; border-bottom: 1px solid #edf2f7; }
.mbg-form-section:first-child { padding-top: 0; }
.mbg-form-section:last-of-type { border-bottom: 0; }
.mbg-form-section-title { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.mbg-form-section-icon { width: 2.5rem; height: 2.5rem; }
.mbg-form-section-title strong { display: block; color: #344767; font-size: .8rem; }
.mbg-form-section-title small { display: block; margin-top: .15rem; color: #8392ab; font-size: .69rem; line-height: 1.4; }
.mbg-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; margin-top: .75rem; padding-top: 1.25rem; border-top: 1px solid #f0f2f5; }
.mbg-field-hint { margin: .45rem .25rem 0; color: #8392ab; font-size: .68rem; line-height: 1.45; }
.mbg-textarea { min-height: 6rem; resize: vertical; }

/* Choices.js uses the same Argon field rhythm in forms, not only filter cards. */
.mbg-form .choices { width: 100%; margin-bottom: 0; font-size: .875rem; }
.mbg-form .choices__inner { min-height: 2.55rem; padding: .49rem 2.2rem .49rem .75rem; border: 1px solid #d2d6da; border-radius: .5rem; background: #fff; font-size: .875rem; }
.mbg-form .is-focused .choices__inner,
.mbg-form .is-open .choices__inner { border-color: #5e72e4; box-shadow: 0 0 0 2px rgba(94,114,228,.16); }
.mbg-form .choices__list--single { padding: 0; }
.mbg-form .choices__list--single .choices__item,
.mbg-form .choices__placeholder { color: #495057; font-size: .875rem; line-height: 1.4; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbg-form .choices__placeholder { color: #adb5bd; }
.mbg-form .choices[data-type*="select-one"]::after { right: .875rem; border-color: #8392ab transparent transparent; }
.mbg-form .choices__list--dropdown { z-index: 9999; margin-top: .35rem; border: 0; border-radius: .5rem; background: #fff; box-shadow: 0 8px 26px -4px rgba(20,20,20,.15), 0 8px 9px -5px rgba(20,20,20,.06); }
.mbg-form .choices__list--dropdown .choices__list { max-height: 17rem; padding: .35rem; }
.mbg-form .choices__list--dropdown .choices__item { padding: .55rem .75rem; border-radius: .375rem; color: #344767; font-size: .82rem; line-height: 1.35; }
.mbg-form .choices__list--dropdown .choices__item--selectable.is-highlighted { color: #344767; background: #f8f9fa; }
.mbg-form .choices__input { margin: .25rem 0 .4rem; padding: .5rem .65rem; border-radius: .375rem; background: #f8f9fa; color: #344767; font-size: .82rem; }
.mbg-form .choices.is-open { z-index: 100; }

.mbg-btn-danger { color: #fff; background: linear-gradient(310deg, #ea0606, #ff667c); box-shadow: 0 3px 5px -1px rgba(245,54,92,.18); }

.mbg-inline-editor { display: inline-block; text-align: left; }
.mbg-inline-editor > summary { list-style: none; }
.mbg-inline-editor > summary::-webkit-details-marker { display: none; }
.mbg-inline-editor-panel {
  width: 24rem;
  max-width: calc(100vw - 5rem);
  margin: .65rem 0 0 auto;
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: .8rem;
  background: #f8fafc;
  box-shadow: 0 8px 20px rgba(50,50,93,.08);
}
.mbg-inline-editor-wide .mbg-inline-editor-panel { width: 34rem; }

.mbg-file-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 5rem;
  padding: .9rem;
  border: 1px dashed #b8c5e1;
  border-radius: .8rem;
  background: #f8faff;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.mbg-file-dropzone:hover { border-color: #5e72e4; background: #f4f6ff; }
.mbg-file-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  border-radius: .7rem;
  color: #5e72e4;
  background: #eef1ff;
  font-size: 1rem;
}
.mbg-file-dropzone-copy { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; }
.mbg-file-dropzone-copy strong { overflow: hidden; color: #344767; font-size: .75rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.mbg-file-dropzone-copy small { margin-top: .2rem; color: #8392ab; font-size: .66rem; line-height: 1.35; }
.mbg-file-dropzone-compact { min-height: 4rem; padding: .7rem; }
.mbg-file-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
}
.mbg-checkbox-row { display: flex; align-items: flex-start; gap: .5rem; margin-top: .7rem; color: #67748e; font-size: .7rem; line-height: 1.4; cursor: pointer; }
.mbg-checkbox-row input { margin-top: .15rem; accent-color: #5e72e4; }

.mbg-document-link,
.mbg-legacy-file { display: flex; align-items: center; gap: .65rem; min-width: 11rem; }
.mbg-document-link { color: #344767; }
.mbg-document-link:hover strong { color: #5e72e4; }
.mbg-document-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 2.2rem;
  border-radius: .55rem;
  color: #5e72e4;
  background: #eef1ff;
}
.mbg-document-link span:last-child,
.mbg-legacy-file span { min-width: 0; }
.mbg-document-link strong,
.mbg-legacy-file strong { display: block; max-width: 12rem; overflow: hidden; color: #344767; font-size: .72rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.mbg-document-link small,
.mbg-legacy-file small { display: block; max-width: 12rem; overflow: hidden; margin-top: .12rem; color: #8392ab; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.mbg-legacy-file > i { color: #8392ab; font-size: 1rem; }

@media (max-width: 1199px) {
  .mbg-sppg-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mbg-crud-layout,
  .mbg-crud-layout-wide-form { grid-template-columns: minmax(17rem, .45fr) minmax(0, 1fr); }
  .mbg-form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .mbg-two-column-grid,
  .mbg-crud-layout,
  .mbg-crud-layout-wide-form { grid-template-columns: 1fr; }
  .mbg-crud-form-card { position: static; }
  .mbg-stat-grid-3 { grid-template-columns: 1fr; }
  .mbg-stat-card-horizontal { min-height: 5rem; }
}

@media (max-width: 767px) {
  .mbg-page-actions { justify-content: stretch; }
  .mbg-page-actions .mbg-btn { flex: 1 1 auto; width: auto; }
  .mbg-user-menu-trigger { max-width: none; padding: .35rem; border-color: transparent; background: transparent; }
  .mbg-user-dropdown { right: -.25rem; width: min(16rem, calc(100vw - 2rem)); }
  .mbg-sppg-hero { align-items: flex-start; flex-direction: column; }
  .mbg-sppg-hero-actions { width: 100%; }
  .mbg-sppg-hero-actions .mbg-btn { width: 100%; }
  .mbg-sppg-action-grid,
  .mbg-mini-stat-grid,
  .mbg-form-grid-2,
  .mbg-form-grid-3 { grid-template-columns: 1fr; }
  .mbg-sppg-action-card { min-height: 4.75rem; }
  .mbg-card-header-row { align-items: stretch; flex-direction: column; }
  .mbg-form-actions { flex-direction: column-reverse; }
  .mbg-form-actions .mbg-btn { width: 100%; }
  .mbg-file-dropzone { align-items: flex-start; flex-wrap: wrap; }
  .mbg-file-dropzone .mbg-btn { width: 100%; }
  .mbg-inline-editor-panel,
  .mbg-inline-editor-wide .mbg-inline-editor-panel { width: min(24rem, calc(100vw - 3rem)); }
}

/* Global Choices skin: every application select enhanced by Choices matches Argon form controls. */
body .choices { width: 100%; margin-bottom: 0; font-size: .875rem; }
body .choices__inner { min-height: 2.55rem; padding: .49rem 2.2rem .49rem .75rem; border: 1px solid #d2d6da; border-radius: .5rem; background: #fff; font-size: .875rem; }
body .choices.is-focused .choices__inner,
body .choices.is-open .choices__inner { border-color: #5e72e4; box-shadow: 0 0 0 2px rgba(94,114,228,.16); }
body .choices__list--single { padding: 0; }
body .choices__list--single .choices__item,
body .choices__placeholder { color: #495057; font-size: .875rem; line-height: 1.4; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body .choices__placeholder { color: #adb5bd; }
body .choices[data-type*="select-one"]::after { right: .875rem; border-color: #8392ab transparent transparent; }
body .choices__list--dropdown { z-index: 9999; margin-top: .35rem; border: 0; border-radius: .5rem; background: #fff; box-shadow: 0 8px 26px -4px rgba(20,20,20,.15), 0 8px 9px -5px rgba(20,20,20,.06); }
body .choices__list--dropdown .choices__list { max-height: 17rem; padding: .35rem; }
body .choices__list--dropdown .choices__item { padding: .55rem .75rem; border-radius: .375rem; color: #344767; font-size: .82rem; line-height: 1.35; }
body .choices__list--dropdown .choices__item--selectable.is-highlighted { color: #344767; background: #f8f9fa; }
body .choices__input { margin: .25rem 0 .4rem; padding: .5rem .65rem; border-radius: .375rem; background: #f8f9fa; color: #344767; font-size: .82rem; }
body .choices.is-open { z-index: 100; }

/* Patch 6E — Argon sign-in illustration adaptation. */
.mbg-auth-page {
  position: relative;
  min-height: 100vh;
  padding: 1.25rem;
  overflow: hidden;
  background: #fff;
}
.mbg-auth-brandbar {
  position: absolute;
  top: 1.75rem;
  left: 2.5rem;
  right: 2.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}
.mbg-auth-brand,
.mbg-auth-public-link { pointer-events: auto; }
.mbg-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: #344767;
  text-decoration: none;
}
.mbg-auth-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .75rem;
  color: #fff;
  background: linear-gradient(310deg, #5e72e4, #825ee4);
  box-shadow: 0 4px 7px -1px rgba(0,0,0,.12), 0 2px 4px -1px rgba(0,0,0,.07);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.mbg-auth-brand strong,
.mbg-auth-brand small { display: block; }
.mbg-auth-brand strong { color: #344767; font-size: .88rem; line-height: 1.2; }
.mbg-auth-brand small { margin-top: .13rem; color: #8392ab; font-size: .66rem; font-weight: 600; }
.mbg-auth-public-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem .9rem;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: .7rem;
  color: #fff;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease;
}
.mbg-auth-public-link:hover { color: #fff; background: rgba(255,255,255,.2); transform: translateY(-1px); }
.mbg-auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(31rem, 1fr);
  min-height: calc(100vh - 2.5rem);
  align-items: stretch;
}
.mbg-auth-form-column {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 6rem 5vw 4rem;
}
.mbg-auth-form-panel { width: min(100%, 27rem); }
.mbg-auth-heading { margin-bottom: 2rem; }
.mbg-auth-eyebrow {
  display: inline-flex;
  margin-bottom: .7rem;
  color: #5e72e4;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mbg-auth-heading h1 {
  margin: 0 0 .6rem;
  color: #344767;
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.15;
}
.mbg-auth-heading p {
  max-width: 26rem;
  margin: 0;
  color: #8392ab;
  font-size: .88rem;
  line-height: 1.65;
}
.mbg-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-bottom: 1.25rem;
  padding: .85rem 1rem;
  border: 1px solid #ffd5dc;
  border-radius: .65rem;
  color: #b4233b;
  background: #fff5f6;
  font-size: .75rem;
  line-height: 1.5;
}
.mbg-auth-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 1.8rem;
  border-radius: .5rem;
  color: #f5365c;
  background: #ffe7ec;
}
.mbg-auth-field { margin-bottom: 1.15rem; }
.mbg-auth-field > label,
.mbg-auth-label-row label {
  display: inline-block;
  margin: 0 0 .5rem .15rem;
  color: #344767;
  font-size: .7rem;
  font-weight: 700;
}
.mbg-auth-control { position: relative; }
.mbg-auth-control input {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: .78rem 2.8rem .78rem 2.75rem;
  border: 1px solid #d2d6da;
  border-radius: .55rem;
  outline: 0;
  color: #495057;
  background: #fff;
  box-shadow: none;
  font-family: inherit;
  font-size: .82rem;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mbg-auth-control input::placeholder { color: #adb5bd; }
.mbg-auth-control input:focus {
  border-color: #5e72e4;
  box-shadow: 0 0 0 2px rgba(94,114,228,.14);
}
.mbg-auth-control-icon {
  position: absolute;
  top: 50%;
  left: .95rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8392ab;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: .82rem;
}
.mbg-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: .5rem;
  color: #8392ab;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .15s ease, background-color .15s ease;
}
.mbg-auth-password-toggle:hover { color: #5e72e4; background: #f4f5fb; }
.mbg-auth-options { display: flex; align-items: center; justify-content: space-between; min-height: 1.75rem; margin-top: .15rem; }
.mbg-auth-switch { display: inline-flex; align-items: center; gap: .6rem; margin: 0; cursor: pointer; user-select: none; }
.mbg-auth-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.mbg-auth-switch-track {
  position: relative;
  width: 2.5rem;
  height: 1.25rem;
  border: 1px solid #e9ecef;
  border-radius: 999px;
  background: #e9ecef;
  transition: background-color .2s ease, border-color .2s ease;
}
.mbg-auth-switch-track::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: .9rem;
  height: .9rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.16);
  content: '';
  transition: transform .2s ease;
}
.mbg-auth-switch input:checked + .mbg-auth-switch-track { border-color: #5e72e4; background: #5e72e4; }
.mbg-auth-switch input:checked + .mbg-auth-switch-track::after { transform: translateX(1.2rem); }
.mbg-auth-switch input:focus-visible + .mbg-auth-switch-track { box-shadow: 0 0 0 2px rgba(94,114,228,.2); }
.mbg-auth-switch-label { color: #67748e; font-size: .76rem; }
.mbg-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  min-height: 3rem;
  margin-top: 1.65rem;
  padding: .75rem 1.25rem;
  border: 0;
  border-radius: .55rem;
  color: #fff;
  background: #5e72e4;
  box-shadow: 0 4px 6px -1px rgba(94,114,228,.28), 0 2px 4px -1px rgba(94,114,228,.18);
  cursor: pointer;
  font-family: inherit;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.mbg-auth-submit:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 7px 12px -3px rgba(94,114,228,.35); }
.mbg-auth-submit.is-loading { opacity: .7; pointer-events: none; }
.mbg-auth-submit.is-loading i { animation: mbg-auth-pulse .8s ease-in-out infinite alternate; }
@keyframes mbg-auth-pulse { from { opacity: .35; transform: translateX(0); } to { opacity: 1; transform: translateX(.2rem); } }
.mbg-auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin: 1rem 0 0;
  color: #a0aec0;
  font-size: .64rem;
  line-height: 1.45;
  text-align: center;
}
.mbg-auth-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  min-height: calc(100vh - 2.5rem);
  margin: 0;
  overflow: hidden;
  border-radius: 1rem;
  background-color: #5e72e4;
  background-image:
    linear-gradient(310deg, rgba(23,43,77,.76), rgba(94,114,228,.56) 48%, rgba(130,94,228,.54)),
    url('https://raw.githubusercontent.com/creativetimofficial/public-assets/master/argon-dashboard-pro/assets/img/signin-ill.jpg');
  background-position: center;
  background-size: cover;
  box-shadow: 0 20px 27px 0 rgba(0,0,0,.08);
  isolation: isolate;
}
.mbg-auth-visual-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(23,43,77,.03) 20%, rgba(23,43,77,.68) 100%);
}
.mbg-auth-orb {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.mbg-auth-orb-one { top: 13%; right: 8%; width: 8.5rem; height: 8.5rem; }
.mbg-auth-orb-two { top: 26%; right: 29%; width: 3.4rem; height: 3.4rem; }
.mbg-auth-visual-copy {
  position: relative;
  z-index: 2;
  max-width: 34rem;
  padding: 4rem;
  color: #fff;
}
.mbg-auth-visual-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1rem;
  padding: .5rem .7rem;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: .55rem;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.mbg-auth-visual-copy h2 {
  max-width: 29rem;
  margin: 0 0 .85rem;
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.08;
}
.mbg-auth-visual-copy > p {
  max-width: 30rem;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: .9rem;
  line-height: 1.7;
}
.mbg-auth-visual-meta { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin-top: 1.6rem; }
.mbg-auth-visual-meta span { display: inline-flex; align-items: center; gap: .4rem; color: rgba(255,255,255,.9); font-size: .68rem; font-weight: 600; }
.mbg-auth-footer {
  position: absolute;
  left: 3rem;
  right: calc(50% + 2rem);
  bottom: 1.65rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem 1rem;
  flex-wrap: wrap;
  color: #a0aec0;
  font-size: .6rem;
  text-align: center;
}

@media (max-width: 991px) {
  .mbg-auth-page { padding: 0; background: #f8f9fa; }
  .mbg-auth-brandbar { position: relative; top: auto; left: auto; right: auto; padding: 1.25rem 1.5rem 0; }
  .mbg-auth-public-link { border-color: #e9ecef; color: #67748e; background: #fff; box-shadow: 0 2px 5px rgba(50,50,93,.06); }
  .mbg-auth-public-link:hover { color: #5e72e4; background: #fff; }
  .mbg-auth-shell { display: block; min-height: auto; }
  .mbg-auth-form-column { min-height: calc(100vh - 5.5rem); padding: 3rem 1.5rem 5.5rem; }
  .mbg-auth-form-panel {
    width: min(100%, 29rem);
    padding: 2rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 26px -4px rgba(20,20,20,.1), 0 8px 9px -5px rgba(20,20,20,.04);
  }
  .mbg-auth-visual { display: none; }
  .mbg-auth-footer { position: absolute; left: 1rem; right: 1rem; bottom: 1.2rem; }
}

@media (max-width: 575px) {
  .mbg-auth-brandbar { padding: 1rem 1rem 0; }
  .mbg-auth-brand small { display: none; }
  .mbg-auth-public-link span { display: none; }
  .mbg-auth-public-link { width: 2.5rem; height: 2.5rem; justify-content: center; padding: 0; }
  .mbg-auth-form-column { padding: 2.25rem 1rem 5rem; }
  .mbg-auth-form-panel { padding: 1.5rem; }
  .mbg-auth-heading { margin-bottom: 1.5rem; }
  .mbg-auth-heading h1 { font-size: 1.55rem; }
}

/* Patch 6F — compact table actions + grouped master navigation. */
.mbg-actions-column {
  width: 1%;
  min-width: max-content;
  white-space: nowrap !important;
}

.mbg-table-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  min-width: max-content;
  vertical-align: middle;
}

.mbg-table-action-form {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0;
}

.mbg-table-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: .34rem;
  min-height: 2rem;
  padding: .42rem .64rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  background: #fff;
  color: #67748e;
  box-shadow: 0 2px 5px -1px rgba(0,0,0,.08), 0 1px 3px -1px rgba(0,0,0,.05);
  font-size: .66rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease, background-color .15s ease;
}

.mbg-table-action i {
  font-size: .72rem;
  line-height: 1;
}

.mbg-table-action:hover,
.mbg-table-action:focus-visible {
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 4px 9px -3px rgba(50,50,93,.22);
}

.mbg-table-action-detail {
  border-color: #d2d6da;
  color: #344767;
}
.mbg-table-action-detail:hover,
.mbg-table-action-detail:focus-visible {
  border-color: #b8c0cc;
  color: #172b4d;
  background: #f8f9fa;
}

.mbg-table-action-edit {
  border-color: #dbe1ff;
  color: #5e72e4;
  background: #f7f8ff;
}
.mbg-table-action-edit:hover,
.mbg-table-action-edit:focus-visible {
  border-color: #bcc7ff;
  color: #233dd2;
  background: #eef1ff;
}

.mbg-table-action-warning {
  border-color: #fde6c8;
  color: #c2410c;
  background: #fff8ef;
}
.mbg-table-action-warning:hover,
.mbg-table-action-warning:focus-visible {
  border-color: #fbd3a0;
  color: #9a3412;
  background: #fff3e1;
}

.mbg-table-action-danger {
  border-color: #ffd4dc;
  color: #e11d48;
  background: #fff3f5;
}
.mbg-table-action-danger:hover,
.mbg-table-action-danger:focus-visible {
  border-color: #ffb8c6;
  color: #be123c;
  background: #ffe9ee;
}

/* Data Master uses a compact Argon-style nested navigation instead of a long flat list. */
.mbg-nav-group {
  padding: 0 .5rem;
}

.mbg-nav-group-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  min-height: 3rem;
  padding: .42rem .75rem;
  border: 0;
  border-radius: .75rem;
  background: transparent;
  color: #67748e;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.mbg-nav-group-trigger:hover,
.mbg-nav-group-trigger:focus-visible,
.mbg-nav-group-trigger.is-active {
  outline: none;
  color: #344767;
  background: #f8f9fa;
}

.mbg-nav-group-icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  align-items: center;
  justify-content: center;
  margin-right: .55rem;
  border-radius: .6rem;
  background: #fff;
  box-shadow: 0 2px 5px -1px rgba(0,0,0,.09), 0 1px 3px -1px rgba(0,0,0,.06);
}

.mbg-nav-group-icon i {
  font-size: .78rem;
}

.mbg-nav-group-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  font-size: .79rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mbg-nav-group-chevron {
  margin-left: .5rem;
  color: #adb5bd;
  font-size: .58rem;
  transition: transform .2s ease, color .15s ease;
}

.mbg-nav-group-trigger[aria-expanded="true"] .mbg-nav-group-chevron {
  transform: rotate(180deg);
  color: #67748e;
}

.mbg-nav-group-menu {
  padding: .2rem 0 .35rem 2.15rem;
}

.mbg-nav-subitem {
  position: relative;
  display: flex;
  min-height: 2.25rem;
  align-items: center;
  gap: .55rem;
  margin: .08rem .35rem .08rem 0;
  padding: .35rem .65rem;
  border-radius: .55rem;
  color: #8392ab;
  font-size: .74rem;
  font-weight: 500;
  line-height: 1.25;
  transition: color .15s ease, background-color .15s ease;
}

.mbg-nav-subitem:hover,
.mbg-nav-subitem:focus-visible {
  outline: none;
  color: #344767;
  background: #f8f9fa;
}

.mbg-nav-subitem.is-active {
  color: #344767;
  font-weight: 700;
  background: rgba(94,114,228,.10);
}

.mbg-nav-subitem-icon {
  display: inline-flex;
  width: 1.25rem;
  flex: 0 0 1.25rem;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: .65rem;
}

.mbg-nav-subitem.is-active .mbg-nav-subitem-icon {
  color: #5e72e4;
}

@media (max-width: 767px) {
  .mbg-table-action {
    min-height: 2.15rem;
    padding: .46rem .65rem;
  }
}

/* Patch 7B — snapshot monitoring dashboard. */
.mbg-monitoring-dashboard {
  position: relative;
  min-height: 24rem;
}

.mbg-dashboard-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  overflow: hidden;
  margin-top: .25rem;
  padding: 1.6rem 1.75rem;
  border-radius: 1rem;
  color: #fff;
  background:
    radial-gradient(circle at 82% 25%, rgba(255,255,255,.18), transparent 24%),
    linear-gradient(310deg, #5e72e4 0%, #825ee4 100%);
  box-shadow: 0 12px 28px -10px rgba(94,114,228,.48);
}

.mbg-dashboard-hero::after {
  content: '';
  position: absolute;
  width: 13rem;
  height: 13rem;
  right: -4rem;
  bottom: -7rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
}

.mbg-dashboard-hero-copy,
.mbg-dashboard-hero-meta { position: relative; z-index: 1; }
.mbg-dashboard-hero-copy { max-width: 46rem; }
.mbg-dashboard-eyebrow {
  display: inline-block;
  margin-bottom: .35rem;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .82;
}
.mbg-dashboard-hero h4 {
  margin: 0 0 .35rem;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}
.mbg-dashboard-hero p {
  max-width: 46rem;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: .79rem;
  line-height: 1.6;
}
.mbg-dashboard-hero-meta {
  display: flex;
  min-width: 13rem;
  align-items: center;
  gap: .7rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: .75rem;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
}
.mbg-dashboard-status-dot {
  width: .58rem;
  height: .58rem;
  flex: 0 0 .58rem;
  border-radius: 50%;
  background: #2dce89;
  box-shadow: 0 0 0 4px rgba(45,206,137,.18);
}
.mbg-dashboard-hero-meta small,
.mbg-dashboard-hero-meta strong { display: block; }
.mbg-dashboard-hero-meta small { color: rgba(255,255,255,.68); font-size: .63rem; }
.mbg-dashboard-hero-meta strong { margin-top: .08rem; color: #fff; font-size: .8rem; }

.mbg-dashboard-filter-card,
.mbg-dashboard-panel {
  position: relative;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 26px -4px rgba(20,20,20,.10), 0 8px 9px -5px rgba(20,20,20,.04);
}
.mbg-dashboard-filter-card {
  z-index: 45;
  margin-top: 1.25rem;
  padding: 1.35rem 1.4rem;
  overflow: visible;
}
.mbg-dashboard-section-head,
.mbg-dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.mbg-dashboard-section-head { margin-bottom: 1.15rem; }
.mbg-dashboard-section-kicker {
  display: block;
  margin-bottom: .2rem;
  color: #5e72e4;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.mbg-dashboard-section-head h5,
.mbg-dashboard-panel-head h5 {
  margin: 0;
  color: #344767;
  font-size: .96rem;
  font-weight: 700;
}
.mbg-dashboard-section-head p,
.mbg-dashboard-panel-head p {
  margin: .2rem 0 0;
  color: #8392ab;
  font-size: .7rem;
  line-height: 1.5;
}
.mbg-dashboard-filter-state { flex: 0 0 auto; }
.mbg-dashboard-error {
  margin-bottom: 1rem;
  padding: .7rem .85rem;
  border: 1px solid #ffd4dc;
  border-radius: .65rem;
  color: #b4233e;
  background: #fff3f5;
  font-size: .73rem;
  font-weight: 600;
}

.mbg-dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .9rem;
}
.mbg-dashboard-filter-grid > .mbg-field { grid-column: span 1; }
.mbg-dashboard-filter-grid > .mbg-dashboard-filter-span-2 { grid-column: span 2; }
.mbg-field label {
  display: block;
  margin: 0 0 .42rem .15rem;
  color: #344767;
  font-size: .68rem;
  font-weight: 700;
}
.mbg-dashboard-filter-card .mbg-input {
  min-height: 2.55rem;
  border-radius: .65rem;
  font-size: .79rem;
}
.mbg-dashboard-filter-card .choices {
  width: 100%;
  margin: 0;
}
.mbg-dashboard-filter-card .choices__inner {
  min-height: 2.55rem;
  border-radius: .65rem !important;
}
.mbg-dashboard-filter-card .choices__list--dropdown,
.mbg-dashboard-filter-card .choices__list[aria-expanded] { z-index: 1000; }

.mbg-dashboard-advanced {
  margin-top: .9rem;
  border: 1px solid #edf0f5;
  border-radius: .75rem;
  background: #fbfcfe;
}
.mbg-dashboard-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .78rem .9rem;
  color: #52637a;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.mbg-dashboard-advanced summary::-webkit-details-marker { display: none; }
.mbg-dashboard-advanced summary span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .72rem;
  font-weight: 700;
}
.mbg-dashboard-advanced summary small { color: #a0aec0; font-size: .64rem; }
.mbg-dashboard-advanced[open] summary { border-bottom: 1px solid #edf0f5; }
.mbg-dashboard-advanced-body {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  padding: .9rem;
}
.mbg-dashboard-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f2f5;
}
.mbg-dashboard-filter-help {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: #a0aec0;
  font-size: .65rem;
}
.mbg-dashboard-filter-help i { color: #5e72e4; }
.mbg-dashboard-filter-buttons {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .55rem;
}

.mbg-dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.15rem;
}
.mbg-dashboard-kpi {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: .85rem;
  padding: 1.05rem;
  border-radius: .9rem;
  background: #fff;
  box-shadow: 0 8px 22px -8px rgba(20,20,20,.12), 0 3px 8px -5px rgba(20,20,20,.07);
}
.mbg-dashboard-kpi-icon {
  display: inline-flex;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 2.45rem;
  align-items: center;
  justify-content: center;
  border-radius: .7rem;
  font-size: .82rem;
}
.mbg-dashboard-kpi-blue { color: #5e72e4; background: #f0f2ff; }
.mbg-dashboard-kpi-green { color: #2dce89; background: #eafbf4; }
.mbg-dashboard-kpi-orange { color: #fb6340; background: #fff2ed; }
.mbg-dashboard-kpi-purple { color: #825ee4; background: #f4efff; }
.mbg-dashboard-kpi-cyan { color: #11cdef; background: #eafaff; }
.mbg-dashboard-kpi-red { color: #f5365c; background: #fff0f3; }
.mbg-dashboard-kpi > div:last-child { min-width: 0; }
.mbg-dashboard-kpi span,
.mbg-dashboard-kpi strong,
.mbg-dashboard-kpi small { display: block; }
.mbg-dashboard-kpi span {
  margin-bottom: .18rem;
  color: #8392ab;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.mbg-dashboard-kpi strong {
  overflow: hidden;
  color: #344767;
  font-size: 1.28rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mbg-dashboard-kpi small {
  margin-top: .28rem;
  color: #a0aec0;
  font-size: .6rem;
  line-height: 1.4;
}
.mbg-dashboard-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(20rem, .85fr);
  gap: 1rem;
  margin-top: 1rem;
}
.mbg-dashboard-panel {
  min-width: 0;
  overflow: hidden;
  padding: 1.2rem 1.25rem;
}
.mbg-dashboard-panel-head { min-height: 3.2rem; }
.mbg-dashboard-panel-link {
  flex: 0 0 auto;
  color: #5e72e4;
  font-size: .68rem;
  font-weight: 700;
}
.mbg-dashboard-panel-link:hover { color: #344767; }
.mbg-dashboard-chart-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: .25rem .55rem;
  border-radius: 999px;
  color: #5e72e4;
  background: #f0f2ff;
  font-size: .62rem;
  font-weight: 700;
}
.mbg-dashboard-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 19rem;
  margin-top: .8rem;
}
.mbg-dashboard-chart-tall { height: 20rem; }
.mbg-dashboard-chart-distribution { height: 25rem; }
.mbg-dashboard-chart-ranking { height: 22rem; }
.mbg-dashboard-chart-status { height: 22rem; }
.mbg-dashboard-chart-scatter { height: 28rem; }
.mbg-dashboard-scatter-panel { margin-top: 1rem; }
.mbg-dashboard-chart-wrap canvas { width: 100% !important; height: 100% !important; }
.mbg-dashboard-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #a0aec0;
  border: 1px dashed #e9ecef;
  border-radius: .75rem;
  background: #fbfcfe;
  font-size: .72rem;
  text-align: center;
}
.mbg-dashboard-chart-empty.hidden { display: none; }

.mbg-dashboard-loading {
  position: fixed;
  z-index: 1070;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  background: rgba(248,249,250,.16);
  transition: opacity .15s ease;
}
.mbg-monitoring-dashboard.is-loading .mbg-dashboard-loading {
  pointer-events: auto;
  opacity: 1;
}
.mbg-dashboard-loading-card {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem 1rem;
  border: 1px solid #e9ecef;
  border-radius: .75rem;
  color: #52637a;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 26px -5px rgba(20,20,20,.16);
  font-size: .72rem;
  font-weight: 700;
}
.mbg-dashboard-loading-card i { color: #5e72e4; }

@media (max-width: 1199px) {
  .mbg-dashboard-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mbg-dashboard-filter-grid > .mbg-dashboard-filter-span-2 { grid-column: span 1; }
  .mbg-dashboard-advanced-body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mbg-dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mbg-dashboard-chart-grid { grid-template-columns: 1fr; }
  .mbg-dashboard-chart-ranking,
  .mbg-dashboard-chart-status { height: 20rem; }
  .mbg-dashboard-chart-scatter { height: 24rem; }
}

@media (max-width: 767px) {
  .mbg-dashboard-hero { align-items: flex-start; flex-direction: column; padding: 1.25rem; }
  .mbg-dashboard-hero-meta { width: 100%; }
  .mbg-dashboard-filter-card { padding: 1.05rem; }
  .mbg-dashboard-section-head,
  .mbg-dashboard-panel-head,
  .mbg-dashboard-filter-actions { align-items: stretch; flex-direction: column; }
  .mbg-dashboard-filter-grid,
  .mbg-dashboard-advanced-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mbg-dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mbg-dashboard-filter-buttons { justify-content: flex-end; }
  .mbg-dashboard-filter-help { align-items: flex-start; }
  .mbg-dashboard-chart-tall,
  .mbg-dashboard-chart-distribution,
  .mbg-dashboard-chart-ranking,
  .mbg-dashboard-chart-status { height: 18rem; }
  .mbg-dashboard-chart-scatter { height: 22rem; }
}

@media (max-width: 575px) {
  .mbg-dashboard-filter-grid,
  .mbg-dashboard-advanced-body,
  .mbg-dashboard-kpi-grid { grid-template-columns: 1fr; }
  .mbg-dashboard-advanced summary { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .mbg-dashboard-filter-buttons { width: 100%; }
  .mbg-dashboard-filter-buttons .mbg-btn { flex: 1 1 0; }
  .mbg-dashboard-panel { padding: 1rem; }
  .mbg-dashboard-chart-wrap { min-height: 16rem; }
  .mbg-dashboard-chart-distribution { height: 19rem; }
  .mbg-dashboard-chart-scatter { height: 20rem; }
}

/* ========================================================================== */
/* Patch 7D — Public monitoring landing                                       */
/* ========================================================================== */
.mbg-public-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 15%, rgba(94,114,228,.08), transparent 28rem),
    linear-gradient(180deg, #f7f9fc 0, #f8f9fa 36rem, #f8f9fa 100%);
}
.mbg-public-hero {
  position: relative;
  min-height: 31rem;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(17,205,239,.33), transparent 20rem),
    radial-gradient(circle at 8% 8%, rgba(137,101,224,.30), transparent 25rem),
    linear-gradient(135deg, #172b4d 0%, #3047a6 48%, #5e72e4 100%);
}
.mbg-public-hero::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -11rem;
  left: -12%;
  height: 14rem;
  border-radius: 50% 50% 0 0 / 35% 35% 0 0;
  background: #f8f9fa;
}
.mbg-public-hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  opacity: .65;
  pointer-events: none;
}
.mbg-public-hero-glow-one {
  top: 7rem;
  right: 8%;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 3rem rgba(255,255,255,.025), 0 0 0 6rem rgba(255,255,255,.018);
}
.mbg-public-hero-glow-two {
  top: -9rem;
  left: 32%;
  width: 20rem;
  height: 20rem;
  background: rgba(255,255,255,.04);
}
.mbg-public-nav,
.mbg-public-hero-inner,
.mbg-public-main,
.mbg-public-footer {
  width: min(1180px, calc(100% - 2rem));
  margin-right: auto;
  margin-left: auto;
}
.mbg-public-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
}
.mbg-public-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
}
.mbg-public-brand:hover { color: #fff; }
.mbg-public-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: .9rem;
  color: #344767;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 25px rgba(20,20,20,.16);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
}
.mbg-public-brand strong,
.mbg-public-brand small { display: block; }
.mbg-public-brand strong { font-size: .92rem; line-height: 1.25; }
.mbg-public-brand small { margin-top: .12rem; color: rgba(255,255,255,.68); font-size: .63rem; }
.mbg-public-nav-actions { display: flex; align-items: center; gap: .65rem; }
.mbg-public-nav-link,
.mbg-public-login-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.55rem;
  padding: .65rem 1rem;
  border-radius: .75rem;
  font-size: .67rem;
  font-weight: 700;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.mbg-public-nav-link {
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}
.mbg-public-nav-link:hover { color: #fff; background: rgba(255,255,255,.15); transform: translateY(-1px); }
.mbg-public-login-btn {
  color: #344767;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20,20,20,.16);
}
.mbg-public-login-btn:hover { color: #344767; transform: translateY(-1px); box-shadow: 0 12px 28px rgba(20,20,20,.2); }
.mbg-public-hero-inner {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(20rem, .8fr);
  gap: 4rem;
  align-items: center;
  padding-top: 4.2rem;
  padding-bottom: 7.5rem;
}
.mbg-public-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  padding: .42rem .72rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: rgba(255,255,255,.84);
  background: rgba(255,255,255,.07);
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mbg-public-hero-copy h1 {
  max-width: 47rem;
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(2.35rem, 4.9vw, 4rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -.045em;
}
.mbg-public-hero-copy h1 span { color: #b9e9ff; }
.mbg-public-hero-copy > p {
  max-width: 42rem;
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: .97rem;
  line-height: 1.75;
}
.mbg-public-hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.45rem; }
.mbg-public-hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .72rem;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: .7rem;
  color: rgba(255,255,255,.88);
  background: rgba(17,24,39,.14);
  font-size: .66rem;
  font-weight: 600;
}
.mbg-public-hero-summary {
  padding: 1.35rem;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 1.25rem;
  background: rgba(255,255,255,.93);
  box-shadow: 0 25px 55px -18px rgba(14,26,58,.45);
  backdrop-filter: blur(14px);
}
.mbg-public-summary-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .15rem .1rem 1rem; }
.mbg-public-summary-top span { display: block; color: #8392ab; font-size: .63rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.mbg-public-summary-top strong { display: block; margin-top: .2rem; color: #344767; font-size: 2.05rem; line-height: 1; }
.mbg-public-summary-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  border-radius: .9rem;
  color: #fff !important;
  background: linear-gradient(135deg, #5e72e4, #825ee4);
  box-shadow: 0 8px 18px rgba(94,114,228,.3);
  font-size: 1rem !important;
}
.mbg-public-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; }
.mbg-public-summary-grid > div { padding: .85rem .9rem; border: 1px solid #edf0f6; border-radius: .85rem; background: #f8f9fc; }
.mbg-public-summary-grid span { display: block; color: #8392ab; font-size: .6rem; font-weight: 700; text-transform: uppercase; }
.mbg-public-summary-grid strong { display: block; margin-top: .18rem; color: #344767; font-size: 1.15rem; }
.mbg-public-main { position: relative; z-index: 10; margin-top: -4.75rem; padding-bottom: 3rem; }
.mbg-public-filter-card,
.mbg-public-panel,
.mbg-public-stat-card,
.mbg-public-info-strip {
  border: 1px solid rgba(226,232,240,.86);
  background: rgba(255,255,255,.98);
  box-shadow: 0 14px 34px -16px rgba(20,20,20,.18);
}
.mbg-public-filter-card { padding: 1.4rem; border-radius: 1.15rem; }
.mbg-public-filter-head,
.mbg-public-panel-head,
.mbg-public-panel-head-ranking { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.mbg-public-section-kicker {
  display: block;
  margin-bottom: .28rem;
  color: #5e72e4;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mbg-public-filter-head h2,
.mbg-public-panel-head h3 { margin: 0; color: #344767; font-weight: 700; }
.mbg-public-filter-head h2 { font-size: 1.1rem; }
.mbg-public-panel-head h3 { font-size: .98rem; }
.mbg-public-filter-head p,
.mbg-public-panel-head p { margin: .3rem 0 0; color: #8392ab; font-size: .67rem; line-height: 1.55; }
.mbg-public-filter-state,
.mbg-public-ranking-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex: 0 0 auto;
  padding: .42rem .65rem;
  border-radius: 999px;
  color: #5e72e4;
  background: #f0f2ff;
  font-size: .62rem;
  font-weight: 700;
}
.mbg-public-alert {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1rem;
  padding: .65rem .8rem;
  border: 1px solid #fed7aa;
  border-radius: .7rem;
  color: #9a3412;
  background: #fff7ed;
  font-size: .68rem;
  font-weight: 600;
}
.mbg-public-filter-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.15fr) minmax(0,1.65fr) auto;
  gap: .85rem;
  align-items: end;
  margin-top: 1.15rem;
}
.mbg-public-filter-field label { display: block; margin-bottom: .38rem; color: #52637a; font-size: .62rem; font-weight: 700; }
.mbg-public-filter-field .choices { margin-bottom: 0; }
.mbg-public-filter-field .choices__inner {
  min-height: 2.6rem;
  padding: .52rem .7rem .4rem;
  border: 1px solid #dfe4eb;
  border-radius: .65rem;
  background: #fff;
  box-shadow: none;
  font-size: .68rem;
}
.mbg-public-filter-field .is-focused .choices__inner,
.mbg-public-filter-field .is-open .choices__inner { border-color: #5e72e4; box-shadow: 0 0 0 2px rgba(94,114,228,.12); }
.mbg-public-filter-field .choices__list--dropdown { z-index: 40; border-radius: .7rem; border-color: #e9ecef; box-shadow: 0 10px 25px rgba(20,20,20,.12); }
.mbg-public-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.mbg-public-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.6rem;
  padding: .62rem .82rem;
  border: 0;
  border-radius: .65rem;
  font-size: .63rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.mbg-public-btn:hover { transform: translateY(-1px); }
.mbg-public-btn-primary { color: #fff; background: linear-gradient(135deg, #5e72e4, #825ee4); box-shadow: 0 7px 18px rgba(94,114,228,.24); }
.mbg-public-btn-primary:hover { color: #fff; box-shadow: 0 10px 22px rgba(94,114,228,.3); }
.mbg-public-btn-light { color: #52637a; background: #f4f5f7; }
.mbg-public-btn-light:hover { color: #344767; background: #e9ecef; }
.mbg-public-active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-top: .85rem; padding-top: .85rem; border-top: 1px solid #edf0f6; }
.mbg-public-active-filters > span { color: #8392ab; font-size: .62rem; font-weight: 600; }
.mbg-public-active-filters strong { padding: .3rem .5rem; border-radius: .5rem; color: #344767; background: #f4f5f7; font-size: .61rem; font-weight: 700; }
.mbg-public-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .85rem; margin-top: 1rem; }
.mbg-public-stat-card { display: flex; align-items: center; gap: .9rem; min-width: 0; padding: 1rem; border-radius: .95rem; }
.mbg-public-stat-card > div { min-width: 0; }
.mbg-public-stat-card > div > span { display: block; color: #8392ab; font-size: .59rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mbg-public-stat-card strong { display: block; margin-top: .13rem; color: #344767; font-size: 1.25rem; line-height: 1.2; }
.mbg-public-stat-card small { display: block; margin-top: .13rem; overflow: hidden; color: #a0aec0; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.mbg-public-stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; flex: 0 0 2.6rem; border-radius: .8rem; color: #fff; box-shadow: 0 7px 15px rgba(20,20,20,.11); }
.mbg-public-stat-icon.is-blue { background: linear-gradient(135deg,#5e72e4,#825ee4); }
.mbg-public-stat-icon.is-green { background: linear-gradient(135deg,#2dce89,#2dcecc); }
.mbg-public-stat-icon.is-purple { background: linear-gradient(135deg,#8965e0,#825ee4); }
.mbg-public-stat-icon.is-orange { background: linear-gradient(135deg,#fb6340,#fbb140); }
.mbg-public-stat-icon.is-cyan { background: linear-gradient(135deg,#11cdef,#2dcecc); }
.mbg-public-stat-icon.is-rose { background: linear-gradient(135deg,#f5365c,#fb6340); }
.mbg-public-chart-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(20rem,.75fr); gap: 1rem; margin-top: 1rem; }
.mbg-public-panel { min-width: 0; padding: 1.2rem; border-radius: 1rem; }
.mbg-public-chart-wrap { position: relative; width: 100%; margin-top: .75rem; }
.mbg-public-chart-bar { height: 24rem; }
.mbg-public-chart-pie { height: 24rem; }
.mbg-public-chart-wrap canvas { width: 100% !important; height: 100% !important; }
.mbg-public-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1rem; border: 1px dashed #e9ecef; border-radius: .8rem; color: #a0aec0; background: #fbfcfe; font-size: .68rem; text-align: center; }
.mbg-public-empty-static { position: static; min-height: 5rem; }
.mbg-public-ranking-panel { margin-top: 1rem; }
.mbg-public-ranking-list { margin-top: .55rem; }
.mbg-public-ranking-item { display: flex; align-items: flex-start; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid #f1f3f7; }
.mbg-public-ranking-item:last-child { border-bottom: 0; }
.mbg-public-ranking-number { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; flex: 0 0 2rem; border-radius: .65rem; color: #5e72e4; background: #f0f2ff; font-size: .67rem; font-weight: 800; }
.mbg-public-ranking-main { min-width: 0; flex: 1; }
.mbg-public-ranking-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.mbg-public-ranking-title > div { min-width: 0; }
.mbg-public-ranking-title strong { display: block; overflow: hidden; color: #344767; font-size: .7rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.mbg-public-ranking-title small { display: block; margin-top: .15rem; color: #a0aec0; font-size: .59rem; }
.mbg-public-ranking-title > span { flex: 0 0 auto; color: #52637a; font-size: .64rem; font-weight: 700; }
.mbg-public-progress { height: .34rem; margin-top: .5rem; overflow: hidden; border-radius: 999px; background: #edf0f6; }
.mbg-public-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#5e72e4,#11cdef); }
.mbg-public-info-strip { display: flex; align-items: flex-start; gap: .8rem; margin-top: 1rem; padding: 1rem 1.1rem; border-radius: .9rem; }
.mbg-public-info-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; flex: 0 0 2.25rem; border-radius: .7rem; color: #5e72e4; background: #f0f2ff; }
.mbg-public-info-strip strong { display: block; color: #344767; font-size: .68rem; }
.mbg-public-info-strip p { margin: .2rem 0 0; color: #8392ab; font-size: .62rem; line-height: 1.55; }
.mbg-public-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 0 2.3rem; color: #8392ab; }
.mbg-public-footer strong,
.mbg-public-footer span { display: block; }
.mbg-public-footer strong { color: #52637a; font-size: .67rem; }
.mbg-public-footer span { margin-top: .15rem; font-size: .58rem; }
.mbg-public-footer a { color: #5e72e4; font-size: .62rem; font-weight: 700; }

@media (max-width: 1023px) {
  .mbg-public-hero-inner { grid-template-columns: 1fr; gap: 1.75rem; padding-top: 3.2rem; }
  .mbg-public-hero-summary { max-width: 34rem; }
  .mbg-public-filter-form { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mbg-public-filter-field-wide { grid-column: span 2; }
  .mbg-public-filter-actions { grid-column: span 2; }
  .mbg-public-chart-grid { grid-template-columns: 1fr; }
  .mbg-public-chart-pie { height: 21rem; }
}

@media (max-width: 767px) {
  .mbg-public-nav,
  .mbg-public-hero-inner,
  .mbg-public-main,
  .mbg-public-footer { width: min(calc(100% - 1rem), 1180px); }
  .mbg-public-nav { padding-top: .75rem; }
  .mbg-public-brand small { display: none; }
  .mbg-public-nav-link,
  .mbg-public-login-btn { padding: .58rem .7rem; }
  .mbg-public-hero { min-height: 33rem; }
  .mbg-public-hero-inner { padding-top: 2.7rem; padding-bottom: 8.2rem; }
  .mbg-public-hero-copy h1 { font-size: 2.35rem; }
  .mbg-public-hero-copy > p { font-size: .82rem; }
  .mbg-public-main { margin-top: -5.2rem; }
  .mbg-public-filter-head,
  .mbg-public-panel-head,
  .mbg-public-panel-head-ranking { flex-direction: column; }
  .mbg-public-filter-state { align-self: flex-start; }
  .mbg-public-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mbg-public-chart-bar { height: 21rem; }
}

@media (max-width: 575px) {
  .mbg-public-brand strong { font-size: .76rem; }
  .mbg-public-brand-mark { width: 2.45rem; height: 2.45rem; flex-basis: 2.45rem; }
  .mbg-public-login-btn span { display: none; }
  .mbg-public-hero-inner { padding-top: 2.2rem; }
  .mbg-public-hero-copy h1 { font-size: 2rem; }
  .mbg-public-hero-badges { align-items: stretch; flex-direction: column; }
  .mbg-public-hero-badges span { width: fit-content; }
  .mbg-public-summary-grid { grid-template-columns: 1fr 1fr; }
  .mbg-public-filter-card,
  .mbg-public-panel { padding: 1rem; }
  .mbg-public-filter-form { grid-template-columns: 1fr; }
  .mbg-public-filter-field-wide,
  .mbg-public-filter-actions { grid-column: auto; }
  .mbg-public-filter-actions { width: 100%; }
  .mbg-public-filter-actions .mbg-public-btn { flex: 1 1 0; }
  .mbg-public-stat-grid { grid-template-columns: 1fr; }
  .mbg-public-stat-card { padding: .85rem; }
  .mbg-public-chart-bar { height: 20rem; }
  .mbg-public-chart-pie { height: 22rem; }
  .mbg-public-ranking-title { gap: .5rem; }
  .mbg-public-ranking-title > span { font-size: .58rem; }
  .mbg-public-footer { align-items: flex-start; flex-direction: column; }
}

/* ========================================================================== */
/* Patch 7E — Public AJAX filter & privacy cleanup                            */
/* ========================================================================== */
.mbg-public-active-filter-labels {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}
.mbg-public-filter-form.is-loading .mbg-public-filter-field,
.mbg-public-filter-form.is-loading .mbg-public-btn-light {
  opacity: .72;
}
.mbg-public-filter-form.is-loading .mbg-public-btn-primary {
  cursor: wait;
  opacity: .82;
  transform: none;
  box-shadow: 0 5px 14px rgba(94,114,228,.18);
}
.mbg-public-filter-form .mbg-public-btn[aria-disabled="true"] {
  pointer-events: none;
}
.mbg-public-filter-form button:disabled {
  cursor: wait;
}


/* ========================================================================== */
/* Patch 7F — Public empty-state fix & cascading village filter               */
/* ========================================================================== */
.mbg-public-page [hidden] {
  display: none !important;
}

@media (min-width: 1024px) {
  .mbg-public-filter-form.is-desa-hidden {
    grid-template-columns: minmax(0,1fr) minmax(0,1.65fr) auto;
  }
}

@media (min-width: 576px) and (max-width: 1023px) {
  .mbg-public-filter-form.is-desa-hidden .mbg-public-filter-field-wide {
    grid-column: auto;
  }
}

/* ========================================================================== */
/* Patch 7G — Public cascading SPPG filter                                    */
/* ========================================================================== */
@media (min-width: 1024px) {
  .mbg-public-filter-form.is-sppg-hidden:not(.is-desa-hidden) {
    grid-template-columns: minmax(0,1fr) minmax(0,1.15fr) auto;
  }
  .mbg-public-filter-form.is-desa-hidden.is-sppg-hidden {
    grid-template-columns: minmax(0,1fr) auto;
  }
}

@media (min-width: 576px) and (max-width: 1023px) {
  .mbg-public-filter-form.is-desa-hidden.is-sppg-hidden .mbg-public-filter-actions {
    grid-column: auto;
  }
}

/* Patch 8: production branding */
.mbg-brand-logo,
.mbg-auth-brand-logo,
.mbg-public-brand-logo {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.mbg-brand-logo {
  width: 2.8rem;
  height: 2.8rem;
  flex-basis: 2.8rem;
  padding: .2rem;
  border: 1px solid #e9ecef;
  border-radius: .7rem;
  box-shadow: 0 4px 10px rgba(50,50,93,.12);
}

.mbg-auth-brand-logo {
  width: 2.85rem;
  height: 2.85rem;
  padding: .18rem;
  border: 1px solid #e9ecef;
  border-radius: .72rem;
  box-shadow: 0 4px 10px rgba(50,50,93,.12);
}

.mbg-public-brand-logo {
  width: 3rem;
  height: 3rem;
  padding: .18rem;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: .82rem;
  box-shadow: 0 12px 25px rgba(20,20,20,.16);
}

span.mbg-brand-logo,
span.mbg-auth-brand-logo,
span.mbg-public-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(310deg, #5e72e4, #825ee4);
  font-size: .78rem;
  font-weight: 800;
}

span.mbg-public-brand-logo {
  color: #344767;
  background: rgba(255,255,255,.96);
}

@media (max-width: 575.98px) {
  .mbg-public-brand-logo {
    width: 2.55rem;
    height: 2.55rem;
  }
}

.mbg-error-page {
  min-height: 100vh;
  margin: 0;
  background: #f8f9fa;
  color: #67748e;
  font-family: "Open Sans", sans-serif;
}
.mbg-error-shell {
  width: min(100% - 2rem, 52rem);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}
.mbg-error-brand {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: .75rem;
  margin-bottom: 1.4rem;
  color: #344767;
  text-decoration: none;
}
.mbg-error-brand span { display: flex; flex-direction: column; }
.mbg-error-brand strong { font-size: .9rem; }
.mbg-error-brand small { margin-top: .15rem; color: #8392ab; font-size: .68rem; }
.mbg-error-logo {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  padding: .2rem;
  border: 1px solid #e9ecef;
  border-radius: .8rem;
  background: #fff;
  box-shadow: 0 4px 12px rgba(50,50,93,.12);
}
span.mbg-error-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(310deg, #5e72e4, #825ee4);
  font-size: .78rem;
  font-weight: 800;
}
.mbg-error-card {
  padding: clamp(2rem, 6vw, 4rem);
  text-align: center;
  border: 1px solid #edf2f7;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 20px 45px rgba(50,50,93,.08);
}
.mbg-error-code {
  display: inline-flex;
  margin-bottom: .8rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  color: #5e72e4;
  background: rgba(94,114,228,.1);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.mbg-error-card h1 { margin: 0; color: #344767; font-size: clamp(1.65rem, 4vw, 2.5rem); }
.mbg-error-card p { max-width: 36rem; margin: 1rem auto 1.5rem; line-height: 1.7; }

/* Patch 8B: production console cleanup - local icons only */
.mbg-spin {
  animation: mbg-spin 1s linear infinite;
}

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

.mbg-user-dropdown::before {
  content: "" !important;
  position: absolute !important;
  top: -.35rem !important;
  right: 1.25rem !important;
  z-index: 50 !important;
  display: block !important;
  width: .75rem !important;
  height: .75rem !important;
  background: #fff !important;
  transform: rotate(45deg) !important;
  border-radius: .12rem !important;
  box-shadow: -1px -1px 0 rgba(0,0,0,.02) !important;
}

.mbg-auth-password-toggle.is-visible {
  color: #5e72e4;
  background: #f4f5fb;
}
