/* IB Details + IB sub-pages (scoped by page IDs) */

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) :is(.fa, .fas, .far, .fal, .fab) {
  color: #131313;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: visible; /* allow corner edit button to show */
  border: 3px solid #fff; /* outer ring */
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden; /* clip photo only */
  background: #fff;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2f2b73;
  border: 2px solid #ffffff;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
  z-index: 5;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-avatar-edit i {
  font-size: 12px;
  color: #ffffff !important;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-status-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #0d6efd;
  color: #fff;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-rank-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-rank-icon i {
  color: #facc15 !important;
  font-size: 18px;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.15));
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-rank-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-rank-num {
  font-weight: 800;
  font-size: 18px;
  color: #ffffff;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-rank-label {
  font-weight: 600;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-divider {
  width: 1px;
  height: 48px;
  background: rgba(148, 163, 184, 0.45);
  margin: 0 6px;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-icon-pill {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-icon-pill i {
  color: #0d6efd !important;
}

#ibDetailsPage .ibd-showless {
  padding-left: 2px;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-actions {
  max-width: 190px;
  margin-left: auto;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-btn {
  text-align: left;
  border-radius: 10px;
  font-weight: 700;
  padding: 10px 12px;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-btn-edit {
  background: rgba(13, 110, 253, 0.12);
  border: 1px solid rgba(13, 110, 253, 0.06);
  color: #111827;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-btn-pass {
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #111827;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-btn-suspend {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.10);
  color: #ef4444;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-meta {
  background: #F9F9F9;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabs {
  background: transparent;
  border: 0;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabs .nav-link {
  border-radius: 10px;
  font-weight: 700;
  padding: 12px 10px;
  color: #64748b;
  background: transparent;
  border: 0;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabs .nav-link.active {
  background: #0d6efd;
  color: #fff;
  box-shadow: 0 10px 18px rgba(13, 110, 253, 0.18);
  border-color: transparent;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  display: inline-block;
  width: min(1080px, 96%);
  margin-left: auto;
  margin-right: auto;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .ibd-tabs {
  gap: 0 !important;
  flex-wrap: nowrap;
  width: 100%;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .nav-item {
  flex: 1 1 0;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .nav-link {
  padding: 12px 18px;
  text-align: center;
  width: 100%;
  white-space: nowrap;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .nav-item:not(:last-child) .nav-link {
  position: relative;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .nav-item:not(:last-child) .nav-link::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(148, 163, 184, 0.34);
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .nav-link.active::after {
  display: none;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .nav-link {
  border-radius: 10px;
  background: transparent;
  border: 0;
}


#ibDetailsPage .ibd-tabsbar .nav-link:hover {
  background: rgba(148, 163, 184, 0.10);
  color: #111827;
}

/* Edit Profile offcanvas (shared across IB pages) */
.ibd-offcanvas {
  --bs-offcanvas-width: min(620px, 96vw);
  --ibd-ep-bottom-gap: clamp(40px, 6vh, 60px);
  position: fixed; /* ensure viewport anchored */
  top: 0;
  bottom: var(--ibd-ep-bottom-gap); /* floating panel gap like design */
  height: calc(100vh - var(--ibd-ep-bottom-gap));
}

.ibd-offcanvas .offcanvas-header {
  padding: 18px 22px;
}

.ibd-offcanvas .offcanvas-body {
  padding: 18px 22px 22px; /* keep only small space below footer */
}

.ibd-offcanvas .form-control,
.ibd-offcanvas .form-select {
  border-color: rgba(148, 163, 184, 0.35);
  padding-top: 10px;
  padding-bottom: 10px;
}

.ibd-offcanvas .ibd-ep-alert {
  background: rgba(13, 110, 253, 0.10);
  border: 0;
  border-radius: 10px;
  color: #334155;
}

.ibd-offcanvas .ibd-ep-alert i {
  color: #0d6efd;
}

.ibd-offcanvas .ibd-ep-footer {
  position: sticky;
  bottom: 0;
  margin-top: 22px;
  padding-top: 12px;
  padding-bottom: 16px; /* small gap below Save button like design */
  background: #ffffff;
}

/* Make Edit Profile backdrop cover topbar/sidebar too */
body.ibd-ep-open .offcanvas-backdrop.show {
  background: #0b1220;
  opacity: 0.72;
  z-index: 2000;
}

body.ibd-ep-open .offcanvas.ibd-offcanvas {
  z-index: 2005;
}

/* Suspend IB offcanvas */
body.ibd-sus-open .offcanvas-backdrop.show {
  background: #0b1220;
  opacity: 0.72;
  z-index: 2000;
}

body.ibd-sus-open .offcanvas.ibd-sus-offcanvas {
  z-index: 2005;
}

/* Suspend Reason Details offcanvas (same overlay pattern) */
body.ibd-reason-open .offcanvas-backdrop.show {
  background: #0b1220;
  opacity: 0.72;
  z-index: 2000;
}

body.ibd-reason-open .offcanvas.ibd-reason-offcanvas {
  z-index: 2005;
}

.ibd-reason-title {
  color: #dc2626;
}

.ibd-reason-card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.ibd-reason-attach-row {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.ibd-reason-eye-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.ibd-reason-eye-btn i {
  color: #2563eb;
}

.ibd-reason-footer {
  position: sticky;
  bottom: 0;
  margin-top: 18px;
  padding-top: 12px;
  padding-bottom: 16px;
  background: #ffffff;
}

.ibd-sus-title {
  color: #dc2626;
}

.ibd-sus-alert {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #b91c1c;
  border-radius: 10px;
}

.ibd-sus-alert i {
  color: #dc2626;
}

.ibd-sus-offcanvas .form-control,
.ibd-sus-offcanvas .form-select,
.ibd-sus-offcanvas textarea {
  border-color: rgba(148, 163, 184, 0.35);
  padding-top: 10px;
  padding-bottom: 10px;
}

.ibd-dropzone {
  border: 2px dashed rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.05);
  padding: 18px;
}

.ibd-drop-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ibd-drop-ico i {
  color: #2563eb;
}

.ibd-file-row {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.ibd-file-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ibd-file-ico i {
  color: #0f172a;
}

.ibd-sus-footer {
  position: sticky;
  bottom: 0;
  margin-top: 18px;
  padding-top: 12px;
  padding-bottom: 16px;
  background: #ffffff;
}

/* Change Password modal (shared across IB pages) */
body.ibd-pass-open .modal-backdrop.show {
  background: #0b1220;
  opacity: 0.72;
  z-index: 2000;
}

body.ibd-pass-open .modal.ibd-pass-modal {
  z-index: 2005;
}

.ibd-pass-dialog {
  margin: 96px auto 0; /* slightly lower */
  max-width: 520px;
}

.ibd-pass-content {
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.24);
}

.ibd-pass-title {
  color: #0d6efd;
}

.ibd-pass-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.22);
  border: 0;
}

.ibd-pass-close i {
  color: #111827;
  font-size: 16px;
}

.ibd-pass-input,
.ibd-pass-eye {
  border-color: rgba(148, 163, 184, 0.35);
  height: 44px;
}

.ibd-pass-eye {
  border-left: 0;
  width: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ibd-pass-eye i {
  color: #64748b;
}

/* Confirm Suspend IB modal (same backdrop pattern as Change Password) */
.ibd-conf-sus-dialog {
  margin: 96px auto 0;
  max-width: 520px;
}

.ibd-conf-sus-content {
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.24);
  border: 2px solid rgba(220, 38, 38, 0.55) !important;
}

.ibd-conf-sus-content .modal-header {
  position: relative;
  padding-right: 52px;
}

body.ibd-conf-sus-open .modal-backdrop.show {
  background: #0b1220;
  opacity: 0.72;
  z-index: 2000;
}

body.ibd-conf-sus-open .modal.ibd-conf-sus-modal {
  z-index: 2005;
}

.ibd-conf-sus-title {
  color: #dc2626;
}

.ibd-conf-sus-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.22);
  border: 0;
}

.ibd-conf-sus-close i {
  color: #111827;
  font-size: 16px;
}

.ibd-conf-sus-list {
  list-style: none;
  margin-bottom: 0;
}

.ibd-conf-sus-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.35rem;
}

.ibd-conf-sus-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc2626;
}

.ibd-conf-sus-warn {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #b91c1c;
  border-radius: 10px;
  margin-bottom: 0;
}

.ibd-conf-sus-warn i {
  color: #dc2626;
}

/* Suspend IB success modal (same backdrop pattern as Change Password) */
.ibd-sus-success-dialog {
  max-width: 420px;
}

.ibd-sus-success-content {
  border-radius: 24px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.2);
  overflow: visible;
}

body.ibd-sus-success-open .modal-backdrop.show {
  background: #0b1220;
  opacity: 0.72;
  z-index: 2000;
}

body.ibd-sus-success-open .modal.ibd-sus-success-modal {
  z-index: 2005;
}

.ibd-sus-success-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  /* Bootstrap’s default btn-close opacity (0.5) makes the X hard to see */
  --bs-btn-close-opacity: 1;
  --bs-btn-close-hover-opacity: 1;
  background-color: #e2e8f0;
  border: 1px solid #94a3b8;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  opacity: 1;
  filter: none;
  padding: 0;
  background-image: var(--bs-btn-close-bg);
  background-position: center;
  background-size: 1.05em;
  background-repeat: no-repeat;
}

.ibd-sus-success-close:hover {
  background-color: #cbd5e1;
  border-color: #64748b;
  opacity: 1;
}


.ibd-sus-success-text {
  letter-spacing: -0.02em;
}

/* IB Suspended banner + reactivate (client-side state) */
.ibd-suspended-banner {
  background: #fee2e2;
  border: 1px solid #b91c1c;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: none;
}

.ibd-suspended-banner-icon {
  font-size: 1.5rem;
  line-height: 1;
  color: #b91c1c;
  margin-top: 2px;
}

.ibd-suspended-banner-icon :is(.fa, .fas) {
  color: #b91c1c;
}

.ibd-suspended-title {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  line-height: 1.3;
}

.ibd-suspended-desc {
  margin-top: 6px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #475569;
}

.ibd-suspended-view-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.875rem;
  color: #2563eb !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ibd-suspended-view-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1d4ed8 !important;
}

.ibd-suspended-view-btn i {
  color: #2563eb !important;
}

.ibd-btn-reactivate {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #166534;
}

.ibd-btn-reactivate:hover {
  background: rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.5);
  color: #14532d;
}

.ibd-btn-reactivate :is(.fa, .fas) {
  color: #166534 !important;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-status-dot--suspended {
  background: #94a3b8;
}

:is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-avatar-edit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Responsive offcanvas sizing */
@media (max-width: 991.98px) {
  .ibd-offcanvas {
    --bs-offcanvas-width: min(560px, 96vw);
  }
}

@media (max-width: 575.98px) {
  .ibd-offcanvas {
    --bs-offcanvas-width: 100vw; /* full width on mobile like design */
    border-radius: 0 !important;
  }

  .ibd-offcanvas .offcanvas-header,
  .ibd-offcanvas .offcanvas-body {
    padding-left: 16px;
    padding-right: 16px;
  }
}

#ibDetailsPage .ibd-section-header {
  background: #f8fafc;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

#ibDetailsPage .ibd-chip {
  padding: 10px 12px;
  font-weight: 700;
}

#ibDetailsPage .ibd-inner-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  /* equal shadow on all sides (no directional offset) */
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 0 26px rgba(15, 23, 42, 0.16) !important;
}

#ibDetailsPage .ibd-stat-row {
  background: #f3f4f6;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

/* Responsive: keep desktop unchanged, improve mobile */
@media (max-width: 991.98px) {
  :is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-actions {
    max-width: 100%;
    margin-left: 0;
  }

  /* On mobile/tablet the sub-nav should be full width (col-12) */
  :is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar {
    width: 100%;
    display: block;
  }
}

@media (max-width: 575.98px) {
  :is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar {
    width: 100%;
    display: block;
    overflow: hidden; /* keep rounded corners clean */
  }

  /* Make the whole nav row horizontally scrollable */
  :is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .ibd-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(100, 116, 139, 0.55) rgba(241, 245, 249, 0.9);
    padding-bottom: 6px; /* space for scrollbar */
  }

  :is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .ibd-tabs::-webkit-scrollbar {
    height: 6px;
  }

  :is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .ibd-tabs::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.9);
    border-radius: 999px;
  }

  :is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .ibd-tabs::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.55);
    border-radius: 999px;
  }

  :is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .nav-item {
    flex: 0 0 auto;
  }

  :is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .nav-link {
    white-space: nowrap;
    padding: 10px 14px; /* slightly tighter on mobile */
    font-size: 0.9rem;
  }

  /* Dividers don't behave nicely when scrolling */
  :is(#ibDetailsPage, #ibWalletsPage, #ibReferralLinksPage, #ibClientsPage, #ibTreePage, #ibActivityLogPage) .ibd-tabsbar .nav-item:not(:last-child) .nav-link::after {
    display: none;
  }
}

