/*
 * Unified UI Theme for Unique-WiFi Billing
 * Goal: give the whole admin software one consistent colorful design,
 * inspired by the Add Distributor page style.
 */

:root {
  --mbui-bg: #f4f7fb;
  --mbui-panel: #ffffff;
  --mbui-panel-soft: #f8fbff;
  --mbui-text: #172033;
  --mbui-text-soft: #5b6780;
  --mbui-line: #dbe5f1;
  --mbui-line-soft: #e9eff7;
  --mbui-primary: #4f46e5;
  --mbui-primary-2: #2563eb;
  --mbui-cyan: #0ea5e9;
  --mbui-teal: #14b8a6;
  --mbui-success: #16a34a;
  --mbui-warning: #f59e0b;
  --mbui-danger: #dc2626;
  --mbui-dark: #0f172a;
  --mbui-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --mbui-shadow-hover: 0 22px 46px rgba(15, 23, 42, 0.13);
  --mbui-radius: 22px;
  --mbui-radius-sm: 14px;
  --mbui-gradient: linear-gradient(135deg, #6a5af9 0%, #0ea5e9 56%, #2dd4bf 100%);
  --mbui-gradient-soft: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 55%, #ecfeff 100%);
}

html,
body {
  background: radial-gradient(circle at top right, rgba(45,212,191,0.10), transparent 20%),
              radial-gradient(circle at top left, rgba(79,70,229,0.10), transparent 22%),
              var(--mbui-bg) !important;
  color: var(--mbui-text) !important;
}

body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

a {
  color: var(--mbui-primary-2);
}

a:hover,
a:focus {
  color: var(--mbui-primary);
  text-decoration: none !important;
}

/* Navbar */
.navbar {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(219,229,241,0.95) !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  color: var(--mbui-text) !important;
}

.navbar a,
.navbar-left a,
.navbar-right a,
#brand,
#cpage {
  color: var(--mbui-text) !important;
}

#cpage {
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

.navbar-hover {
  border-radius: 12px;
  transition: all .18s ease;
}

.navbar-hover:hover {
  background: #edf4ff !important;
  color: var(--mbui-primary) !important;
}

.ses {
  background: #fff !important;
  border: 1px solid var(--mbui-line) !important;
  color: var(--mbui-text) !important;
  border-radius: 12px !important;
  min-height: 34px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.dropd {
  background: #f8fafc !important;
  color: var(--mbui-text) !important;
  border-radius: 10px !important;
}

/* Sidebar */
.sidenav {
  background: linear-gradient(180deg, #0b1b33 0%, #102542 55%, #0f172a 100%) !important;
  border-right: 1px solid rgba(255,255,255,0.04) !important;
  box-shadow: 10px 0 28px rgba(15, 23, 42, 0.18);
}

.sidenav .menu.text-center,
.sidenav .card-header,
.sidenav .menu.text-center.align-middle.card-header {
  background: linear-gradient(135deg, rgba(79,70,229,.95), rgba(14,165,233,.92)) !important;
  color: #fff !important;
  border-bottom: 1px solid rgba(255,255,255,0.10) !important;
}

.sidenav .menu.text-center h3 {
  color: #fff !important;
  font-weight: 800;
  letter-spacing: .01em;
}

.sidenav a,
.dropdown-btn {
  color: #e7eef9 !important;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: all .18s ease;
}

.sidenav i,
.dropdown-btn i {
  color: inherit !important;
}

.dropdown-btn:hover,
.sidenav a:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
  border-left-color: #38bdf8;
}

.active,
.sidenav a.active,
.dropdown-btn.active {
  background: linear-gradient(90deg, rgba(79,70,229,.30), rgba(14,165,233,.22)) !important;
  color: #ffffff !important;
  border-left-color: #22d3ee !important;
}

.dropdown-container {
  background: rgba(255,255,255,0.02) !important;
}

.spa {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: #dce6f2 !important;
  border: 1px solid #dce6f2 !important;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #60a5fa, #4f46e5) !important;
  border: 2px solid #dce6f2 !important;
  border-radius: 999px;
}

/* Main layout */
.main-container {
  padding-top: 16px !important;
  padding-bottom: 24px !important;
}

.main-container > *:not(script):not(style) {
  animation: mbuiFadeIn .22s ease;
}

@keyframes mbuiFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Global cards / panels */
.box,
.card,
.box-bordered,
.main-container > div:not(.lds-dual-ring):not(.mbui-shell) {
  border-radius: var(--mbui-radius) !important;
}

.box,
.card,
.box-bordered {
  background: var(--mbui-panel) !important;
  border: 1px solid var(--mbui-line-soft) !important;
  box-shadow: var(--mbui-shadow) !important;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.box:hover,
.card:hover,
.box-bordered:hover {
  box-shadow: var(--mbui-shadow-hover) !important;
  border-color: #ccdaf1 !important;
}

.box-header,
.card-header,
thead tr:first-child th,
.main-container .menu-bar,
.main-container .section-title {
  background: var(--mbui-gradient-soft) !important;
  border-bottom: 1px solid #e4ebf7 !important;
  color: var(--mbui-text) !important;
}

.box-header,
.card-header {
  padding: 15px 18px !important;
}

.box-header h1,
.box-header h2,
.box-header h3,
.box-header h4,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4 {
  margin: 0;
  color: var(--mbui-text) !important;
  font-weight: 800 !important;
  letter-spacing: .01em;
}

.box-body,
.card-body,
.box-body.table-responsive,
.main-container .table-responsive,
.main-container .overflow,
.main-container .rows {
  padding: 18px;
}


.card-header a,
.box-header a,
.card-header a:link,
.card-header a:visited,
.box-header a:link,
.box-header a:visited,
.card-header .pointer,
.box-header .pointer {
  color: var(--mbui-text) !important;
  opacity: 1 !important;
}

.card-header a:hover,
.card-header a:focus,
.box-header a:hover,
.box-header a:focus {
  color: var(--mbui-primary) !important;
}

#r_3 .card-header h3 a,
#r_3 .card-header h3 a i,
#reloadLreport,
#reloadLreport * {
  color: var(--mbui-text) !important;
}


/* Dashboard special cards */
.box-group,
.col-box-6 .box {
  border-radius: 22px !important;
  overflow: hidden !important;
}

.box-group-icon {
  background: var(--mbui-gradient) !important;
  color: #fff !important;
  border-radius: 16px !important;
}

.box-group-area {
  background: #fff !important;
}

.box-group-area span,
.box-group-area b,
.box-group-area strong {
  color: var(--mbui-text) !important;
}

/* Gradient utility backgrounds */
.bg-green,
.bg-yellow,
.bg-red,
.bg-blue,
.bg-purple,
.bg-orange,
.bg-indigo {
  color: #fff !important;
  background-color: transparent !important;
}

.bg-green { background-image: linear-gradient(135deg, #16a34a, #10b981) !important; }
.bg-yellow { background-image: linear-gradient(135deg, #f59e0b, #f97316) !important; }
.bg-red { background-image: linear-gradient(135deg, #ef4444, #dc2626) !important; }
.bg-blue { background-image: linear-gradient(135deg, #0ea5e9, #2563eb) !important; }
.bg-purple { background-image: linear-gradient(135deg, #8b5cf6, #6d28d9) !important; }
.bg-orange { background-image: linear-gradient(135deg, #fb7185, #f97316) !important; }
.bg-indigo { background-image: linear-gradient(135deg, #4f46e5, #0ea5e9) !important; }
.bg-pink { background-image: linear-gradient(135deg, #ec4899, #d946ef) !important; }
.bg-teal { background-image: linear-gradient(135deg, #14b8a6, #10b981) !important; }
.bg-cyan { background-image: linear-gradient(135deg, #06b6d4, #0891b2) !important; }
.bg-grey { background-image: linear-gradient(135deg, #64748b, #475569) !important; }
.bg-light-blue { background-image: linear-gradient(135deg, #38bdf8, #0ea5e9) !important; }

/* Keep text readable inside colorful summary cards */
.box[class*='bg-'],
.card[class*='bg-'] {
  border-color: transparent !important;
}

.box[class*='bg-'] a,
.box[class*='bg-'] h1,
.box[class*='bg-'] h2,
.box[class*='bg-'] h3,
.box[class*='bg-'] h4,
.box[class*='bg-'] h5,
.box[class*='bg-'] h6,
.box[class*='bg-'] p,
.box[class*='bg-'] div,
.box[class*='bg-'] span,
.box[class*='bg-'] small,
.box[class*='bg-'] strong,
.box[class*='bg-'] b,
.box[class*='bg-'] i,
.card[class*='bg-'] a,
.card[class*='bg-'] h1,
.card[class*='bg-'] h2,
.card[class*='bg-'] h3,
.card[class*='bg-'] h4,
.card[class*='bg-'] h5,
.card[class*='bg-'] h6,
.card[class*='bg-'] p,
.card[class*='bg-'] div,
.card[class*='bg-'] span,
.card[class*='bg-'] small,
.card[class*='bg-'] strong,
.card[class*='bg-'] b,
.card[class*='bg-'] i {
  color: #ffffff !important;
}

.box[class*='bg-'] .box-group-area,
.card[class*='bg-'] .box-group-area {
  background: transparent !important;
}

.box[class*='bg-'] .box-group-area a,
.box[class*='bg-'] .box-group-area h1,
.box[class*='bg-'] .box-group-area h2,
.box[class*='bg-'] .box-group-area h3,
.box[class*='bg-'] .box-group-area h4,
.box[class*='bg-'] .box-group-area p,
.box[class*='bg-'] .box-group-area span,
.box[class*='bg-'] .box-group-area i,
.box[class*='bg-'] .box-group-area small {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(15,23,42,.14);
}

.box[class*='bg-'] .btn-default,
.box[class*='bg-'] .btn-light,
.card[class*='bg-'] .btn-default,
.card[class*='bg-'] .btn-light {
  background: rgba(255,255,255,.18) !important;
  border-color: rgba(255,255,255,.26) !important;
  color: #ffffff !important;
}

/* Buttons */
.btn,
button,
input[type=submit],
input[type=button] {
  border-radius: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px !important;
  padding: 7px 14px !important;
  border: 1px solid transparent !important;
  line-height: 1.25 !important;
}

.btn:hover,
button:hover,
input[type=submit]:hover,
input[type=button]:hover {
  transform: translateY(-1px);
}

.btn-xs {
  padding: 5px 10px !important;
  font-size: 12px !important;
  border-radius: 12px !important;
}

.btn-primary,
.bg-primary,
button.bg-primary,
input.bg-primary {
  background: linear-gradient(135deg, #4f46e5, #2563eb) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(79,70,229,.20) !important;
}

.btn-info,
.bg-info {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(14,165,233,.18) !important;
}

.btn-success,
.bg-success {
  background: linear-gradient(135deg, #16a34a, #10b981) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(22,163,74,.18) !important;
}

.btn-warning,
.bg-warning {
  background: linear-gradient(135deg, #f59e0b, #f97316) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(245,158,11,.18) !important;
}

.btn-danger,
.bg-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(239,68,68,.18) !important;
}

.btn-default,
.btn-light,
.btn-secondary,
button.btn-default {
  background: #f8fafc !important;
  border-color: var(--mbui-line) !important;
  color: var(--mbui-text) !important;
  box-shadow: none !important;
}

a.btn.disabled,
.btn[disabled],
button.btn:disabled,
input[disabled] {
  opacity: .72 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Forms */
.form-control,
select,
textarea,
input[type=text],
input[type=password],
input[type=number],
input[type=email],
input[type=date],
input[type=time] {
  background: #fff !important;
  color: var(--mbui-text) !important;
  border: 1px solid var(--mbui-line) !important;
  border-radius: 14px !important;
  min-height: 42px;
  box-shadow: none !important;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.form-control:focus,
select:focus,
textarea:focus,
input:focus {
  border-color: #8ba8ff !important;
  box-shadow: 0 0 0 4px rgba(99,102,241,.12) !important;
  outline: none !important;
}

textarea {
  min-height: 110px;
}

label,
.label,
.control-label {
  color: #334155 !important;
  font-weight: 700 !important;
}

.input-group-addon,
.input-group-text,
.group-item,
.group-item-l,
.group-item-m,
.group-item-r {
  border-color: var(--mbui-line) !important;
}

.input-group-addon,
.input-group-text {
  background: #f8fafc !important;
  color: #475569 !important;
}

/* Tables */
.table,
table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
  margin-bottom: 0;
}

.table thead th,
.table th,
table th {
  background: #f8fbff !important;
  border-top: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 13px 12px !important;
}

.table tbody tr,
table tbody tr {
  background: #fff;
}

.table td,
table td {
  background: #fff;
  border-top: 1px solid #edf2f7 !important;
  border-bottom: 1px solid #edf2f7 !important;
  color: var(--mbui-text) !important;
  padding: 12px !important;
  vertical-align: middle !important;
}

.table th:first-child,
.table td:first-child,
table th:first-child,
table td:first-child {
  border-left: 1px solid #edf2f7 !important;
  border-radius: 14px 0 0 14px;
}

.table th:last-child,
.table td:last-child,
table th:last-child,
table td:last-child {
  border-right: 1px solid #edf2f7 !important;
  border-radius: 0 14px 14px 0;
}

.table-hover tbody tr:hover td,
table tbody tr:hover td {
  background: #f8fbff !important;
}

.text-nowrap {
  white-space: nowrap;
}

/* Alerts and notices */
.alert,
.notice,
.well,
.main-container .box.bg-yellow,
.main-container .box.bg-red,
.main-container .box.bg-green,
.main-container .box.bg-blue,
.main-container .box.bg-purple,
.main-container .box.bg-orange,
.main-container .box.bg-indigo {
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(15,23,42,.08) !important;
}

.alert-info { background: linear-gradient(135deg, #dbeafe, #ecfeff) !important; color: #1d4ed8 !important; }
.alert-success { background: linear-gradient(135deg, #dcfce7, #ecfdf5) !important; color: #166534 !important; }
.alert-warning { background: linear-gradient(135deg, #fef3c7, #fff7ed) !important; color: #92400e !important; }
.alert-danger { background: linear-gradient(135deg, #fee2e2, #fff1f2) !important; color: #b91c1c !important; }

/* Pills / pagination / tabs */
.pagination > li > a,
.pagination > li > span {
  border-radius: 12px !important;
  margin: 0 3px;
  border-color: var(--mbui-line) !important;
  color: var(--mbui-text) !important;
}

.pagination > .active > a,
.pagination > .active > span {
  background: linear-gradient(135deg, #4f46e5, #2563eb) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.nav-tabs > li > a {
  border-radius: 14px 14px 0 0 !important;
  color: var(--mbui-text-soft) !important;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  background: #fff !important;
  border: 1px solid var(--mbui-line) !important;
  border-bottom-color: transparent !important;
  color: var(--mbui-primary) !important;
  font-weight: 700;
}

/* Misc blocks used in legacy pages */
.rows,
.overflow,
.col-box,
.group-item,
table,
.box-body.table-responsive {
  border-radius: 16px;
}

hr {
  border-top: 1px solid var(--mbui-line) !important;
}

code,
pre {
  border-radius: 14px;
}

/* Page helpers for the already-updated colorful pages */
.mbui-shell {
  padding: 12px 8px 22px;
}

.mbui-hero {
  background: var(--mbui-gradient) !important;
  color: #fff !important;
  border-radius: 24px !important;
  box-shadow: 0 18px 40px rgba(59,130,246,.18) !important;
}

/* Responsive */
@media (max-width: 991px) {
  .main-container {
    padding-top: 12px !important;
  }

  .box-header,
  .card-header,
  .box-body,
  .card-body,
  .main-container .table-responsive,
  .main-container .overflow {
    padding: 14px !important;
  }

  .btn {
    padding: 7px 12px !important;
  }
}


/* Fix visibility for header action links and unified toolbars */
.mbui-shell .card-header a,
.mbui-shell .box-header a,
.mbui-shell .card-header h3 a,
.mbui-shell .box-header h3 a {
  color: var(--mbui-primary) !important;
  font-weight: 800 !important;
}
.mbui-shell .card-header a:hover,
.mbui-shell .box-header a:hover {
  color: var(--mbui-primary-2) !important;
}
.mbui-shell .table td a,
.mbui-shell .table th a {
  color: var(--mbui-primary-2) !important;
}
.mbui-toolbar {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.mbui-toolbar .btn { margin:0 !important; }
.mbui-full-width,
.mbui-full-width.card,
.mbui-full-width .card,
#reloadbinding,
#reloadHotspotActive,
#sellingReportFull {
  width:100% !important;
  display:block !important;
}
.mbui-side-panel {
  width:33.33%;
}
.mbui-main-panel {
  width:66.66%;
}
@media (max-width: 750px) {
  .mbui-side-panel,
  .mbui-main-panel { width:100% !important; }
}

/* ===== Layout + contrast fixes (2026-03-30) ===== */
.mbui-shell .row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
}

.mbui-shell .row > [class*="col-"] {
  float: none !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  flex: 0 0 auto;
}

.mbui-shell .col-12,
.mbui-shell .mbui-full-width,
.mbui-shell .mbui-full-width.card,
.mbui-shell .mbui-full-width .card,
.mbui-shell #reloadbinding,
.mbui-shell #reloadHotspotActive,
.mbui-shell #sellingReportFull {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}

.mbui-shell .mbui-main-panel,
.mbui-shell .col-8.mbui-main-panel {
  width: 66.666% !important;
  max-width: 66.666% !important;
  flex: 0 0 66.666% !important;
}

.mbui-shell .mbui-side-panel,
.mbui-shell .col-4.mbui-side-panel {
  width: 33.333% !important;
  max-width: 33.333% !important;
  flex: 0 0 33.333% !important;
}

.mbui-shell .card,
.mbui-shell .box,
.mbui-shell .box-bordered,
.mbui-shell .overflow,
.mbui-shell .table,
.mbui-shell table {
  width: 100% !important;
}

.mbui-shell .overflow,
.mbui-shell .box-bordered,
.mbui-shell .table-responsive {
  display: block !important;
}

/* keep action buttons readable inside card headers */
.mbui-shell .card-header a.btn,
.mbui-shell .box-header a.btn,
.mbui-shell .card-header .btn,
.mbui-shell .box-header .btn,
.mbui-shell .card-header a[class*="bg-"],
.mbui-shell .box-header a[class*="bg-"],
.mbui-shell .mbui-toolbar .btn,
.mbui-shell .mbui-toolbar a.btn {
  color: #fff !important;
}

.mbui-shell .card-header .btn.bg-warning,
.mbui-shell .box-header .btn.bg-warning,
.mbui-shell .card-header .btn.bg-light,
.mbui-shell .box-header .btn.bg-light,
.mbui-shell .card-header .btn.bg-white,
.mbui-shell .box-header .btn.bg-white,
.mbui-shell .mbui-toolbar .btn.bg-warning,
.mbui-shell .mbui-toolbar .btn.bg-light,
.mbui-shell .mbui-toolbar .btn.bg-white {
  color: #111827 !important;
}

.mbui-shell .card-header .mbui-toolbar,
.mbui-shell .box-header .mbui-toolbar {
  margin-top: 10px !important;
}

/* make report filters and empty tables stretch full width */
.mbui-shell #sellingReportFull .input-group,
.mbui-shell #sellingReportFull .overflow,
.mbui-shell #sellingReportFull table,
.mbui-shell #reloadbinding .overflow,
.mbui-shell #reloadHotspotActive .overflow {
  width: 100% !important;
  max-width: 100% !important;
}

/* improve visibility of plain links in headers without breaking buttons */
.mbui-shell .card-header a:not(.btn),
.mbui-shell .box-header a:not(.btn),
.mbui-shell .card-header h3 a:not(.btn),
.mbui-shell .box-header h3 a:not(.btn) {
  color: var(--mbui-primary) !important;
  font-weight: 800 !important;
}

@media (max-width: 980px) {
  .mbui-shell .mbui-main-panel,
  .mbui-shell .col-8.mbui-main-panel,
  .mbui-shell .mbui-side-panel,
  .mbui-shell .col-4.mbui-side-panel,
  .mbui-shell .col-12,
  .mbui-shell .mbui-full-width,
  .mbui-shell .mbui-full-width.card,
  .mbui-shell .mbui-full-width .card,
  .mbui-shell #reloadbinding,
  .mbui-shell #reloadHotspotActive,
  .mbui-shell #sellingReportFull {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
}

/* ===== Topbar notification UI ===== */
.navbar { position:relative; z-index:50; }
.mh-topbar {
  display:flex;
  align-items:center;
  gap:12px;
  position:relative;
}
.mh-topbar .ses { margin-top:0 !important; }
.mh-bell-btn {
  position:relative;
  border:1px solid var(--mbui-line);
  background:#fff;
  color:var(--mbui-primary);
  border-radius:14px;
  min-width:44px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.mh-profile-btn {
  min-width: 96px;
  gap: 8px;
  padding: 0 14px;
  font-weight: 700;
}
.mh-profile-btn i {
  font-size: 15px;
}
.mh-profile-text {
  display: inline-block;
  line-height: 1;
}
.mh-bell-count {
  position:absolute;
  top:-7px;
  right:-7px;
  min-width:22px;
  height:22px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:11px;
  line-height:22px;
  text-align:center;
  font-weight:700;
  padding:0 6px;
  box-shadow:0 6px 14px rgba(239,68,68,.35);
}
.mh-timer-wrap span {
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-width:82px;
  justify-content:center;
  background:#fff;
  border:1px solid var(--mbui-line);
}
.mh-notify-dropdown {
  position:fixed;
  top:64px;
  right:18px;
  width:420px;
  max-width:calc(100vw - 24px);
  background:#fff;
  border:1px solid var(--mbui-line);
  border-radius:18px;
  box-shadow:0 24px 50px rgba(15,23,42,.18);
  z-index:999;
  overflow:hidden;
}
.mh-notify-head {
  padding:14px 16px;
  background:var(--mbui-gradient-soft);
  border-bottom:1px solid var(--mbui-line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.mh-notify-actions { display:flex; gap:8px; flex-wrap:wrap; }
.mh-notify-list { max-height:420px; overflow:auto; padding:8px; }
.mh-notify-item {
  display:flex;
  gap:12px;
  padding:12px;
  border:1px solid var(--mbui-line-soft);
  border-radius:16px;
  background:#fff;
  margin-bottom:10px;
}
.mh-notify-item.is-unread { background:linear-gradient(135deg, #eff6ff, #ffffff); border-color:#bfdbfe; }
.mh-notify-icon {
  width:42px; height:42px; flex:0 0 42px;
  border-radius:14px; background:var(--mbui-gradient);
  color:#fff; display:flex; align-items:center; justify-content:center;
}
.mh-notify-content { flex:1; min-width:0; }
.mh-notify-row {
  display:flex; justify-content:space-between; gap:8px; align-items:flex-start; flex-wrap:wrap;
}
.mh-notify-msg { color:var(--mbui-text); margin:6px 0; line-height:1.45; }
.mh-notify-meta { color:var(--mbui-text-soft); font-size:12px; }
.mh-notify-actions-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.mh-notify-detail { display:flex; gap:8px; flex-wrap:wrap; color:var(--mbui-text-soft); font-size:12px; }
.mh-badge {
  display:inline-flex; align-items:center; justify-content:center; padding:3px 8px;
  border-radius:999px; font-size:11px; font-weight:700; text-transform:capitalize;
}
.mh-badge.unread { background:#dbeafe; color:#1d4ed8; }
.mh-badge.read { background:#dcfce7; color:#166534; }
.mh-badge.closed { background:#e5e7eb; color:#374151; }
.mh-badge.type { background:#f3e8ff; color:#7c3aed; }
.mh-empty { padding:24px 12px; color:#64748b; text-align:center; }
.mh-toast-wrap {
  position:fixed; top:74px; right:24px; z-index:1200; width:340px; max-width:calc(100vw - 30px);
}
.mh-toast {
  background:#0f172a; color:#fff; border-radius:16px; box-shadow:0 18px 36px rgba(15,23,42,.28);
  padding:14px 16px; margin-bottom:10px;
}
.mh-toast-head { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.mh-toast-close { background:none; border:none; color:#fff; font-size:20px; line-height:1; cursor:pointer; }
.mh-toast-body { margin-top:6px; color:rgba(255,255,255,.88); line-height:1.45; }

/* ===== Notification history page ===== */
.mh-history-list { display:grid; gap:14px; }
.mh-history-item {
  display:flex; gap:14px; align-items:flex-start; padding:16px;
  border:1px solid var(--mbui-line); border-radius:18px; background:#fff;
}
.mh-history-icon {
  width:48px; height:48px; flex:0 0 48px; border-radius:16px; background:var(--mbui-gradient); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:18px;
}
.mh-history-content { flex:1; min-width:0; }
.mh-history-head { display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; align-items:flex-start; }
.mh-history-message { margin:8px 0; line-height:1.5; color:var(--mbui-text); }
.mh-history-detail { display:flex; flex-wrap:wrap; gap:8px 12px; color:var(--mbui-text-soft); font-size:12px; }
.mh-time { color:var(--mbui-text-soft); font-size:12px; }
.mh-history-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }

@media (max-width: 991px) {
  .mh-topbar { gap:8px; }
  .mh-notify-dropdown { right:10px; top:58px; width:calc(100vw - 20px); }
}


/* ===== Dashboard + mobile + notification fine-tune (2026-03-31) ===== */
#reloadHome .box[class*='bg-'] a {
  display: block;
  min-height: inherit;
}

#reloadHome .box[class*='bg-'] {
  position: relative;
  overflow: hidden;
}

#reloadHome .box[class*='bg-']::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,0) 42%);
  opacity: .85;
  pointer-events: none;
}

#reloadHome .box.bmh-75.box-bordered,
#reloadHome .card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

@media (hover:hover) and (pointer:fine) {
  #reloadHome .box[class*='bg-']:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(15,23,42,.18) !important;
    filter: saturate(1.04);
  }

  #reloadHome .box.bmh-75.box-bordered:hover,
  #reloadHome .card:hover {
    transform: translateY(-2px);
  }

  .mh-history-item:hover,
  .mh-notify-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15,23,42,.10);
    border-color: #c9d8f2;
  }
}

.mh-history-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mh-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.mbui-shell .mh-filter-group .mh-filter-btn,
.mbui-shell .mh-mark-all-btn {
  background: #f8fafc !important;
  border: 1px solid var(--mbui-line) !important;
  color: var(--mbui-text) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.mbui-shell .mh-filter-group .mh-filter-btn:hover,
.mbui-shell .mh-mark-all-btn:hover {
  background: #eef4ff !important;
  border-color: #bfd1ff !important;
  color: var(--mbui-primary) !important;
}

.mbui-shell .mh-filter-group .mh-filter-btn.is-active {
  background: linear-gradient(135deg, #4f46e5, #2563eb) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(79,70,229,.20) !important;
}

.mbui-shell .mh-filter-group .mh-filter-btn.is-active:hover {
  color: #fff !important;
}

.mh-mark-all-btn {
  white-space: nowrap;
}

.mh-history-item,
.mh-notify-item {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

@media (max-width: 1200px) {
  #reloadHome > .row > .col-8,
  #reloadHome > .row > .col-4 {
    width: 100% !important;
  }
}

@media (max-width: 980px) {
  .navbar {
    height: auto !important;
    min-height: 50px !important;
  }

  .navbar-right.mh-topbar {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 7px 10px 9px;
  }

  .mh-topbar .ses,
  .mh-topbar .connect,
  .mh-topbar .slang {
    min-width: 0;
    max-width: 190px;
  }

  #main {
    margin-top: 92px !important;
  }

  .mh-notify-dropdown {
    top: 96px;
  }
}

@media (max-width: 750px) {
  .navbar {
    padding: 0 8px !important;
  }

  .navbar-right.mh-topbar {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 0 10px;
  }

  .mh-topbar .ses,
  .mh-topbar .connect,
  .mh-topbar .slang {
    flex: 1 1 155px;
    width: auto !important;
    max-width: none;
  }


  .mh-profile-btn {
    min-width: 44px;
    padding: 0;
  }

  .mh-profile-text {
    display: none;
  }
  .mh-bell-btn,
  .mh-timer-wrap {
    flex: 0 0 auto;
  }

  #main {
    margin-top: 112px !important;
  }

  .mh-notify-dropdown {
    top: 116px;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
  }

  #reloadHome > #r_1 > .col-4,
  #reloadHome > .row > .col-8,
  #reloadHome > .row > .col-4,
  #reloadHome .row > .col-3,
  #reloadHome .row > .col-4 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  #reloadHome .row > .col-3.col-box-6,
  #reloadHome .row > .col-4.col-box-6 {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
  }

  #reloadHome .box-group {
    display: flex;
    align-items: center;
  }

  #reloadHome .box-group > div {
    display: block;
  }

  #reloadHome .box-group-icon {
    width: 56px;
    flex: 0 0 56px;
    font-size: 24px;
    padding: 10px;
    margin: 0 10px 0 0;
  }

  #reloadHome .box-group-area {
    padding: 10px 0;
  }

  .mh-history-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .mh-filter-group,
  .mh-history-toolbar .mh-mark-all-btn {
    width: 100%;
  }

  .mh-filter-group .mh-filter-btn,
  .mh-history-toolbar .mh-mark-all-btn {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .mh-history-item {
    flex-direction: column;
    padding: 14px;
    gap: 12px;
  }

  .mh-history-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .mh-topbar .ses,
  .mh-topbar .connect,
  .mh-topbar .slang,
  .mh-filter-group .mh-filter-btn,
  .mh-history-toolbar .mh-mark-all-btn {
    flex: 1 1 100%;
    width: 100% !important;
  }

  .mh-timer-wrap {
    width: 100%;
  }

  .mh-timer-wrap span {
    width: 100%;
    min-width: 0;
  }

  #main {
    margin-top: 178px !important;
  }

  .mh-notify-dropdown {
    top: 182px;
  }

  #reloadHome .row > .col-3.col-box-6,
  #reloadHome .row > .col-4.col-box-6 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  .mh-toast-wrap {
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }
}


/* ===== Final UI polish fix (2026-03-31 b) ===== */
#main {
  margin-top: 50px !important;
}

.main-container {
  padding: 5px 5px 20px 7px !important;
}

.main-container > .row:first-child,
.main-container > div:first-child,
.main-container > #reloadHome:first-child,
.main-container > .mbui-shell:first-child {
  margin-top: 0 !important;
}

#reloadHome,
.mbui-shell {
  margin-top: 0 !important;
}

#reloadHome > .row,
#reloadHome .row {
  margin-top: 0 !important;
}

#reloadHome .box,
#reloadHome .card {
  margin-top: 5px !important;
  margin-bottom: 5px !important;
}

#reloadHome .box[class*='bg-'] {
  box-shadow: none !important;
}

@media (hover:hover) and (pointer:fine) {
  #reloadHome .box[class*='bg-']:hover,
  #reloadHome .box[class*='bg-'] > a:hover,
  #reloadHome .box[class*='bg-']:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(15,23,42,.18) !important;
    filter: saturate(1.04);
  }
}

.mh-history-toolbar .mh-filter-btn,
.mh-filter-group .mh-filter-btn,
.mh-mark-all-btn,
.mh-notify-head .btn,
.mh-notify-actions .btn,
.mh-notify-actions-row .btn {
  color: var(--mbui-text) !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-text-fill-color: currentColor !important;
}

.mh-history-toolbar .mh-filter-btn *,
.mh-filter-group .mh-filter-btn *,
.mh-mark-all-btn *,
.mh-notify-head .btn *,
.mh-notify-actions .btn *,
.mh-notify-actions-row .btn * {
  color: inherit !important;
  opacity: 1 !important;
}

.mh-history-toolbar .mh-filter-btn.btn-default,
.mh-filter-group .mh-filter-btn.btn-default,
.mh-mark-all-btn.btn-default,
.mh-notify-head .btn.btn-default,
.mh-notify-actions .btn.btn-default,
.mh-notify-actions-row .btn.btn-default {
  background: #ffffff !important;
  border: 1px solid #d7e3f1 !important;
  color: #1f2a44 !important;
}

.mh-history-toolbar .mh-filter-btn.btn-primary,
.mh-filter-group .mh-filter-btn.btn-primary,
.mh-history-toolbar .mh-filter-btn.is-active,
.mh-filter-group .mh-filter-btn.is-active,
.mh-notify-head .btn.btn-primary,
.mh-notify-actions .btn.btn-primary {
  color: #ffffff !important;
}

.mh-history-toolbar .mh-filter-btn.btn-primary *,
.mh-filter-group .mh-filter-btn.btn-primary *,
.mh-history-toolbar .mh-filter-btn.is-active *,
.mh-filter-group .mh-filter-btn.is-active *,
.mh-notify-head .btn.btn-primary *,
.mh-notify-actions .btn.btn-primary * {
  color: #ffffff !important;
}

.mh-filter-group {
  row-gap: 10px;
}

.mh-filter-group .mh-filter-btn,
.mh-history-toolbar .mh-mark-all-btn {
  min-height: 40px;
}

.mh-notify-dropdown {
  overscroll-behavior: contain;
}

#mbuiNavOverlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(2px);
  z-index: 120;
  display: none;
}

body.mbui-nav-open #mbuiNavOverlay {
  display: block;
}

@media (max-width: 800px) {
  body.mbui-nav-open {
    overflow: hidden;
  }

  .sidenav {
    z-index: 130 !important;
    margin-top: 50px !important;
    box-shadow: 16px 0 32px rgba(15,23,42,.28) !important;
  }

  #main {
    margin-left: 0 !important;
  }

  .navbar {
    height: auto !important;
    min-height: 50px !important;
  }

  .navbar-left,
  .navbar-right.mh-topbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }

  .navbar-left {
    gap: 2px;
  }

  .navbar-right.mh-topbar {
    width: 100%;
    gap: 8px;
    justify-content: flex-start;
    padding: 6px 8px 10px !important;
  }

  .navbar-right.mh-topbar .connect,
  .navbar-right.mh-topbar .slang,
  .navbar-right.mh-topbar .ses {
    flex: 1 1 150px;
    min-width: 0;
    margin-top: 0 !important;
  }

  .mh-bell-btn,
  .mh-timer-wrap {
    flex: 0 0 auto;
    margin-top: 0 !important;
  }

  .mh-notify-dropdown {
    position: fixed;
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100vh - 76px);
    border-radius: 18px !important;
  }

  .mh-notify-list {
    max-height: calc(100vh - 180px);
  }
}

@media (max-width: 750px) {
  #main {
    margin-top: 94px !important;
  }

  .main-container {
    padding-top: 4px !important;
  }

  .mbui-shell {
    padding: 6px 4px 18px !important;
  }

  .mbui-hero {
    margin-top: 4px !important;
  }
}

@media (max-width: 520px) {
  #main {
    margin-top: 142px !important;
  }

  .mh-notify-dropdown {
    bottom: 6px !important;
    left: 6px !important;
    right: 6px !important;
    max-height: calc(100vh - 66px);
  }

  .mh-notify-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .mh-notify-actions {
    width: 100%;
  }

  .mh-notify-actions .btn {
    flex: 1 1 calc(50% - 8px);
  }
}


/* ===== Production ready UI hard-fix (2026-03-31 c) ===== */
/* Remove empty gap under navbar on dashboard + selfcare admin pages */
#main {
  margin-top: 50px !important;
  padding-top: 0 !important;
}

#main > .main-container,
.main-container {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.main-container > *:first-child,
.main-container > #reloadHome:first-child,
.main-container > .mbui-shell:first-child,
.main-container > .row:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.main-container > div:first-child:empty,
.main-container > .alert:empty,
.main-container > .notice-bar:empty,
.main-container > .top-alert:empty {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

#reloadHome {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#reloadHome > .row:first-child,
#reloadHome #r_1,
.mbui-shell,
.mbui-hero,
.mbui-toolbar,
.mh-history-toolbar {
  margin-top: 0 !important;
}

.mbui-shell {
  padding-top: 0 !important;
}

.mbui-hero {
  margin-top: 0 !important;
}

/* Tight dashboard spacing to match old layout */
#reloadHome > .row,
#reloadHome .row {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#reloadHome .box,
#reloadHome .card {
  margin-top: 5px !important;
  margin-bottom: 5px !important;
}

#reloadHome .card-header,
#reloadHome .box-header {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

/* Notification filter buttons: force text visible */
.mh-history-toolbar .mh-filter-btn,
.mh-filter-group .mh-filter-btn,
.mh-mark-all-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 16px !important;
  line-height: 1.2 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-indent: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  text-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;
  -webkit-text-fill-color: currentColor !important;
}

.mh-history-toolbar .mh-filter-btn,
.mh-filter-group .mh-filter-btn {
  background: #ffffff !important;
  border: 1px solid #d7e3f1 !important;
  color: #1f2a44 !important;
}

.mh-history-toolbar .mh-filter-btn .mh-btn-label,
.mh-filter-group .mh-filter-btn .mh-btn-label,
.mh-mark-all-btn .mh-btn-label,
.mh-history-toolbar .mh-filter-btn span,
.mh-filter-group .mh-filter-btn span,
.mh-mark-all-btn span {
  display: inline !important;
  color: inherit !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-size: inherit !important;
  line-height: inherit !important;
  text-indent: 0 !important;
  -webkit-text-fill-color: currentColor !important;
}

.mh-history-toolbar .mh-filter-btn.btn-primary,
.mh-filter-group .mh-filter-btn.btn-primary,
.mh-history-toolbar .mh-filter-btn.is-active,
.mh-filter-group .mh-filter-btn.is-active {
  background: linear-gradient(135deg,#4f46e5,#2563eb) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

.mh-history-toolbar .mh-filter-btn:hover,
.mh-filter-group .mh-filter-btn:hover,
.mh-mark-all-btn:not([disabled]):hover {
  transform: translateY(-1px);
}

/* Mobile polish */
@media (max-width: 800px) {
  #main > .main-container,
  .main-container {
    padding-top: 0 !important;
  }

  .mh-notify-dropdown {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 18px !important;
    max-height: min(75vh, 560px) !important;
  }

  .mh-history-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .mh-filter-group {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .mh-filter-group .mh-filter-btn,
  .mh-history-toolbar .mh-mark-all-btn {
    width: 100% !important;
    margin: 0 !important;
  }

  body.mbui-nav-open #sideNav {
    width: 250px !important;
    box-shadow: 16px 0 40px rgba(2, 6, 23, .24) !important;
  }
}

@media (max-width: 520px) {
  .mh-filter-group {
    grid-template-columns: 1fr !important;
  }
}


/* ===== Fixed top header + notification button contrast fix (2026-03-31 update) ===== */
.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1200 !important;
}

#main {
  margin-top: 70px !important;
}

.sidenav {
  margin-top: 70px !important;
  height: calc(100% - 70px) !important;
}

.mh-notify-dropdown {
  top: 78px !important;
  z-index: 1300 !important;
}

.mbui-shell .mh-history-toolbar .mh-filter-btn,
.mbui-shell .mh-history-toolbar .mh-mark-all-btn,
.mbui-shell .mh-history-toolbar .mh-filter-btn .mh-btn-label,
.mbui-shell .mh-history-toolbar .mh-mark-all-btn .mh-btn-label,
.mbui-shell .mh-history-toolbar .mh-filter-btn i,
.mbui-shell .mh-history-toolbar .mh-mark-all-btn i {
  color: #172033 !important;
}

.mbui-shell .mh-history-toolbar .mh-filter-btn:hover,
.mbui-shell .mh-history-toolbar .mh-mark-all-btn:hover,
.mbui-shell .mh-history-toolbar .mh-filter-btn:hover .mh-btn-label,
.mbui-shell .mh-history-toolbar .mh-mark-all-btn:hover .mh-btn-label,
.mbui-shell .mh-history-toolbar .mh-filter-btn:hover i,
.mbui-shell .mh-history-toolbar .mh-mark-all-btn:hover i {
  color: #2563eb !important;
}

.mbui-shell .mh-history-toolbar .mh-filter-btn.is-active,
.mbui-shell .mh-history-toolbar .mh-filter-btn.is-active .mh-btn-label,
.mbui-shell .mh-history-toolbar .mh-filter-btn.is-active i {
  color: #ffffff !important;
}

@media (max-width: 980px) {
  #main {
    margin-top: 104px !important;
  }

  .sidenav {
    margin-top: 104px !important;
    height: calc(100% - 104px) !important;
  }

  .mh-notify-dropdown {
    top: 112px !important;
  }
}

@media (max-width: 750px) {
  #main {
    margin-top: 126px !important;
  }

  .sidenav {
    margin-top: 126px !important;
    height: calc(100% - 126px) !important;
  }

  .mh-notify-dropdown {
    top: 134px !important;
  }
}

/* ===== Header gap removal hotfix (desktop) ===== */
/* Screenshot showed a visible blank band below the fixed top navbar.
   Root cause: desktop offsets were larger than the actual 50px navbar height. */
@media (min-width: 981px) {
  body.admin-unified-ui .navbar {
    height: 50px !important;
    min-height: 50px !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  body.admin-unified-ui #main {
    margin-top: 50px !important;
    padding-top: 0 !important;
  }

  body.admin-unified-ui .sidenav {
    margin-top: 50px !important;
    height: calc(100% - 50px) !important;
  }

  body.admin-unified-ui .mh-notify-dropdown {
    top: 58px !important;
  }

  body.admin-unified-ui #main > .main-container,
  body.admin-unified-ui .main-container,
  body.admin-unified-ui #reloadHome,
  body.admin-unified-ui #reloadHome > .row:first-child,
  body.admin-unified-ui #reloadHome .row:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}


/* ===== Header cleanup: remove session/time and move bell left ===== */
body.admin-unified-ui .navbar {
  display: flex !important;
  align-items: center !important;
}
body.admin-unified-ui .navbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
body.admin-unified-ui .navbar-right.mh-topbar {
  margin-left: 0 !important;
  min-width: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  flex: 0 0 0 !important;
}
body.admin-unified-ui .navbar-mid-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-left: auto !important;
  margin-right: 18px !important;
  flex: 0 0 auto !important;
}
body.admin-unified-ui .navbar .ses,
body.admin-unified-ui .navbar .connect,
body.admin-unified-ui .navbar .slang,
body.admin-unified-ui .navbar .mh-timer-wrap {
  display: none !important;
}
body.admin-unified-ui .mh-bell-left {
  position: relative !important;
  margin-left: 0 !important;
}
body.admin-unified-ui .mh-notify-dropdown {
  right: auto !important;
  left: auto !important;
  top: 58px !important;
}
@media (max-width: 800px) {
  body.admin-unified-ui .navbar-mid-actions {
    margin-left: auto !important;
    margin-right: 12px !important;
  }
  body.admin-unified-ui .mh-notify-dropdown {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
  }
}

/* bell adjust */
.notification-icon{ right:20px !important; }
.notification-dropdown{ right:20px !important; }


/* ===== Deep fix: bell spacing + popup under bell ===== */
body.admin-unified-ui #mhNotifyBell {
  position: relative !important;
  right: 0 !important;
  margin: 0 !important;
}
body.admin-unified-ui #mhNotifyDropdown {
  position: fixed !important;
  top: 58px !important;
  left: auto;
  right: auto;
}


/* ===== Final bell dropdown alignment fix ===== */
body.admin-unified-ui .navbar {
  overflow: visible !important;
}
body.admin-unified-ui .navbar-mid-actions {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
}
body.admin-unified-ui .navbar-mid-actions .mh-bell-left {
  position: relative !important;
  margin-right: 0 !important;
}
body.admin-unified-ui .navbar-mid-actions .mh-profile-btn {
  position: relative !important;
  margin-right: 0 !important;
  min-width: auto !important;
}
body.admin-unified-ui .navbar-mid-actions > .mh-notify-dropdown {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  width: 420px !important;
  max-width: min(420px, calc(100vw - 24px)) !important;
  z-index: 1400 !important;
}
body.admin-unified-ui .mh-toast-wrap {
  position: fixed !important;
  top: 74px !important;
  right: 24px !important;
  left: auto !important;
}
@media (max-width: 800px) {
  body.admin-unified-ui .navbar-mid-actions > .mh-notify-dropdown {
    position: fixed !important;
    top: 58px !important;
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* ===== Sibling dropdown hard anchor under right bell ===== */
body.admin-unified-ui > .mh-notify-dropdown,
body.admin-unified-ui .mh-notify-dropdown {
  right: 18px !important;
  left: auto !important;
  top: 58px !important;
  transform: none !important;
}
@media (max-width: 800px) {
  body.admin-unified-ui > .mh-notify-dropdown,
  body.admin-unified-ui .mh-notify-dropdown {
    right: 8px !important;
    left: 8px !important;
    top: 58px !important;
  }
}


/* ===== Mobile UI deep fix (2026-04-01) ===== */
@media (max-width: 800px) {
  body.admin-unified-ui .navbar {
    height: 62px !important;
    min-height: 62px !important;
    padding: 0 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  body.admin-unified-ui .navbar-left {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    gap: 8px !important;
    align-items: center !important;
  }

  body.admin-unified-ui #openNav,
  body.admin-unified-ui #closeNav {
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    flex: 0 0 38px !important;
  }

  body.admin-unified-ui #cpage {
    display: block !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 15px !important;
  }

  body.admin-unified-ui #brand,
  body.admin-unified-ui .navbar-right.mh-topbar {
    display: none !important;
  }

  body.admin-unified-ui .navbar-mid-actions {
    margin: 0 0 0 10px !important;
    position: relative !important;
    flex: 0 0 auto !important;
  }

  body.admin-unified-ui #mhNotifyBell {
    width: 40px !important;
    height: 40px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.admin-unified-ui #main {
    margin-top: 62px !important;
    margin-left: 0 !important;
    width: 100% !important;
  }

  body.admin-unified-ui #main > .main-container,
  body.admin-unified-ui .main-container,
  body.admin-unified-ui .mbui-shell {
    padding-top: 8px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body.admin-unified-ui .box,
  body.admin-unified-ui .card,
  body.admin-unified-ui .box-bordered,
  body.admin-unified-ui #reloadHome .box,
  body.admin-unified-ui #reloadHome .card {
    border-radius: 18px !important;
    margin-bottom: 10px !important;
  }

  body.admin-unified-ui .sidenav {
    top: 62px !important;
    left: 0 !important;
    margin-top: 0 !important;
    width: min(86vw, 300px) !important;
    max-width: 300px !important;
    height: calc(100dvh - 62px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: translateX(-110%) !important;
    transition: transform .22s ease, box-shadow .22s ease !important;
    box-shadow: none !important;
    border-right: 1px solid rgba(255,255,255,.08) !important;
  }

  body.admin-unified-ui.mbui-nav-open .sidenav,
  body.admin-unified-ui.mbui-nav-open #sidenav,
  body.mbui-nav-open.admin-unified-ui .sidenav,
  body.mbui-nav-open.admin-unified-ui #sidenav {
    transform: translateX(0) !important;
    box-shadow: 18px 0 34px rgba(15,23,42,.30) !important;
  }

  body.admin-unified-ui #mbuiNavOverlay {
    top: 62px !important;
    z-index: 125 !important;
  }

  body.admin-unified-ui #mhNotifyDropdown,
  body.admin-unified-ui .mh-notify-dropdown,
  body.admin-unified-ui .navbar-mid-actions > .mh-notify-dropdown {
    position: fixed !important;
    top: 70px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    width: min(92vw, 360px) !important;
    max-width: min(92vw, 360px) !important;
    max-height: calc(100dvh - 82px) !important;
    border-radius: 18px !important;
    transform: none !important;
  }

  body.admin-unified-ui .mh-notify-list {
    max-height: calc(100dvh - 170px) !important;
  }
}

@media (max-width: 520px) {
  body.admin-unified-ui .navbar {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body.admin-unified-ui #main {
    margin-top: 62px !important;
  }

  body.admin-unified-ui .sidenav {
    width: min(88vw, 290px) !important;
  }

  body.admin-unified-ui #mhNotifyDropdown,
  body.admin-unified-ui .mh-notify-dropdown,
  body.admin-unified-ui .navbar-mid-actions > .mh-notify-dropdown {
    right: 8px !important;
    width: min(94vw, 350px) !important;
    max-width: min(94vw, 350px) !important;
  }
}


/* Mobile menu toggle fix */
body.admin-unified-ui #openNav,
body.admin-unified-ui #closeNav {
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  border-radius: 12px !important;
}

@media (max-width: 800px) {
  body.admin-unified-ui #openNav {
    display: inline-flex !important;
  }

  body.admin-unified-ui #closeNav {
    display: none !important;
  }

  body.admin-unified-ui .navbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  body.admin-unified-ui .navbar-left #cpage {
    display: inline-flex !important;
    padding-left: 8px !important;
  }

  body.admin-unified-ui #openNav i,
  body.admin-unified-ui #closeNav i {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 24px !important;
    line-height: 1 !important;
  }

  body.admin-unified-ui #sidenav {
    z-index: 200 !important;
  }

  body.admin-unified-ui #mbuiNavOverlay {
    display: none;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(15, 23, 42, 0.28) !important;
  }

  body.admin-unified-ui.mbui-nav-open #mbuiNavOverlay {
    display: block !important;
  }
}


/* ===== Mobile header polish + search/menu overlap fix (2026-04-05) ===== */
body.admin-unified-ui #openNav,
body.admin-unified-ui #closeNav,
body.admin-unified-ui #mhNotifyBell {
  background: linear-gradient(180deg,#ffffff 0%,#f3f7ff 100%) !important;
  border: 1px solid rgba(83,101,160,.16) !important;
  box-shadow: 0 8px 20px rgba(15,23,42,.08) !important;
  color: #334155 !important;
}
body.admin-unified-ui #openNav:hover,
body.admin-unified-ui #closeNav:hover,
body.admin-unified-ui #mhNotifyBell:hover {
  background: linear-gradient(180deg,#ffffff 0%,#ebf3ff 100%) !important;
  color: #1d4ed8 !important;
}
body.admin-unified-ui #openNav i,
body.admin-unified-ui #closeNav i,
body.admin-unified-ui #mhNotifyBell i {
  line-height: 1 !important;
}

@media (max-width: 800px) {
  body.admin-unified-ui .navbar {
    padding: 0 8px !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  body.admin-unified-ui .navbar-left {
    gap: 6px !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
  }

  body.admin-unified-ui #openNav,
  body.admin-unified-ui #closeNav,
  body.admin-unified-ui #mhNotifyBell {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 11px !important;
  }

  body.admin-unified-ui #openNav i,
  body.admin-unified-ui #closeNav i {
    font-size: 19px !important;
  }

  body.admin-unified-ui #mhNotifyBell i {
    font-size: 16px !important;
  }

  body.admin-unified-ui #cpage {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 14px !important;
    padding-left: 2px !important;
  }

  body.admin-unified-ui .navbar-mid-actions {
    margin: 0 0 0 6px !important;
  }

  body.admin-unified-ui .mh-bell-count {
    top: 4px !important;
    right: 4px !important;
  }

  body.admin-unified-ui .mh-global-search {
    transition: opacity .18s ease, transform .18s ease !important;
  }

  body.admin-unified-ui.mbui-nav-open .mh-global-search,
  body.mbui-nav-open.admin-unified-ui .mh-global-search {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-6px) !important;
  }

  body.admin-unified-ui #sidenav {
    z-index: 220 !important;
  }

  body.admin-unified-ui #mbuiNavOverlay {
    z-index: 210 !important;
  }
}

@media (max-width: 520px) {
  body.admin-unified-ui #openNav,
  body.admin-unified-ui #closeNav,
  body.admin-unified-ui #mhNotifyBell {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 10px !important;
  }

  body.admin-unified-ui #openNav i,
  body.admin-unified-ui #closeNav i {
    font-size: 18px !important;
  }

  body.admin-unified-ui #mhNotifyBell i {
    font-size: 15px !important;
  }

  body.admin-unified-ui #cpage {
    font-size: 13.5px !important;
  }
}

@media (max-width: 800px) {
  body.admin-unified-ui .navbar-mid-actions .mh-profile-btn {
    min-width: 42px !important;
    padding: 0 12px !important;
  }
  body.admin-unified-ui .navbar-mid-actions .mh-profile-text {
    display: none !important;
  }
}
