:root, [data-bs-theme=light] { --bs-link-color: #893045; --bs-link-hover-color: #6e2637; }
.mbb-brand-mark { color:white; background:#962f43; width:32px; height:32px; display:inline-grid;
  place-items:center; border-radius:52% 52% 52% 14%; font-size:1.2rem; font-weight:700; flex:none; }
.mbb-brand-word { font-weight:750; letter-spacing:-.035em; }
.app-sidebar { --bs-dark-rgb: 32, 53, 50; }
.app-sidebar .nav-link.active { background-color:#f1e5e7 !important; color:#672437 !important; }
.btn-primary { --bs-btn-bg:#893045; --bs-btn-border-color:#893045;
  --bs-btn-hover-bg:#6e2637; --bs-btn-hover-border-color:#6e2637;
  --bs-btn-active-bg:#6e2637; --bs-btn-active-border-color:#6e2637; }
.metric-card { border-top:3px solid #96334a; }
.staff-login { display:grid; min-height:100vh; place-items:center; }
.login-card { max-width:440px; }
.table { font-size: .875rem; }
.table th { white-space:nowrap; }

.app-sidebar .brand-link { color: #f5f9f7; min-width: 0; }
.app-sidebar .mbb-public-logo { flex: 0 0 auto; width: auto; max-width: 76px; max-height: 36px; object-fit: contain; }
.app-sidebar .mbb-brand-word {
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.2;
}
.app-footer a, .staff-login .card a { color: #893045; }
.mbb-rating-gold { color: #956000; }
[data-bs-theme="dark"] .mbb-rating-gold { color: #ffca56; }
.app-footer a { overflow-wrap: anywhere; }

/* Configurable branding on staff sign-in and password recovery. */
.mbb-auth-logo { width: auto; max-width: 120px; height: 48px; object-fit: contain; }

/* DataTables keeps wide record previews scrollable without clipping their controls. */
.table-responsive > .dt-container {
  padding: .75rem;
}
.mbb-database-table td {
  min-width: 8rem;
  overflow-wrap: anywhere;
}
@media (max-width: 575.98px) {
  .dt-container .dt-layout-row {
    row-gap: .5rem;
  }
}

.mbb-report-pie {
  width: 10rem;
  height: 10rem;
  flex: 0 0 auto;
  border-radius: 50%;
}
.mbb-report-legend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .75rem;
}
.mbb-report-swatch {
  display: inline-block;
  width: .75rem;
  height: .75rem;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: .2rem;
  margin-right: .4rem;
}
.mbb-report-bars li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 4.25rem;
  gap: .65rem;
  align-items: center;
  padding-block: .24rem;
}
.mbb-report-bars li strong { text-align: right; font-variant-numeric: tabular-nums; }
.mbb-report-track {
  display: block;
  height: .7rem;
  overflow: hidden;
  border-radius: .5rem;
  background: #edf1f3;
}
.mbb-report-track span {
  display: block;
  height: 100%;
  background: #893045;
}

.user-card-entry {
  color: var(--bs-body-color);
  border: 1px solid #d9b8c0;
  transition: border-color .2s ease, background-color .2s ease;
}
.user-card-entry:hover, .user-card-entry:focus-visible {
  color: var(--bs-body-color);
  border-color: #893045;
  background: #fff7f8;
}
.user-card-thumbnail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  padding: .85rem 1rem;
  color: #fff;
  background: #10272c;
  border-radius: .75rem;
}
.user-card-thumbnail small { display: block; color: #d9e7e8; }
.user-card-thumbnail-avatar {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: #20454d;
  font-size: .8rem;
}
.user-card-thumbnail-group { margin-inline-start: .2rem; color: #ff9eae; font-size: 1.75rem; }
.user-card-sample { width: 18rem; max-width: 100%; height: auto; border-radius: .75rem; }
.user-card-sample[data-layout="portrait"] { width: 10rem; }
.user-card-preview { background: #edf1f2; text-align: center; }
.user-card-preview canvas { display: block; width: 100%; height: auto; max-width: 54rem; margin: 0 auto; border-radius: 1rem; }
.user-card-preview canvas[data-layout="portrait"] { max-width: 31rem; }

.direct-request-recipients {
  display: flex;
  align-items: center;
  gap: .4rem;
  max-width: 25rem;
  overflow-x: auto;
  padding: .25rem;
}
.direct-request-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #751e36;
  background: #f5e3e8;
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
}
.direct-request-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
.direct-request-avatar::before { content: attr(data-initials); }
.direct-request-recipient { display: inline-flex; text-decoration: none; }
a.direct-request-recipient:focus-visible, a.direct-request-recipient:hover {
  outline: 2px solid #893045;
  outline-offset: 2px;
  border-radius: 50%;
}
.direct-request-avatar-check {
  position: absolute;
  inset-inline-end: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 2px solid var(--bs-body-bg);
  border-radius: 50%;
  color: #fff;
  background: #168248;
  font-size: 10px;
  line-height: 1;
}
.direct-request-card-tooltip {
  position: fixed;
  z-index: 1080;
  width: min(360px, calc(100vw - 16px));
  border-radius: .75rem;
  box-shadow: 0 .6rem 1.8rem rgba(0, 0, 0, .28);
  background: #10272c;
}
.direct-request-card-tooltip canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 16px);
  object-fit: contain;
  border-radius: inherit;
}
.direct-request-card-tooltip:has(canvas[data-layout="portrait"]) {
  width: min(280px, calc((100vh - 16px) * .76), calc(100vw - 16px));
}
