/* AI Mogul Studio UI overlay for LibreChat.
 * One look on phone and desktop: AI Mogul's teal-black theme colours (set in
 * librechat.yaml) with a Grok-style layout: round buttons, a centred title
 * pill, a logo-only home screen, quick-action buttons above the message box
 * and a mint send button. Colours always come from the theme variables, so
 * changing the theme in librechat.yaml recolours all of this too.
 * Rules target stable hooks (data-testid, ids, component classes); if an
 * upgrade renames one, that rule simply stops applying. Remove to undo. */

/* ---------- Header: round icon buttons and a centred title pill */
div[class*='h-[3.25rem]'][class*='from-surface-canvas'] button:not([data-testid='model-selector-button']) {
  width: 40px;
  height: 40px;
  border-radius: 9999px !important;
  background: rgb(var(--surface-secondary)) !important;
  border: 1px solid rgb(var(--border-medium)) !important;
}
div[class*='h-[3.25rem]'][class*='from-surface-canvas'] > .flex-1 > div[class*='max-w-[60vw]'] {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(52vw, 22rem);
}
[data-testid='model-selector-button'] {
  height: 40px !important;
  border-radius: 9999px !important;
  background: rgb(var(--surface-secondary)) !important;
  border: 1px solid rgb(var(--border-medium)) !important;
  padding-inline: 14px !important;
}

/* ---------- Left rail (desktop): round icon buttons */
[data-testid='open-sidebar-button'],
[data-testid='close-sidebar-button'],
[data-testid='new-chat-button'],
[data-testid='nav-agents-marketplace-button'],
[data-testid^='nav-panel-'],
[data-testid='nav-new-chat-fab'] {
  border-radius: 9999px !important;
}

/* ---------- Home screen: just a big logo tile, no welcome line */
.relative.size-10.justify-center {
  width: 72px !important;
  height: 72px !important;
  margin-bottom: 4px !important;
}
.relative.size-10.justify-center .rounded-full {
  border-radius: 20px !important;
}
.relative.size-10.justify-center img {
  object-fit: contain !important;
}
.relative.size-10.justify-center + :not(.p-2) {
  display: none !important;
}

/* ---------- Message box: rounded card, round attach button, mint send button */
[data-testid='composer-surface'] {
  border-radius: 28px !important;
  border: 1px solid rgb(var(--border-medium)) !important;
}
[data-testid='composer-surface'] [aria-label='Attach and tools'] {
  width: 36px;
  height: 36px;
  border-radius: 9999px !important;
  border: 1px solid rgb(var(--border-medium)) !important;
}
[data-testid='send-button'] {
  background: rgb(var(--accent-primary)) !important;
  color: rgb(var(--surface-primary)) !important;
  border-radius: 9999px !important;
}
[data-testid='send-button']:disabled {
  background: rgb(var(--surface-tertiary)) !important;
  color: rgb(var(--text-secondary)) !important;
  opacity: 1 !important;
}

/* ---------- Conversation: your messages at full strength, no name over replies */
[class*='bg-surface-user-message'],
[class*='bg-surface-user-message'] p {
  color: rgb(var(--text-primary));
}
h2[class*='min-h-7'][class*='w-full'][class*='select-none'] {
  display: none !important;
}

/* ---------- Members only see what they can use (data-mogul-role is set by mogul.js) */
html[data-mogul-role='USER'] #nav-panel-mcp-builder,
html[data-mogul-role='USER'] [data-testid='nav-panel-mcp-builder'],
html[data-mogul-role='USER'] [data-testid='add-multi-convo-button'],
html[data-mogul-role='USER'] [aria-label='My bots'],
html[data-mogul-role='USER'] [aria-label='My agents'] {
  display: none !important;
}

/* ---------- Bots page: category dropdown (built by mogul.js) replaces the chips */
html.mogul-cat-dropdown #marketplace-heading + div [role='tablist'] {
  display: none !important;
}
#mogul-cat-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
#mogul-cat {
  appearance: none;
  -webkit-appearance: none;
  height: 40px;
  min-width: 180px;
  max-width: 100%;
  padding: 0 44px 0 16px;
  border-radius: 9999px;
  border: 1px solid rgb(var(--border-medium));
  background: rgb(var(--surface-secondary));
  color: rgb(var(--text-primary));
  font: 500 14px/1 inherit;
  font-family: inherit;
  cursor: pointer;
}
html.dark #mogul-cat {
  color-scheme: dark;
}
#mogul-cat:hover {
  background: rgb(var(--surface-hover));
}
#mogul-cat:focus-visible {
  outline: 2px solid rgb(var(--accent-primary));
  outline-offset: 2px;
}
#mogul-cat option {
  background: rgb(var(--surface-secondary));
  color: rgb(var(--text-primary));
}
/* Search box and sort menu match the dropdown's pill shape. */
#marketplace-heading + div > div:first-child input {
  border-radius: 9999px !important;
  height: 40px;
  padding-left: 18px !important;
  background: rgb(var(--surface-secondary)) !important;
  border-color: rgb(var(--border-medium)) !important;
}
#marketplace-heading + div > div:first-child .bg-surface-primary-alt {
  background: transparent !important;
}
#marketplace-heading + div > div:nth-child(2) > .ms-auto button {
  height: 40px;
  border-radius: 9999px !important;
  padding-inline: 14px;
}
#mogul-cat-wrap::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgb(var(--text-secondary));
  border-bottom: 2px solid rgb(var(--text-secondary));
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ---------- Quick-action buttons above the message box (built by mogul.js) */
#mogul-quick {
  position: fixed;
  z-index: 25;
  display: none;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#mogul-quick::-webkit-scrollbar {
  display: none;
}
#mogul-quick.is-on {
  display: flex;
}
/* Under a mid-screen message box (desktop): wrap into centred rows. */
#mogul-quick.is-below {
  flex-wrap: wrap;
  justify-content: center;
  overflow: visible;
}
#mogul-quick button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgb(var(--border-medium));
  background: rgb(var(--surface-secondary));
  color: rgb(var(--text-primary));
  font: 500 14px/1 inherit;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#mogul-quick button:hover,
#mogul-quick button:active {
  background: rgb(var(--surface-hover));
}
#mogul-quick svg {
  width: 18px;
  height: 18px;
  color: rgb(var(--accent-primary));
  flex-shrink: 0;
}

/* =====================================================================
 * Phones only
 * ===================================================================== */
@media (max-width: 767px) {
  /* Message box floats with breathing room */
  form:has([data-testid='composer-surface']) {
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  /* Bots: compact rows instead of tall cards */
  article[class*='min-h-[17.5rem]'] {
    min-height: 0 !important;
    padding: 12px 40px 12px 14px !important;
  }
  article[class*='min-h-[17.5rem]'] > .z-20 {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr);
    /* Outer 1fr rows soak up the avatar's extra height so the text stays centred. */
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: 12px;
    align-items: center;
  }
  article[class*='min-h-[17.5rem]'] > .z-20 > div:first-child {
    display: contents;
  }
  article[class*='min-h-[17.5rem]'] > .z-20 > div:first-child > :first-child {
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: center;
  }
  /* The category is already the selected tab above the list. */
  article[class*='min-h-[17.5rem]'] > .z-20 > div:first-child > :nth-child(2),
  article[class*='min-h-[17.5rem]'] > .z-20 > footer {
    display: none !important;
  }
  article[class*='min-h-[17.5rem]'] h2 {
    grid-column: 2;
    grid-row: 2;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 20px !important;
    -webkit-line-clamp: 1 !important;
    line-clamp: 1 !important;
  }
  article[class*='min-h-[17.5rem]'] > .z-20 > p {
    grid-column: 2;
    grid-row: 3;
    margin: 2px 0 0 !important;
    font-size: 13px !important;
    line-height: 18px !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }
  /* Chevron: the row opens the bot. */
  article[class*='min-h-[17.5rem]']::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid rgb(var(--text-secondary));
    border-right: 2px solid rgb(var(--text-secondary));
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
    z-index: 20;
  }
  div[class*='--agent-columns'],
  div[class*='grid-cols-[repeat(auto-fill'] {
    gap: 8px !important;
  }
  /* Category chips only; sorting stays on desktop. */
  #marketplace-heading + div > div:nth-child(2) > .ms-auto {
    display: none !important;
  }
  #marketplace-heading + div > div:nth-child(2) {
    padding-bottom: 10px;
  }

  /* Drawer: room for the full panel name, pill buttons */
  [data-testid='panel-switcher-button'] > svg:first-child {
    display: none;
  }
  #mobile-drawer [data-testid='close-sidebar-button'],
  #mobile-drawer [data-testid='nav-new-chat-fab'] {
    background: rgb(var(--surface-secondary)) !important;
    border: 1px solid rgb(var(--border-medium)) !important;
  }
  #mobile-drawer [data-testid='panel-switcher-button'],
  #mobile-drawer [data-testid='nav-search-input'] {
    border-radius: 9999px !important;
  }
}

/* ---------- AI credits pill in the header (opens Credits & plan) ---------- */
#mogul-credits {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 9999px;
  border: 1px solid rgb(var(--border-medium));
  background: rgb(var(--surface-secondary));
  color: rgb(var(--text-primary));
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
#mogul-credits svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: rgb(var(--accent-primary));
}
#mogul-credits:hover,
#mogul-credits:focus-visible {
  border-color: rgb(var(--accent-primary));
}
#mogul-credits .mogul-credits-l {
  font-weight: 500;
  color: rgb(var(--text-secondary));
}
#mogul-credits.is-empty {
  border-color: rgba(255, 138, 128, 0.55);
}
#mogul-credits.is-empty svg {
  color: #ff8a80;
}
@media (max-width: 767px) {
  #mogul-credits {
    height: 34px;
    padding: 0 10px;
  }
  #mogul-credits .mogul-credits-l {
    display: none;
  }
}

/* ---------- Settings: Plan & credits, Usage, Refer & earn (mogul-billing.js) ----------
 * Drawn with the app's own theme variables so it follows light and dark. */
.mogul-settings-on [role='tab'][data-state='active']:not([data-mogul-tab]) {
  background: transparent !important;
  color: rgb(var(--text-secondary)) !important;
}
.mogul-settings-on > div:not(#mogul-settings-panel):not(:has([role='tablist'])) {
  display: none !important;
}
#mogul-settings-panel {
  flex: 1 1 0%;
  min-width: 0;
  overflow-y: auto;
  padding-inline-end: 4px;
  color: rgb(var(--text-primary));
  font-size: 14px;
}
#mogul-settings-panel .mb-back {
  display: none;
}
@media (max-width: 767px) {
  .mogul-settings-on > div:has([role='tablist']) {
    display: none !important;
  }
  #mogul-settings-panel .mb-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: -4px 0 14px -4px;
    padding: 4px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 500;
    color: rgb(var(--text-primary));
  }
  #mogul-settings-panel .mb-back-icon {
    width: 20px;
    height: 20px;
  }
}
#mogul-settings-panel .mb-section {
  margin-bottom: 26px;
}
#mogul-settings-panel .mb-h {
  margin: 0 0 6px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(var(--text-secondary));
}
#mogul-settings-panel .mb-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#mogul-settings-panel .mb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 4px;
  border-top: 1px solid rgb(var(--border-light));
  color: inherit;
  text-decoration: none;
}
#mogul-settings-panel .mb-group > .mb-row:first-child,
#mogul-settings-panel .mb-card + .mb-row,
#mogul-settings-panel .mb-balance + .mb-row,
#mogul-settings-panel .mb-packs + .mb-row {
  border-top: 0;
}
#mogul-settings-panel a.mb-activity:hover {
  background: rgb(var(--surface-hover));
  border-radius: 10px;
}
#mogul-settings-panel .mb-row-main {
  min-width: 0;
  flex: 1;
}
#mogul-settings-panel .mb-row-right {
  flex: none;
}
#mogul-settings-panel .mb-label {
  font-weight: 500;
}
#mogul-settings-panel .mb-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#mogul-settings-panel .mb-sub,
#mogul-settings-panel .mb-help {
  margin-top: 2px;
  font-size: 13px;
  color: rgb(var(--text-secondary));
}
#mogul-settings-panel .mb-help {
  padding: 8px 4px 0;
}
#mogul-settings-panel .mb-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#mogul-settings-panel .mb-plus {
  color: rgb(var(--accent-primary));
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#mogul-settings-panel .mb-minus {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: rgb(var(--text-secondary));
}
#mogul-settings-panel .mb-card {
  border: 1px solid rgb(var(--border-light));
  background: rgb(var(--surface-secondary));
  border-radius: 16px;
  padding: 14px 16px;
}
#mogul-settings-panel .mb-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#mogul-settings-panel .mb-confirm {
  margin-bottom: 16px;
  border-color: rgb(var(--text-destructive) / 0.5);
}
#mogul-settings-panel .mb-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
#mogul-settings-panel .mb-title {
  font-size: 16px;
  font-weight: 600;
}
#mogul-settings-panel .mb-feature {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgb(var(--border-light));
}
#mogul-settings-panel .mb-feature svg {
  margin-top: 2px;
  color: rgb(var(--accent-primary));
  flex: none;
}
#mogul-settings-panel .mb-badge {
  display: inline-block;
  margin-inline-start: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  vertical-align: 2px;
  border: 1px solid rgb(var(--border-medium));
  color: rgb(var(--text-secondary));
}
#mogul-settings-panel .mb-inline .mb-badge {
  margin-inline-start: 8px;
}
#mogul-settings-panel .mb-badge.mb-ok {
  color: rgb(var(--accent-primary));
  border-color: rgb(var(--accent-primary) / 0.45);
}
#mogul-settings-panel .mb-badge.mb-warn {
  color: rgb(var(--text-warning, 202 138 4));
  border-color: rgb(var(--text-warning, 202 138 4) / 0.45);
}
#mogul-settings-panel .mb-badge.mb-bad {
  color: rgb(var(--text-destructive));
  border-color: rgb(var(--text-destructive) / 0.45);
}
#mogul-settings-panel .mb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgb(var(--border-medium));
  background: rgb(var(--surface-primary));
  color: rgb(var(--text-primary));
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  text-decoration: none;
}
#mogul-settings-panel .mb-btn:hover {
  background: rgb(var(--surface-hover));
}
#mogul-settings-panel .mb-btn.mb-primary {
  background: rgb(var(--accent-primary));
  border-color: rgb(var(--accent-primary));
  color: rgb(var(--surface-primary));
  font-weight: 600;
}
#mogul-settings-panel .mb-btn.mb-danger {
  color: rgb(var(--text-destructive));
  border-color: rgb(var(--text-destructive) / 0.5);
}
#mogul-settings-panel .mb-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: rgb(var(--text-primary));
  cursor: pointer;
  text-decoration: none;
}
#mogul-settings-panel .mb-menu {
  position: relative;
}
#mogul-settings-panel .mb-menu summary::-webkit-details-marker {
  display: none;
}
#mogul-settings-panel .mb-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  min-width: 170px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgb(var(--border-light));
  background: rgb(var(--surface-dialog));
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
}
#mogul-settings-panel .mb-menu-list button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: rgb(var(--text-primary));
  font: inherit;
  text-align: start;
  cursor: pointer;
}
#mogul-settings-panel .mb-menu-list button:hover {
  background: rgb(var(--surface-hover));
}
#mogul-settings-panel .mb-danger-text {
  color: rgb(var(--text-destructive)) !important;
}
#mogul-settings-panel .mb-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
#mogul-settings-panel .mb-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px 12px;
}
#mogul-settings-panel .mb-big {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
#mogul-settings-panel .mb-packs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  padding: 0 0 12px;
}
#mogul-settings-panel .mb-packs[hidden] {
  display: none;
}
#mogul-settings-panel .mb-pack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgb(var(--border-light));
  background: rgb(var(--surface-secondary));
  color: rgb(var(--text-primary));
  font: inherit;
  cursor: pointer;
}
#mogul-settings-panel .mb-pack:hover {
  border-color: rgb(var(--accent-primary));
}
#mogul-settings-panel .mb-pack b {
  font-size: 16px;
}
#mogul-settings-panel .mb-pack span {
  font-size: 12px;
  color: rgb(var(--text-secondary));
}
#mogul-settings-panel .mb-wide {
  grid-column: 1 / -1;
}
#mogul-settings-panel .mb-note {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  background: rgb(var(--surface-secondary));
  border: 1px solid rgb(var(--border-light));
  color: rgb(var(--text-secondary));
}
#mogul-settings-panel .mb-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  padding: 4px 0 12px;
}
#mogul-settings-panel .mb-stats > div {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgb(var(--border-light));
}
#mogul-settings-panel .mb-stats b {
  display: block;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
#mogul-settings-panel .mb-stats span {
  font-size: 12px;
  color: rgb(var(--text-secondary));
}
#mogul-settings-panel .mb-chart-wrap {
  padding: 4px 4px 0;
}
#mogul-settings-panel .mb-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 110px;
}
#mogul-settings-panel .mb-bar {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1px;
  border-radius: 3px;
  background: rgb(var(--border-light) / 0.55);
}
#mogul-settings-panel .mb-bar-chat {
  background: rgb(var(--accent-primary));
  border-radius: 3px;
}
#mogul-settings-panel .mb-bar-media {
  background: rgb(var(--accent-primary) / 0.45);
  border-radius: 3px;
}
#mogul-settings-panel .mb-chart-axis,
#mogul-settings-panel .mb-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: rgb(var(--text-secondary));
}
#mogul-settings-panel .mb-legend {
  justify-content: flex-start;
  gap: 14px;
}
#mogul-settings-panel .mb-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 6px;
  border-radius: 2px;
}
#mogul-settings-panel .mb-dot-chat {
  background: rgb(var(--accent-primary));
}
#mogul-settings-panel .mb-dot-media {
  background: rgb(var(--accent-primary) / 0.45);
}
#mogul-settings-panel .mb-linkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 14px;
  border-radius: 999px;
  border: 1px solid rgb(var(--border-light));
  background: rgb(var(--surface-secondary));
}
#mogul-settings-panel .mb-linkbox code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
#mogul-settings-panel .mb-form {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr auto;
  gap: 8px;
  padding: 4px 0;
}
@media (max-width: 520px) {
  #mogul-settings-panel .mb-form {
    grid-template-columns: 1fr;
  }
}
#mogul-settings-panel .mb-input {
  height: 36px;
  min-width: 0;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgb(var(--border-medium));
  background: rgb(var(--surface-primary));
  color: rgb(var(--text-primary));
  font: inherit;
  font-size: 14px;
}
#mogul-settings-panel .mb-empty,
#mogul-settings-panel .mb-loading {
  padding: 12px 4px;
  color: rgb(var(--text-secondary));
}
.mb-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgb(var(--surface-dialog));
  border: 1px solid rgb(var(--accent-primary));
  color: rgb(var(--text-primary));
  font-size: 14px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}
.mb-toast.mb-bad {
  border-color: rgb(var(--text-destructive));
}

#mogul-settings-panel .mb-chart-wrap {
  position: relative;
}
#mogul-settings-panel .mb-chart-empty {
  position: absolute;
  inset: 4px 4px auto;
  height: 110px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: rgb(var(--text-secondary));
}
/* LibreChat's own Billing block in Settings > Account shows the same balance with
   auto-refill wording that doesn't apply; Plan & credits replaces it. */
[role='dialog'] section:has([data-testid='balance-value']) {
  display: none !important;
}
@media (max-width: 520px) {
  #mogul-settings-panel .mb-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
