/*
 * LITREVO R58 — WhatsApp-style Shared Inbox presentation.
 * Visual changes only: existing inbox forms, routes and actions are preserved.
 */

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] {
  --wa-app-bg: #f0f2f5;
  --wa-chat-bg: #efeae2;
  --wa-header-bg: #f0f2f5;
  --wa-panel-bg: #fff;
  --wa-incoming: #fff;
  --wa-outgoing: #d9fdd3;
  --wa-green: #00a884;
  --wa-green-dark: #008069;
  --wa-text: #111b21;
  --wa-muted: #667781;
  --wa-line: #e9edef;
}

/* The inbox occupies only the space left below the global toolbar. */
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .app-main {
  height: calc(100dvh - var(--master-context-height, 0px));
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .page-content {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 14px 16px 16px !important;
  overflow: hidden;
  background: var(--wa-app-bg) !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] :is(.ci-inbox-workspace,.premium-inbox-workspace) {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] :is(.premium-inbox-shell,.inbox-shell) {
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  max-height: 100%;
  overflow: hidden;
  border: 1px solid #d7dcdf !important;
  border-radius: 12px !important;
  background: var(--wa-panel-bg) !important;
  box-shadow: 0 2px 8px rgba(11,20,26,.08) !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-inbox-shell.has-selection {
  grid-template-columns: 340px minmax(460px, 1fr) minmax(320px, 25%);
}

/* Conversation list */
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-inbox-list {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #d8dcdf !important;
  background: var(--wa-panel-bg) !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-queue-tools {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--wa-line);
  background: var(--wa-header-bg);
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-search-field input {
  height: 36px;
  min-height: 36px;
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--wa-text) !important;
  background: #fff !important;
  box-shadow: none !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] :is(.ci-round-tool,.ci-filter-button,.ci-filter-select select,.ci-filter-chip) {
  border-color: #d7dcdf !important;
  color: #54656f !important;
  background: #fff !important;
  box-shadow: none !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-list-summary {
  border-bottom-color: var(--wa-line);
  color: var(--wa-muted);
  background: #fff;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-auto-assign {
  margin: 7px 8px;
  border-color: #d8dcdf;
  color: #54656f;
  background: #fff;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-conversation-list {
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  scrollbar-color: #ced0d1 transparent;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-conversation-row {
  min-height: 74px;
  display: grid !important;
  grid-template-columns: 49px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 10px 12px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--wa-line) !important;
  border-radius: 0 !important;
  color: var(--wa-text);
  background: #fff !important;
  box-shadow: none !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-conversation-row:hover {
  background: #f5f6f6 !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-conversation-row.active {
  background: #f0f2f5 !important;
  box-shadow: none !important;
}

.ci-conversation-avatar,
.ci-chat-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: #7f9ba5;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
}

.ci-conversation-avatar {
  width: 49px;
  height: 49px;
}

.ci-chat-avatar {
  width: 40px;
  height: 40px;
  font-size: 12px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-conversation-row .conversation-title strong {
  max-width: 185px;
  color: var(--wa-text) !important;
  font-size: 14px;
  font-weight: 600;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-conversation-row .conversation-title time {
  color: var(--wa-muted);
  font-size: 10.5px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-conversation-row .conversation-preview {
  min-width: 0;
  margin-top: 4px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-conversation-row .conversation-preview > span {
  overflow: hidden;
  color: var(--wa-muted) !important;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-conversation-row .pi-row-meta {
  margin-top: 4px;
  color: var(--wa-muted);
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-inbox-list.is-selecting .premium-conversation-row {
  grid-template-columns: 16px 49px minmax(0,1fr) !important;
  align-items: center;
  gap: 9px;
}

/* Active chat header and center column */
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-inbox-chat {
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 60px minmax(0,1fr) auto !important;
  overflow: hidden;
  border-right: 1px solid #d8dcdf;
  background: var(--wa-chat-bg) !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-header {
  min-width: 0;
  min-height: 60px;
  height: 60px;
  padding: 8px 12px;
  border: 0 !important;
  border-bottom: 1px solid #d8dcdf !important;
  background: var(--wa-header-bg) !important;
  box-shadow: none !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-contact {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-contact > div {
  min-width: 0;
  gap: 2px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-contact strong {
  overflow: hidden;
  color: var(--wa-text) !important;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-contact a {
  color: var(--wa-muted);
  font-size: 10.5px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-actions {
  min-width: 0;
  gap: 4px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] :is(.ci-header-tool,.ci-chat-actions .ci-status-control) {
  width: 40px;
  height: 40px;
  border: 0 !important;
  border-radius: 50% !important;
  color: #54656f !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] :is(.ci-header-tool,.ci-chat-actions .ci-status-control):hover {
  background: #dfe3e5 !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-actions .ci-assign-control {
  min-width: 0;
  border: 0 !important;
  border-radius: 8px !important;
  color: #54656f;
  background: rgba(255,255,255,.74) !important;
}

/* WhatsApp-style wallpaper and message bubbles. */
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream {
  min-width: 0;
  min-height: 0;
  padding: 18px clamp(22px,5vw,72px) !important;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--wa-chat-bg) !important;
  background-image:
    radial-gradient(circle at 12px 12px,rgba(84,101,111,.045) 0 1.3px,transparent 1.5px),
    radial-gradient(circle at 33px 28px,rgba(84,101,111,.035) 0 1px,transparent 1.3px),
    linear-gradient(35deg,transparent 47%,rgba(84,101,111,.025) 48% 52%,transparent 53%) !important;
  background-size: 46px 46px,58px 58px,64px 64px !important;
  scrollbar-color: #b8b9b4 transparent;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream .date-divider {
  width: max-content;
  margin: 8px auto 14px;
  padding: 6px 12px;
  border: 0 !important;
  border-radius: 7px;
  color: #54656f;
  background: rgba(255,255,255,.92) !important;
  box-shadow: 0 1px 1px rgba(11,20,26,.10);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream .message-row {
  margin: 3px 0;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream .message-bubble:not(.ci-message-action-card) {
  position: relative;
  max-width: min(72%,560px);
  padding: 7px 8px 5px 9px;
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--wa-text) !important;
  background: var(--wa-incoming) !important;
  box-shadow: 0 1px .5px rgba(11,20,26,.13) !important;
  font-size: 13.5px;
  line-height: 1.42;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream .message-row.outbound .message-bubble:not(.ci-message-action-card) {
  color: var(--wa-text) !important;
  background: var(--wa-outgoing) !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream .message-bubble:not(.ci-message-action-card)::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 9px solid var(--wa-incoming);
  border-left: 9px solid transparent;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream .message-row.outbound .message-bubble:not(.ci-message-action-card)::before {
  right: -8px;
  left: auto;
  border-top-color: var(--wa-outgoing);
  border-right: 9px solid transparent;
  border-left: 0;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream .message-bubble p {
  margin: 0;
  color: inherit !important;
  font-size: 13.5px !important;
  line-height: 1.42 !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream .message-meta {
  min-height: 13px;
  gap: 3px;
  margin-top: 2px;
  color: var(--wa-muted) !important;
  font-size: 9.5px !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-wa-status.is-read {
  color: #53bdeb !important;
}

/* Composer remains contained within the center column at every width. */
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-composer {
  position: relative;
  z-index: 5;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 8px 10px !important;
  overflow: visible;
  border: 0 !important;
  border-top: 1px solid #d8dcdf !important;
  background: var(--wa-header-bg) !important;
  box-shadow: none !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-composer-form {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0,1fr) 44px !important;
  align-items: end;
  gap: 8px;
  margin: 0;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-composer-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-composer-tabs {
  height: 35px;
  padding: 0 10px;
  border-bottom: 1px solid var(--wa-line);
  background: #fff !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-composer-tabs :is(span,a) {
  height: 30px;
  color: var(--wa-muted);
  font-size: 11px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-composer-tabs span {
  border-bottom-color: var(--wa-green) !important;
  color: var(--wa-green-dark) !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-action-toolbar .ci-action-tool {
  color: #54656f !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-action-toolbar .ci-action-tool:hover,
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-action-toolbar .ci-action-tool.active {
  color: #fff !important;
  background: var(--wa-green) !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-composer-card .pi-compose-row {
  min-height: 52px;
  padding: 5px 10px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-composer-card .composer-input {
  min-height: 42px;
  max-height: 108px;
  padding: 9px 1px;
  color: var(--wa-text) !important;
  font-size: 13px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-send-button,
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-send-button:hover,
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-send-button:focus-visible {
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  align-self: end;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff !important;
  background: var(--wa-green) !important;
  box-shadow: none !important;
  transform: none !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-send-button .icon {
  width: 19px;
  height: 19px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-send-button > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-send-button:disabled {
  color: #8696a0 !important;
  background: #d8dcdf !important;
  opacity: 1 !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-service-window {
  min-height: 70px;
  border-bottom: 1px solid var(--wa-line);
  color: #54656f;
  background: #fff8df;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-service-window :is(button,a) {
  border-color: #c8d6d1;
  color: var(--wa-green-dark);
  background: #fff;
}

/* Customer context uses the same neutral WhatsApp panel finish. */
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-contact-pane {
  min-width: 0;
  min-height: 0;
  padding: 0 10px 10px;
  overflow-y: auto;
  border-left: 0;
  background: var(--wa-header-bg) !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-details-heading {
  height: 60px;
  color: var(--wa-text);
  background: var(--wa-header-bg) !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] :is(.ci-detail-card,.ci-notes-card,.ci-tags-card,.ci-history-card,.ci-profile-card) {
  border: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

@media (max-width: 1550px) {
  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-inbox-shell.has-selection {
    grid-template-columns: 310px minmax(440px,1fr) 320px;
  }
}

@media (max-width: 1180px) {
  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-inbox-shell.has-selection {
    grid-template-columns: 310px minmax(0,1fr);
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-contact-pane {
    display: none;
  }
}

@media (max-width: 900px) {
  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .page-content {
    padding: 0 !important;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] :is(.premium-inbox-shell,.inbox-shell) {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-inbox-shell {
    grid-template-columns: 1fr !important;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream {
    padding-inline: clamp(16px,5vw,42px) !important;
  }
}

@media (max-width: 620px) {
  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-header {
    min-height: 58px;
    height: auto;
    padding: 7px 8px;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-actions {
    width: auto;
    margin-left: auto;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-actions form:first-child {
    display: none;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream {
    padding: 13px 15px !important;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-message-stream .message-bubble:not(.ci-message-action-card) {
    max-width: 86%;
    font-size: 13px;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-composer {
    padding: 7px 8px !important;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-composer-form {
    grid-template-columns: minmax(0,1fr) 42px !important;
    gap: 6px;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-send-button {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-action-toolbar {
    position: static;
    width: 100%;
    justify-content: flex-start;
    padding: 4px 7px !important;
    overflow-x: auto;
    border-top: 1px solid var(--wa-line) !important;
  }
}

/* R60 — initials belong to the avatar surface, never to the surrounding chat
   typography. The explicit resets protect these three avatar variants from
   broad `.chat-contact span` and glass text rules loaded earlier. */
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] :is(
  .premium-conversation-row > .ci-conversation-avatar,
  .ci-chat-contact > .ci-chat-avatar,
  .ci-profile-row > .pi-avatar.profile
) {
  position: relative !important;
  inset: auto !important;
  display: grid !important;
  place-items: center !important;
  align-self: center !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.48) !important;
  border-radius: 50% !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #062b5f !important;
  box-shadow: 0 2px 7px rgba(6,43,95,.18) !important;
  font-family: "Poppins","Inter",Arial,sans-serif !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
  text-align: center !important;
  text-indent: 0 !important;
  white-space: nowrap !important;
  transform: none !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .premium-conversation-row > .ci-conversation-avatar {
  width: 49px !important;
  min-width: 49px !important;
  max-width: 49px !important;
  height: 49px !important;
  min-height: 49px !important;
  max-height: 49px !important;
  font-size: 13px !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-contact > .ci-chat-avatar {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  font-size: 12px !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-profile-row {
  grid-template-columns: 42px minmax(0,1fr) auto !important;
  align-items: center !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-profile-row > .pi-avatar.profile {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  font-size: 12px !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-contact {
  overflow: hidden;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-chat-contact > div,
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .ci-profile-row > strong {
  min-width: 0;
}

/* R59 — compact inbox-only toolbar. It remains in normal document flow so the
   inbox shell can never paint behind or underneath it. */
html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar {
  position: relative !important;
  z-index: 30 !important;
  top: auto !important;
  width: 100%;
  height: 60px !important;
  min-height: 60px !important;
  padding: 0 16px !important;
  border-bottom: 1px solid #d8dcdf !important;
  background: #fff !important;
  box-shadow: none !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar::after {
  left: 16px;
  width: 82px;
  height: 2px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar-left {
  min-width: 0;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .command-search {
  width: min(520px,46vw);
  min-width: 240px;
  height: 40px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 10px !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .command-search > .icon {
  width: 17px;
  height: 17px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .command-search input {
  font-size: 12.5px !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar-actions {
  gap: 7px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] :is(.notification-button,.topbar-support-button,.topbar-settings-icon) {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 10px !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar-avatar-menu .user-menu-trigger {
  min-width: 210px;
  height: 42px !important;
  min-height: 42px !important;
  padding: 3px 8px 3px 4px !important;
  border-radius: 11px !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar-avatar-menu .avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar-avatar-menu .user-menu-copy strong {
  font-size: 11px !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar-avatar-menu .user-menu-copy small {
  font-size: 9px !important;
}

html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .page-content {
  position: relative;
  z-index: 1;
  padding: 10px 12px 12px !important;
}

@media (max-width: 900px) {
  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar {
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 10px !important;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .command-search {
    width: min(360px,calc(100vw - 220px));
    min-width: 110px;
    height: 38px;
    min-height: 38px;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .page-content {
    padding: 0 !important;
  }
}

@media (max-width: 620px) {
  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar-actions {
    gap: 4px;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] :is(.topbar-support-button,.topbar-settings-icon) {
    display: none !important;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar-avatar-menu .user-menu-trigger {
    width: 38px;
    min-width: 38px;
    height: 38px !important;
    min-height: 38px !important;
    padding: 2px !important;
    border-radius: 50% !important;
  }

  html body.app-body.ui-reference-light.business-colorful.page-inbox[data-ui-version][data-page-key="inbox"] .topbar-avatar-menu .avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
}
