* {
  box-sizing: border-box;
}

/* Inbox workspace */
.suite-inbox-main .inbox-layout {
  background: #f4f6f8;
  grid-template-columns: 210px 340px minmax(360px, 1fr) 280px;
}

.suite-inbox-main .inbox-layout.all-chats-layout {
  grid-template-columns: 360px minmax(420px, 1fr) 290px;
}

.inbox-page-rail,
.conversation-browser {
  background: #ffffff;
  border-right: 1px solid #dce2e9;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.inbox-page-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.page-rail-header,
.conversation-browser-header {
  align-items: center;
  border-bottom: 1px solid #e5e9ef;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 14px;
}

.inbox-kicker {
  color: #1877f2;
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.page-rail-header h2,
.conversation-browser-header h2 {
  font-size: 19px;
  letter-spacing: 0;
  margin: 0;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid #d9e0e8;
  color: #566274;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.icon-button:hover,
.icon-button.active {
  background: #eaf3ff;
  border-color: #99c7ff;
  color: #1877f2;
}

.icon-button svg,
.conversation-search svg,
.conversation-filter-row svg,
.conversation-star svg,
.mark-all-read-button svg,
.conversation-list-empty svg,
.empty-chat-visual svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.page-rail-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 8px;
}

.page-rail-item {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  display: grid;
  gap: 9px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 52px;
  padding: 6px 8px;
}

.page-rail-item:hover {
  background: #f2f5f8;
}

.page-rail-item.active {
  background: #eaf3ff;
  border-color: #a9cfff;
  color: #0d64d8;
}

.page-rail-avatar {
  align-items: center;
  background: #e7f5f2;
  border-radius: 50%;
  color: #087f72;
  display: flex;
  font-size: 15px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  position: relative;
  width: 38px;
}

.page-rail-avatar img,
.customer-avatar img {
  border-radius: inherit;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.page-rail-avatar i {
  align-items: center;
  background: #1877f2;
  border: 2px solid #ffffff;
  border-radius: 50%;
  bottom: -2px;
  color: #ffffff;
  display: flex;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  height: 15px;
  justify-content: center;
  position: absolute;
  right: -2px;
  width: 15px;
}

.page-rail-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.page-rail-copy strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-rail-copy small {
  color: #7b8798;
  font-size: 10px;
}

.page-unread-badge,
.conversation-unread-badge {
  align-items: center;
  background: #e32636;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  justify-content: center;
  min-height: 19px;
  min-width: 19px;
  padding: 2px 6px;
}

.page-unread-badge[hidden],
.conversation-unread-badge[hidden] {
  display: none;
}

.page-rail-empty {
  color: #667085;
  display: grid;
  gap: 5px;
  padding: 18px 10px;
}

.page-rail-empty strong {
  color: #172033;
  font-size: 13px;
}

.page-rail-empty span {
  font-size: 12px;
  line-height: 1.45;
}

.conversation-browser {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.conversation-total {
  align-items: center;
  background: #edf2f7;
  border-radius: 999px;
  color: #4d5b70;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 25px;
  justify-content: center;
  min-width: 25px;
  padding: 0 7px;
}

.conversation-browser .conversation-search {
  align-items: center;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px 12px;
}

.conversation-browser .conversation-search svg {
  color: #7b8798;
  grid-column: 1;
  grid-row: 1;
  margin-left: 10px;
  pointer-events: none;
  z-index: 1;
}

.conversation-browser .conversation-search input[type="search"] {
  background: #f3f5f7;
  border-color: transparent;
  grid-column: 1 / -1;
  grid-row: 1;
  height: 38px;
  padding: 8px 10px 8px 36px;
}

.conversation-browser .conversation-search input[type="search"]:focus {
  background: #ffffff;
  border-color: #1877f2;
  outline: 2px solid rgba(24, 119, 242, 0.12);
}

.conversation-tabs {
  border-bottom: 1px solid #e5e9ef;
  display: flex;
  gap: 2px;
  min-height: 39px;
  overflow-x: auto;
  padding: 0 10px;
}

.conversation-tabs a {
  align-items: center;
  border-bottom: 2px solid transparent;
  color: #667085;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  padding: 0 8px;
  white-space: nowrap;
}

.conversation-tabs a:hover,
.conversation-tabs a.active {
  border-bottom-color: #1877f2;
  color: #1877f2;
}

.conversation-filter-row {
  align-items: center;
  border-bottom: 1px solid #e5e9ef;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 47px;
  padding: 7px 10px;
}

.conversation-filter-row form {
  min-width: 0;
}

.conversation-filter-row label {
  align-items: center;
  background: #edf2f7;
  border-radius: 6px;
  color: #4d5b70;
  display: flex;
  gap: 4px;
  padding-left: 7px;
}

.conversation-filter-row select {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  height: 32px;
  max-width: 125px;
  padding: 4px 22px 4px 2px;
}

.mark-all-read-button {
  align-items: center;
  background: transparent;
  color: #1877f2;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  gap: 5px;
  padding: 7px 5px;
}

.mark-all-read-button:hover {
  background: #eaf3ff;
}

.conversation-browser .conversation-scroll {
  scrollbar-gutter: stable;
}

.conversation-item {
  border-bottom: 1px solid #e7ebf0;
  min-height: 86px;
  position: relative;
}

.conversation-item:hover {
  background: #f6f8fa;
}

.conversation-item.active {
  background: #eaf3ff;
  box-shadow: inset 3px 0 #1877f2;
}

.conversation-item-main {
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 86px;
  padding: 11px 42px 10px 13px;
}

.customer-avatar {
  align-items: center;
  background: #dff4ef;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #cfd8e3;
  color: #087f72;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  overflow: hidden;
  width: 42px;
}

.conversation-item:nth-child(4n + 2) .customer-avatar {
  background: #fff0c9;
  color: #9a5b00;
}

.conversation-item:nth-child(4n + 3) .customer-avatar {
  background: #e9e6ff;
  color: #5b48b5;
}

.conversation-item:nth-child(4n + 4) .customer-avatar {
  background: #fde6ec;
  color: #a33355;
}

.customer-avatar.large {
  height: 43px;
  width: 43px;
}

.conversation-item-content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.conversation-item-title {
  align-items: baseline;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
}

.conversation-item-title strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item-title time {
  color: #8b95a5;
  flex: 0 0 auto;
  font-size: 9px;
}

.conversation-page-name {
  color: #1877f2;
  font-size: 10px;
  font-weight: 700;
}

.conversation-labels {
  display: flex;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
}

.conversation-labels:empty {
  display: none;
}

.conversation-labels i {
  background: color-mix(in srgb, var(--label-color) 18%, white);
  border: 1px solid color-mix(in srgb, var(--label-color) 40%, white);
  border-radius: 999px;
  color: #4c5360;
  flex: 0 0 auto;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  line-height: 18px;
  max-width: 100px;
  overflow: hidden;
  padding: 0 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-preview {
  color: #707b8c;
  display: block;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-preview b {
  color: #4c596c;
}

.conversation-item.unread .conversation-item-title strong,
.conversation-item.unread .conversation-preview {
  color: #172033;
  font-weight: 750;
}

.conversation-star {
  background: transparent;
  color: #98a2b1;
  height: 30px;
  padding: 6px;
  position: absolute;
  right: 7px;
  top: 7px;
  width: 30px;
}

.conversation-star svg {
  fill: transparent;
  height: 17px;
  width: 17px;
}

.conversation-star:hover,
.conversation-star.active {
  background: #fff6d7;
  color: #e5a100;
}

.conversation-star.active svg {
  fill: currentColor;
}

.conversation-unread-badge {
  bottom: 9px;
  position: absolute;
  right: 12px;
}

.conversation-list-empty {
  align-items: center;
  color: #7b8798;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 210px;
  padding: 28px 18px;
  text-align: center;
}

.conversation-list-empty svg {
  color: #9eb2c9;
  height: 30px;
  width: 30px;
}

.conversation-list-empty strong {
  color: #364153;
  font-size: 13px;
}

.conversation-list-empty span {
  font-size: 11px;
  line-height: 1.45;
}

.chat-customer {
  align-items: center;
  display: flex;
  gap: 11px;
  min-width: 0;
}

.chat-customer > div {
  min-width: 0;
}

.chat-customer h1,
.chat-customer p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-chat-panel {
  align-items: center;
  background: #f4f6f8;
  color: #667085;
  display: flex;
  flex-direction: column;
  gap: 9px;
  grid-column: span 2;
  justify-content: center;
  min-height: 0;
  padding: 32px;
  text-align: center;
}

.all-chats-layout .empty-chat-panel {
  grid-column: span 2;
}

.empty-chat-panel h1 {
  color: #172033;
  font-size: 21px;
  margin: 4px 0 0;
}

.empty-chat-panel p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  max-width: 420px;
}

.empty-chat-visual {
  align-items: center;
  background: #e5effb;
  border-radius: 50%;
  color: #1877f2;
  display: flex;
  height: 64px;
  justify-content: center;
  width: 64px;
}

.empty-chat-visual svg {
  height: 34px;
  width: 34px;
}

.inbox-layout.pages-horizontal {
  grid-template-columns: 340px minmax(360px, 1fr) 280px;
  grid-template-rows: 76px minmax(0, 1fr);
}

.inbox-layout.pages-horizontal .inbox-page-rail {
  border-bottom: 1px solid #dce2e9;
  border-right: 0;
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1;
  grid-template-columns: 190px minmax(0, 1fr);
}

.inbox-layout.pages-horizontal .page-rail-header {
  border-bottom: 0;
  border-right: 1px solid #e5e9ef;
  min-height: 0;
}

.inbox-layout.pages-horizontal .page-rail-list {
  align-items: center;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 10px;
}

.inbox-layout.pages-horizontal .page-rail-item {
  flex: 0 0 auto;
  grid-template-columns: 30px minmax(0, 135px) auto;
  min-height: 48px;
}

.inbox-layout.pages-horizontal .page-rail-avatar {
  height: 30px;
  width: 30px;
}

.inbox-layout.pages-horizontal .conversation-browser,
.inbox-layout.pages-horizontal .chat-panel,
.inbox-layout.pages-horizontal .label-panel,
.inbox-layout.pages-horizontal .empty-chat-panel {
  grid-row: 2;
}

html[data-theme="dark"] .suite-inbox-main .inbox-layout,
html[data-theme="dark"] .empty-chat-panel {
  background: #141617;
}

html[data-theme="dark"] :is(.inbox-page-rail, .conversation-browser) {
  background: #1d1f20;
  border-color: #35393c;
  color: #f0f2f4;
}

html[data-theme="dark"] :is(
  .page-rail-header,
  .conversation-browser-header,
  .conversation-tabs,
  .conversation-filter-row,
  .conversation-item,
  .inbox-layout.pages-horizontal .inbox-page-rail,
  .inbox-layout.pages-horizontal .page-rail-header
) {
  border-color: #35393c;
}

html[data-theme="dark"] .icon-button {
  border-color: #41474c;
  color: #aab2bc;
}

html[data-theme="dark"] :is(.icon-button:hover, .icon-button.active, .page-rail-item.active, .conversation-item.active) {
  background: #102b4c;
  border-color: #2367aa;
  color: #63aaff;
}

html[data-theme="dark"] :is(.page-rail-item:hover, .conversation-item:hover) {
  background: #26292b;
}

html[data-theme="dark"] .page-rail-avatar i {
  border-color: #1d1f20;
}

html[data-theme="dark"] :is(.page-rail-copy small, .conversation-item-title time, .conversation-preview, .conversation-list-empty) {
  color: #959eaa;
}

html[data-theme="dark"] :is(.page-rail-empty strong, .conversation-list-empty strong, .empty-chat-panel h1, .conversation-item.unread .conversation-item-title strong, .conversation-item.unread .conversation-preview) {
  color: #f0f2f4;
}

html[data-theme="dark"] .conversation-total,
html[data-theme="dark"] .conversation-filter-row label {
  background: #292d2f;
  color: #b5bdc7;
}

html[data-theme="dark"] .conversation-browser .conversation-search input[type="search"] {
  background: #282b2d;
  border-color: #35393c;
}

html[data-theme="dark"] .conversation-browser .conversation-search input[type="search"]:focus {
  background: #242728;
  border-color: #4a9cff;
}

html[data-theme="dark"] .conversation-labels i {
  background: color-mix(in srgb, var(--label-color) 28%, #1d1f20);
  border-color: color-mix(in srgb, var(--label-color) 55%, #1d1f20);
  color: #eef1f5;
}

html[data-theme="dark"] .customer-avatar {
  border-color: #1d1f20;
  box-shadow: 0 0 0 1px #4a5157;
}

html[data-theme="dark"] .empty-chat-visual {
  background: #102b4c;
  color: #63aaff;
}

@media (max-width: 1500px) {
  .suite-inbox-main .inbox-layout {
    grid-template-columns: 190px 310px minmax(330px, 1fr) 260px;
  }

  .suite-inbox-main .inbox-layout.all-chats-layout {
    grid-template-columns: 330px minmax(380px, 1fr) 270px;
  }
}

@media (max-width: 1320px) {
  .suite-inbox-main .inbox-layout {
    grid-template-columns: 190px 310px minmax(340px, 1fr);
  }

  .suite-inbox-main .inbox-layout.all-chats-layout {
    grid-template-columns: 330px minmax(420px, 1fr);
  }

  .suite-inbox-main .inbox-layout .label-panel {
    display: none;
  }

  .empty-chat-panel,
  .all-chats-layout .empty-chat-panel {
    grid-column: auto;
  }

  .inbox-layout.pages-horizontal {
    grid-template-columns: 320px minmax(380px, 1fr);
  }
}

@media (max-width: 900px) {
  .suite-inbox-main .inbox-layout,
  .suite-inbox-main .inbox-layout.all-chats-layout,
  .inbox-layout.pages-horizontal {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(560px, 1fr);
    min-height: calc(100svh - 62px);
  }

  .inbox-page-rail,
  .inbox-layout.pages-horizontal .inbox-page-rail {
    border-bottom: 1px solid #dce2e9;
    border-right: 0;
    display: grid;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: 110px minmax(0, 1fr);
    height: 66px;
  }

  .page-rail-header,
  .inbox-layout.pages-horizontal .page-rail-header {
    border-bottom: 0;
    border-right: 1px solid #e5e9ef;
    min-height: 0;
    padding: 8px;
  }

  .page-rail-header .inbox-kicker,
  .page-rail-header h2 {
    display: none;
  }

  .page-rail-list,
  .inbox-layout.pages-horizontal .page-rail-list {
    align-items: center;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 7px;
  }

  .page-rail-item,
  .inbox-layout.pages-horizontal .page-rail-item {
    flex: 0 0 auto;
    grid-template-columns: 30px minmax(0, 125px) auto;
    min-height: 48px;
  }

  .page-rail-avatar,
  .inbox-layout.pages-horizontal .page-rail-avatar {
    height: 30px;
    width: 30px;
  }

  .conversation-browser,
  .inbox-layout.pages-horizontal .conversation-browser {
    border-bottom: 1px solid #dce2e9;
    border-right: 0;
    grid-column: 1;
    grid-row: 2;
    max-height: 390px;
    min-height: 330px;
  }

  .all-chats-layout .conversation-browser {
    grid-row: 1;
  }

  .chat-panel,
  .inbox-layout.pages-horizontal .chat-panel {
    grid-column: 1;
    grid-row: 3;
  }

  .all-chats-layout .chat-panel {
    grid-row: 2;
  }

  .empty-chat-panel,
  .inbox-layout.pages-horizontal .empty-chat-panel {
    grid-column: 1;
    grid-row: 3;
    min-height: 440px;
  }

  .all-chats-layout .empty-chat-panel {
    grid-row: 2;
  }
}

/* Search, settings, and help */
.workspace-utility-page {
  margin: 0 auto;
  max-width: 1320px;
  padding: 28px 34px 56px;
}

.global-search-form {
  align-items: center;
  background: #fff;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  margin-bottom: 24px;
  padding: 10px 12px 10px 16px;
}

.global-search-form svg {
  fill: none;
  height: 22px;
  stroke: #718096;
  stroke-linecap: round;
  stroke-width: 2;
  width: 22px;
}

.global-search-form input {
  background: transparent;
  border: 0;
  font-size: 18px;
  min-width: 0;
  outline: 0;
  padding: 8px 0;
}

.search-result-grid,
.settings-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.utility-panel {
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  min-width: 0;
  padding: 22px;
}

.utility-panel > header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.utility-panel h2 {
  font-size: 20px;
  margin: 0 0 4px;
}

.utility-panel p {
  color: #69778a;
  margin: 0;
}

.utility-panel > header > span {
  background: #edf5ff;
  border-radius: 999px;
  color: #1877f2;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.search-result-list {
  display: grid;
}

.search-result-list > a {
  align-items: center;
  border-top: 1px solid #edf0f4;
  color: #172033;
  display: flex;
  gap: 12px;
  min-height: 64px;
  padding: 10px 4px;
}

.search-result-list > a:first-child {
  border-top: 0;
}

.search-result-list > a:hover {
  color: #1877f2;
}

.search-result-list > a > span:nth-last-child(2),
.search-result-list > a > strong:first-child {
  min-width: 0;
}

.search-result-list strong,
.search-result-list small {
  display: block;
}

.search-result-list small {
  color: #748195;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-list > a > span:last-child {
  color: #1877f2;
  font-size: 13px;
  font-weight: 800;
  margin-left: auto;
}

.utility-empty {
  padding: 18px 4px;
}

.search-welcome {
  min-height: 180px;
}

.settings-layout .profile-settings-panel {
  grid-column: 1 / -1;
}

.theme-choice {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-choice button {
  background: #f5f7fa;
  border: 1px solid #dce3eb;
  color: #172033;
  padding: 16px;
  text-align: left;
}

.theme-choice button.selected {
  background: #e7f3ff;
  border-color: #1877f2;
  box-shadow: inset 0 0 0 1px #1877f2;
}

.theme-choice span,
.theme-choice small {
  display: block;
}

.theme-choice small {
  color: #748195;
  font-weight: 500;
  margin-top: 4px;
}

.preference-row {
  align-items: center;
  border-top: 1px solid #edf0f4;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 0;
}

.preference-row:first-of-type {
  border-top: 0;
}

.preference-row strong,
.preference-row small {
  display: block;
}

.preference-row small {
  color: #748195;
  margin-top: 3px;
}

.preference-switch {
  background: #c7d0dc;
  border-radius: 999px;
  height: 28px;
  padding: 3px;
  transition: background 140ms ease;
  width: 50px;
}

.preference-switch span {
  background: #fff;
  border-radius: 50%;
  display: block;
  height: 22px;
  transition: transform 140ms ease;
  width: 22px;
}

.preference-switch.enabled {
  background: #1877f2;
}

.preference-switch.enabled span {
  transform: translateX(22px);
}

.secondary-action {
  background: #edf2f7;
  color: #25313d;
}

.settings-fields {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-fields label {
  font-size: 13px;
  font-weight: 800;
}

.settings-fields .wide {
  grid-column: 1 / -1;
}

.settings-fields input {
  margin-top: 7px;
  width: 100%;
}

.avatar-picker {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
  padding: 0;
}

.avatar-picker legend {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
  width: 100%;
}

.avatar-picker label {
  cursor: pointer;
  position: relative;
}

.avatar-picker input {
  opacity: 0;
  position: absolute;
}

.avatar-picker img {
  border: 3px solid transparent;
  border-radius: 50%;
  display: block;
  height: 58px;
  object-fit: cover;
  width: 58px;
}

.avatar-picker input:checked + img {
  border-color: #1877f2;
  box-shadow: 0 0 0 3px #d9eaff;
}

.avatar-picker label > span {
  display: none;
}

.suite-user-avatar img {
  border-radius: inherit;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.help-layout {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: 220px minmax(0, 1fr);
}

.help-index {
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  display: grid;
  padding: 10px;
  position: sticky;
  top: 18px;
}

.help-index a {
  border-radius: 6px;
  color: #344054;
  font-weight: 700;
  padding: 11px 12px;
}

.help-index a:hover {
  background: #e7f3ff;
  color: #1877f2;
}

.help-articles {
  display: grid;
  gap: 14px;
}

.help-articles .utility-panel {
  display: grid;
  gap: 16px;
  grid-template-columns: 34px minmax(0, 1fr);
  scroll-margin-top: 20px;
}

.help-articles .utility-panel > span {
  color: #1877f2;
  font-size: 12px;
  font-weight: 900;
}

html[data-theme="dark"] :is(.global-search-form, .utility-panel, .help-index) {
  background: var(--app-surface);
  border-color: var(--app-border);
}

html[data-theme="dark"] :is(.global-search-form input, .search-result-list > a, .theme-choice button) {
  color: var(--app-text);
}

html[data-theme="dark"] .search-result-list > a,
html[data-theme="dark"] .preference-row {
  border-color: var(--app-border-soft);
}

html[data-theme="dark"] .theme-choice button {
  background: var(--app-surface-raised);
  border-color: var(--app-border);
}

html[data-theme="dark"] .theme-choice button.selected {
  background: #102b4c;
  border-color: #3191ff;
}

html[data-theme="dark"] .secondary-action {
  background: var(--app-surface-raised);
  color: var(--app-text);
}

html[data-theme="dark"] .help-index a {
  color: var(--app-text);
}

@media (max-width: 850px) {
  .workspace-utility-page {
    padding: 18px 14px 40px;
  }

  .search-result-grid,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-index {
    position: static;
  }

  .theme-choice {
    grid-template-columns: 1fr;
  }
}

/* Privacy-safe customer identity, reply discovery, and compact customer tools */
.customer-avatar-wrap {
  display: block;
  height: 42px;
  position: relative;
  width: 42px;
}

.customer-avatar-wrap .customer-avatar {
  display: flex;
}

.customer-avatar-wrap .conversation-unread-badge {
  background: #1877f2;
  border: 2px solid #ffffff;
  bottom: auto;
  box-shadow: 0 2px 6px rgba(24, 119, 242, 0.35);
  min-height: 21px;
  min-width: 21px;
  padding: 0 5px;
  right: -7px;
  top: -7px;
}

.conversation-page-name {
  align-items: center;
  display: flex;
  gap: 5px;
  min-width: 0;
}

.conversation-page-icon {
  align-items: center;
  background: #e7f1ff;
  border: 1px solid #c8dcf7;
  border-radius: 50%;
  color: #1268d8;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 8px;
  font-weight: 850;
  height: 17px;
  justify-content: center;
  overflow: hidden;
  width: 17px;
}

.conversation-page-icon img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.composer-input-wrap {
  min-width: 0;
  position: relative;
}

.composer-input-wrap textarea {
  display: block;
}

.saved-reply-suggestions {
  background: #ffffff;
  border: 1px solid #d5dde7;
  border-radius: 8px;
  bottom: calc(100% + 8px);
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.18);
  left: 0;
  max-height: 280px;
  overflow-y: auto;
  position: absolute;
  right: 0;
  z-index: 24;
}

.saved-reply-suggestions[hidden] {
  display: none;
}

.saved-reply-suggestions-header {
  align-items: center;
  border-bottom: 1px solid #e7ebf0;
  color: #536174;
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  padding: 8px 11px;
}

.saved-reply-suggestions-header small {
  color: #8a95a5;
}

.saved-reply-suggestions > button,
.inspector-saved-replies > button {
  align-items: center;
  background: transparent;
  border-bottom: 1px solid #edf0f4;
  border-radius: 0;
  color: #172033;
  display: grid;
  gap: 9px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 9px 11px;
  text-align: left;
  width: 100%;
}

.saved-reply-suggestions > button:last-child,
.inspector-saved-replies > button:last-child {
  border-bottom: 0;
}

.saved-reply-suggestions > button:hover,
.inspector-saved-replies > button:hover {
  background: #edf5ff;
  color: #0e64d5;
}

.saved-reply-suggestions > button > span:last-child,
.inspector-saved-replies > button > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.saved-reply-suggestions strong,
.inspector-saved-replies strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-reply-suggestions small,
.inspector-saved-replies small {
  color: #707c8d;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-reply-suggestion-icon {
  align-items: center;
  background: #e8f2ff;
  border-radius: 6px;
  color: #1877f2;
  display: inline-flex;
  font-size: 14px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.quick-replies {
  flex-wrap: nowrap;
}

.quick-replies button {
  display: grid;
  flex: 0 0 min(230px, 70vw);
  gap: 2px;
  padding: 8px 10px;
  text-align: left;
}

.quick-replies button strong {
  font-size: 11px;
}

.quick-replies button span {
  color: #667085;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emoji-picker-popover {
  background: #ffffff;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  bottom: 84px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.22);
  height: min(390px, calc(100vh - 220px));
  left: 12px;
  overflow: hidden;
  position: absolute;
  width: min(350px, calc(100% - 24px));
  z-index: 25;
}

.inbox-emoji-picker {
  --background: #ffffff;
  --border-color: #dbe1ea;
  --button-active-background: #e6f1ff;
  --button-hover-background: #f0f6ff;
  --input-border-color: #cbd5e1;
  --input-font-color: #172033;
  --outline-color: #1877f2;
  --indicator-color: #1877f2;
  height: 100%;
  width: 100%;
}

.emoji-picker-loading,
.emoji-picker-error {
  align-items: center;
  color: #667085;
  display: flex;
  font-size: 12px;
  height: 100%;
  justify-content: center;
  margin: 0;
}

.label-panel {
  background: #ffffff;
}

.label-panel .inspector-header {
  background: #ffffff;
  min-height: 68px;
  padding: 12px 14px;
}

.label-panel .inspector-header h2 {
  font-size: 16px;
  letter-spacing: 0;
}

.label-panel .inspector-header p {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-panel .inspector-section {
  padding: 14px;
}

.label-panel .inspector-title-row {
  gap: 8px;
  margin-bottom: 10px;
}

.label-panel .inspector-title-row > div {
  min-width: 0;
}

.inspector-eyebrow {
  color: #1877f2;
  display: block;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.tool-count {
  align-items: center;
  background: #edf2f7;
  border-radius: 999px;
  color: #536174;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  justify-content: center;
  min-height: 23px;
  min-width: 23px;
  padding: 2px 7px;
}

.conversation-control-section .side-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.conversation-control-section .side-form > label {
  color: #5d6879;
  display: grid;
  font-size: 10px;
  font-weight: 750;
  gap: 4px;
}

.conversation-control-section .side-form > button,
.conversation-control-section .side-form > p {
  grid-column: 1 / -1;
}

.conversation-control-section .side-form select {
  height: 38px;
  padding: 7px 9px;
}

.internal-note {
  margin: 8px 0;
}

.tool-disclosure {
  border-top: 1px solid #e7ebf0;
  margin-top: 11px;
  padding-top: 10px;
}

.tool-disclosure summary {
  color: #1769d2;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  list-style: none;
  padding: 3px 0;
}

.tool-disclosure summary::-webkit-details-marker {
  display: none;
}

.tool-disclosure summary::before {
  content: "+";
  display: inline-block;
  font-size: 15px;
  margin-right: 6px;
  transition: transform 120ms ease;
}

.tool-disclosure[open] summary::before {
  transform: rotate(45deg);
}

.tool-disclosure .side-form {
  margin-top: 9px;
}

.tool-disclosure .compact-create-form {
  border-top: 0;
  padding-top: 0;
}

.inspector-saved-replies {
  border: 1px solid #e0e6ed;
  border-radius: 7px;
  display: grid;
  margin-top: 10px;
  max-height: 190px;
  overflow-y: auto;
}

html[data-theme="dark"] .customer-avatar-wrap .conversation-unread-badge {
  border-color: #1d1f20;
}

html[data-theme="dark"] .conversation-page-icon {
  background: #102b4c;
  border-color: #254d79;
  color: #72afff;
}

html[data-theme="dark"] .saved-reply-suggestions,
html[data-theme="dark"] .emoji-picker-popover,
html[data-theme="dark"] .label-panel,
html[data-theme="dark"] .label-panel .inspector-header {
  background: #1d1f20;
  border-color: #383d41;
}

html[data-theme="dark"] .saved-reply-suggestions-header,
html[data-theme="dark"] .saved-reply-suggestions > button,
html[data-theme="dark"] .inspector-saved-replies > button,
html[data-theme="dark"] .tool-disclosure,
html[data-theme="dark"] .inspector-saved-replies {
  border-color: #383d41;
}

html[data-theme="dark"] .saved-reply-suggestions > button,
html[data-theme="dark"] .inspector-saved-replies > button {
  color: #f0f2f4;
}

html[data-theme="dark"] :is(.saved-reply-suggestions > button:hover, .inspector-saved-replies > button:hover) {
  background: #102b4c;
  color: #72afff;
}

html[data-theme="dark"] .saved-reply-suggestion-icon {
  background: #102b4c;
  color: #72afff;
}

html[data-theme="dark"] .tool-count {
  background: #2b2f32;
  color: #c0c7d0;
}

html[data-theme="dark"] .inbox-emoji-picker {
  --background: #1d1f20;
  --border-color: #3b4145;
  --button-active-background: #16477e;
  --button-hover-background: #2b3034;
  --input-border-color: #4a5157;
  --input-font-color: #f0f2f4;
  --input-placeholder-color: #919aa5;
  --outline-color: #63aaff;
  --indicator-color: #63aaff;
}

@media (max-width: 680px) {
  .composer-tools small {
    display: none;
  }

  .emoji-picker-popover {
    height: min(360px, calc(100vh - 190px));
  }

  .conversation-control-section .side-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[data-theme] {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: #f5f7fb;
  color: #172033;
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  border-radius: 6px;
  background: #2457d6;
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 14px;
}

.suite-shell {
  background: #eef6fb;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  transition: grid-template-columns 160ms ease;
}

.suite-fixed-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.suite-fixed-shell .suite-sidebar {
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.suite-fixed-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.suite-scroll-region {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.suite-sidebar {
  background: #ffffff;
  border-right: 1px solid #dbe1ea;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  height: 100vh;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 8px 8px;
}

.suite-logo {
  align-items: center;
  display: flex;
  font-size: 20px;
  font-weight: 800;
  gap: 7px;
  line-height: 0.95;
  margin: 0 8px 18px;
}

.suite-brand-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: 0 8px 18px;
}

.suite-brand-row .suite-logo {
  margin: 0;
}

.suite-theme-toggle,
.standalone-theme-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid #dbe1ea;
  color: #526175;
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  padding: 0;
  transition-duration: 140ms;
  transition-property: background-color, border-color, color, transform;
  transition-timing-function: ease-out;
  width: 38px;
}

.suite-theme-toggle:hover,
.standalone-theme-toggle:hover {
  background: #edf5ff;
  border-color: #9bc9ff;
  color: #1877f2;
}

.suite-theme-toggle:active,
.standalone-theme-toggle:active {
  transform: scale(0.96);
}

.suite-theme-toggle svg,
.standalone-theme-toggle svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 19px;
}

.standalone-theme-toggle {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
  position: fixed;
  right: 20px;
  top: 18px;
  z-index: 60;
}

body:has(.suite-shell) .standalone-theme-toggle {
  display: none;
}

.crm-logo-icon {
  color: #1877f2;
  flex: 0 0 auto;
  height: 20px;
  width: 34px;
}

.suite-page-switcher {
  position: relative;
  margin: 0 0 16px;
}

.suite-page-switcher label {
  align-items: center;
  border: 1px solid #d6dee8;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  padding: 7px 8px;
}

.suite-page-avatar,
.profile-avatar {
  align-items: center;
  background: #e8f7f4;
  border-radius: 999px;
  color: #087b6e;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
}

.suite-page-avatar {
  height: 34px;
  position: relative;
  overflow: visible;
  width: 34px;
}

.platform-badge {
  align-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  bottom: -3px;
  color: #ffffff;
  display: flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  height: 16px;
  justify-content: center;
  position: absolute;
  right: -4px;
  width: 16px;
}

.platform-badge.facebook {
  background: #1877f2;
}

.suite-page-avatar img,
.profile-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.suite-page-avatar img {
  border-radius: 999px;
}

.suite-page-name {
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-switch-button {
  align-items: center;
  background: transparent;
  color: #172033;
  display: flex;
  height: 28px;
  justify-content: center;
  padding: 0;
  width: 28px;
}

.page-switch-button span {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  display: block;
  height: 9px;
  transform: rotate(45deg) translate(-2px, -2px);
  width: 9px;
}

.page-menu {
  background: #ffffff;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
  display: grid;
  gap: 4px;
  left: 0;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
}

.page-menu[hidden] {
  display: none;
}

.page-menu button,
.page-menu a,
.page-menu-empty {
  align-items: center;
  background: transparent;
  border-radius: 6px;
  color: #172033;
  display: flex;
  font: inherit;
  font-weight: 700;
  min-height: 34px;
  padding: 0 10px;
}

.page-menu button {
  display: grid;
  gap: 9px;
  grid-template-columns: 30px minmax(0, 1fr);
  text-align: left;
}

.page-menu-avatar {
  height: 30px;
  width: 30px;
}

.page-menu-avatar .platform-badge {
  bottom: -4px;
  height: 14px;
  right: -5px;
  width: 14px;
}

.page-menu-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-menu-empty {
  color: #647084;
  font-weight: 650;
}

.page-menu button.selected,
.page-menu button:hover,
.page-menu a:hover {
  background: #e7f3ff;
}

.suite-nav {
  display: grid;
  gap: 6px;
}

.suite-nav-section {
  border-top: 1px solid #edf0f4;
  color: #8b98a7;
  font-size: 12px;
  font-weight: 700;
  margin: 8px 8px 2px;
  padding-top: 12px;
  text-transform: uppercase;
}

.suite-nav a,
.suite-sidebar-bottom a {
  align-items: center;
  border-radius: 6px;
  color: #25313d;
  display: flex;
  font-size: 15px;
  font-weight: 700;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  position: relative;
}

.suite-nav a.active {
  background: #27343f;
  color: #ffffff;
}

.suite-nav svg,
.suite-sidebar-bottom svg {
  color: inherit;
  fill: none;
  flex: 0 0 auto;
  height: 21px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 21px;
}

.suite-nav a.active svg {
  fill: currentColor;
  stroke: currentColor;
}

.nav-dot {
  background: #b00020;
  border-radius: 999px;
  height: 5px;
  margin-left: auto;
  width: 5px;
}

.nav-count {
  align-items: center;
  background: #d92d20;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  height: 20px;
  justify-content: center;
  margin-left: auto;
  min-width: 20px;
  padding: 0 6px;
}

.nav-count[hidden] {
  display: none;
}

.suite-sidebar-bottom {
  align-self: end;
  border-top: 1px solid #edf0f4;
  display: grid;
  gap: 6px;
  padding-top: 10px;
}

.suite-sidebar-bottom a:last-child {
  background: #f0f2f5;
}

.suite-sidebar-bottom kbd {
  background: #eef2f7;
  border-radius: 4px;
  color: #7a8795;
  font-size: 12px;
  margin-left: auto;
  padding: 2px 6px;
}

.suite-main {
  background: #f4f7fb;
  height: 100vh;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.suite-topbar {
  align-items: flex-start;
  background: #ffffff;
  border-bottom: 1px solid #e4e9f0;
  display: flex;
  justify-content: space-between;
  padding: 24px 34px 18px;
}

.suite-topbar h1 {
  font-size: 28px;
  letter-spacing: 0;
  margin: 4px 0 6px;
  text-wrap: balance;
}

.suite-subtitle {
  color: #647084;
  font-size: 14px;
  margin: 0;
}

.dashboard-topbar {
  align-items: center;
  padding-bottom: 20px;
}

.dashboard-eyebrow {
  color: #1877f2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.suite-tabs {
  display: flex;
  gap: 12px;
}

.suite-tabs a {
  border-radius: 6px;
  color: #172033;
  font-weight: 650;
  padding: 12px 16px;
}

.suite-tabs a.selected {
  background: #e7f3ff;
  color: #0876d8;
}

.suite-user {
  align-items: center;
  display: flex;
  gap: 10px;
}

.suite-user-avatar {
  align-items: center;
  background: #e8f7f4;
  border: 1px solid #d6dee8;
  border-radius: 999px;
  display: flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.suite-user button {
  background: #edf2f7;
  color: #172033;
  padding: 8px 10px;
}

.profile-overview {
  margin: 0 auto;
  max-width: 1140px;
  padding: 24px 28px 44px;
  width: 100%;
}

.dashboard-page,
.admin-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 34px 48px;
  width: 100%;
}

.admin-page {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
}

.dashboard-metrics {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.dashboard-metrics article,
.dashboard-metrics a {
  align-items: flex-start;
  border-top: 3px solid #dbe6f4;
  background: #ffffff;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  display: flex;
  gap: 13px;
  min-height: 126px;
  padding: 17px 16px;
  transition-property: transform, box-shadow, border-color;
  transition-duration: 160ms;
  transition-timing-function: ease-out;
}

.dashboard-metrics a {
  color: inherit;
  text-decoration: none;
}

.dashboard-metrics article:hover,
.dashboard-metrics a:hover {
  border-color: #c6d5e6;
  box-shadow: 0 8px 20px rgba(26, 50, 80, 0.08);
  transform: translateY(-2px);
}

.metric-icon {
  align-items: center;
  background: #edf5ff;
  border-radius: 9px;
  color: #1877f2;
  display: flex;
  flex: 0 0 auto;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.metric-icon svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 20px;
}

.metric-users .metric-icon { background: #eef9f2; color: #16834b; }
.metric-chats .metric-icon { background: #fff5e8; color: #c26a11; }
.metric-issues .metric-icon { background: #eef1f5; color: #69778a; }
.metric-issues.has-issues { border-top-color: #d64545; }
.metric-issues.has-issues .metric-icon { background: #fff0f0; color: #c63636; }

.dashboard-metrics article > div:last-child,
.dashboard-metrics a > div:last-child {
  display: grid;
  gap: 4px;
}

.dashboard-metrics span {
  color: #647084;
  font-size: 13px;
  font-weight: 650;
}

.dashboard-metrics strong {
  font-size: 32px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  line-height: 1;
}

.dashboard-metrics small {
  color: #7c8998;
  font-size: 12px;
  line-height: 1.35;
  text-wrap: pretty;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.dashboard-panel {
  background: #ffffff;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  padding: 20px;
}

.panel-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-heading h2,
.dashboard-panel h2 {
  font-size: 20px;
  letter-spacing: 0;
  margin: 0 0 5px;
  text-wrap: balance;
}

.panel-heading p {
  color: #647084;
  margin: 0;
  text-wrap: pretty;
}

.panel-actions {
  display: flex;
  gap: 10px;
}

.page-table,
.recent-list,
.user-list {
  display: grid;
  gap: 10px;
}

.page-row,
.user-row {
  align-items: center;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 38px minmax(0, 1fr) repeat(3, minmax(78px, auto));
  min-height: 64px;
  padding: 10px 12px;
}

.compact-table .page-row,
.user-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.page-row.selected {
  background: #e7f3ff;
  border-color: #9bc9ff;
}

.page-row span,
.user-row span {
  min-width: 0;
}

.page-row strong,
.user-row strong {
  display: block;
}

.page-row small,
.user-row small {
  color: #647084;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.user-row-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.user-row-actions form {
  margin: 0;
}

.quiet-danger-button {
  background: #fff0f0;
  color: #b42318;
  min-height: 38px;
}

.edit-user-page {
  display: block;
  margin: 0 auto;
  max-width: 920px;
}

.back-link {
  color: #526175;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.edit-user-summary {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  margin-bottom: 18px;
}

.suite-user-avatar.large {
  font-size: 20px;
  height: 52px;
  width: 52px;
}

.edit-user-summary strong,
.edit-user-summary small {
  display: block;
}

.edit-user-summary small {
  color: #647084;
  margin-top: 3px;
}

.status-pill {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.status-pill.active {
  background: #e7f8ef;
  color: #087443;
}

.status-pill.inactive {
  background: #eef1f5;
  color: #526175;
}

.edit-user-form {
  padding: 24px;
}

.form-section-heading {
  margin-bottom: 18px;
}

.form-section-heading h2 {
  margin-bottom: 4px;
}

.form-section-heading p {
  color: #647084;
  margin: 0;
}

.password-heading {
  border-top: 1px solid #e1e7ef;
  margin-top: 24px;
  padding-top: 24px;
}

.edit-user-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.edit-user-grid label:not(.access-toggle) {
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

.access-toggle {
  align-items: center;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
}

.access-toggle input {
  height: 18px;
  margin: 0;
  width: 18px;
}

.access-toggle strong,
.access-toggle small {
  display: block;
}

.access-toggle small {
  color: #647084;
  font-size: 11px;
  margin-top: 2px;
}

.errorlist {
  color: #b42318;
  font-size: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.form-footer-actions {
  align-items: center;
  border-top: 1px solid #e1e7ef;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
}

.form-footer-actions a,
.form-footer-actions button {
  min-width: 140px;
}

.assignment-workspace {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 34px 48px;
}

.agent-directory,
.page-access-panel {
  align-self: start;
}

.agent-search,
.assignment-search-wrap input,
.page-access-tools input {
  width: 100%;
}

.agent-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  max-height: 620px;
  overflow-y: auto;
}

.agent-row {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #172033;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  padding: 9px;
}

[data-agent-item][hidden],
[data-assignment-item][hidden] {
  display: none;
}

.agent-row:hover {
  background: #f5f8fb;
}

.agent-row.selected {
  background: #e7f3ff;
  border-color: #9bc9ff;
}

.agent-row strong,
.agent-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-row small {
  color: #647084;
  font-size: 11px;
  margin-top: 2px;
}

.agent-page-count {
  align-items: center;
  background: #edf2f7;
  border-radius: 999px;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  min-width: 26px;
  padding: 0 8px;
}

.access-panel-header {
  align-items: center;
  border-bottom: 1px solid #e1e7ef;
  display: grid;
  gap: 12px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  margin-bottom: 18px;
  padding-bottom: 18px;
}

.access-panel-header h2,
.access-panel-header p {
  margin: 0;
}

.access-panel-header p {
  color: #647084;
  margin-top: 3px;
}

.selection-count {
  background: #e7f3ff;
  border-radius: 999px;
  color: #0967b2;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  white-space: nowrap;
}

.page-access-tools {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  margin-bottom: 14px;
}

.secondary-button.compact {
  min-height: 40px;
  padding: 0 14px;
}

.assignment-page-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assignment-page-option {
  align-items: center;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 38px minmax(0, 1fr);
  min-height: 66px;
  padding: 10px;
}

.assignment-page-option:has(input:checked) {
  background: #edf6ff;
  border-color: #7ebbf2;
}

.assignment-page-option input {
  height: 17px;
  margin: 0;
  width: 17px;
}

.assignment-page-option strong,
.assignment-page-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-page-option small {
  color: #647084;
  font-size: 11px;
  margin-top: 3px;
}

.page-access-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.assignment-search-wrap {
  margin-bottom: 14px;
}

.page-access-footer {
  align-items: center;
  border-top: 1px solid #e1e7ef;
  color: #647084;
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 18px;
}

.empty-access-state {
  padding: 44px 20px;
  text-align: center;
}

.empty-access-state p {
  color: #647084;
}

.inline-empty {
  border: 1px dashed #cfd8e3;
  border-radius: 8px;
  color: #647084;
  padding: 18px;
}

.inline-empty h3 {
  color: #172033;
  margin: 0 0 6px;
}

.selected-page-panel {
  margin-top: 18px;
}

.selected-page-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
}

.mini-cover {
  align-items: center;
  background: #0d696d;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  font-size: 30px;
  font-weight: 800;
  justify-content: center;
  min-height: 190px;
  overflow: hidden;
}

.mini-cover img {
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.selected-page-details dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.selected-page-details dl div {
  border-bottom: 1px solid #edf0f4;
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
}

.selected-page-details dt {
  color: #647084;
}

.selected-page-details dd {
  font-weight: 750;
  margin: 0;
  text-align: right;
}

.assigned-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.assigned-chips span {
  background: #eef6fb;
  border: 1px solid #d6dee8;
  border-radius: 999px;
  font-weight: 700;
  padding: 7px 10px;
}

.muted-copy {
  color: #647084;
}

.admin-form-panel {
  align-self: start;
}

.main-dashboard-page {
  max-width: 1380px;
}

.main-dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  margin-bottom: 18px;
}

.workspace-command-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

.workspace-command-panel,
.workspace-health-panel {
  overflow: hidden;
  padding: 0;
}

.workspace-panel-heading,
.workspace-health-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 22px 22px 17px;
}

.workspace-panel-kicker {
  color: #1877f2;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.workspace-panel-heading h2,
.workspace-health-heading h2 {
  font-size: 21px;
  letter-spacing: 0;
  margin: 0;
  text-wrap: balance;
}

.workspace-panel-heading p {
  color: #647084;
  font-size: 13px;
  margin: 5px 0 0;
  text-wrap: pretty;
}

.workspace-primary-action {
  align-items: center;
  background: #1877f2;
  color: #ffffff;
  display: grid;
  gap: 14px;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  margin: 0 22px 8px;
  min-height: 82px;
  padding: 16px 18px;
  transition-duration: 160ms;
  transition-property: background-color, box-shadow, transform;
  transition-timing-function: ease-out;
}

.workspace-primary-action:hover {
  background: #116fe4;
  box-shadow: 0 10px 24px rgba(24, 119, 242, 0.2);
  transform: translateY(-1px);
}

.workspace-primary-action:active {
  transform: scale(0.99);
}

.workspace-primary-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.workspace-primary-action strong,
.workspace-primary-action small {
  display: block;
}

.workspace-primary-action strong {
  font-size: 16px;
  margin-bottom: 3px;
}

.workspace-primary-action small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.4;
}

.workspace-primary-icon svg,
.workspace-action-arrow,
.workspace-list-icon svg,
.workspace-list-arrow,
.health-check-icon svg,
.workspace-health-footer svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace-primary-icon svg {
  height: 22px;
  width: 22px;
}

.workspace-action-arrow,
.workspace-list-arrow,
.workspace-health-footer svg {
  height: 18px;
  width: 18px;
}

.workspace-action-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 5px 22px 10px;
}

.workspace-action-list > a {
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  display: grid;
  gap: 11px;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  min-height: 72px;
  padding: 11px 10px;
  transition-duration: 140ms;
  transition-property: background-color, color;
  transition-timing-function: ease-out;
}

.workspace-action-list > a:nth-child(odd) {
  border-right: 1px solid #edf0f4;
  padding-left: 0;
  padding-right: 16px;
}

.workspace-action-list > a:nth-child(even) {
  padding-left: 16px;
  padding-right: 0;
}

.workspace-action-list > a:hover {
  background: #f7faff;
}

.workspace-list-icon {
  align-items: center;
  background: #edf5ff;
  color: #1877f2;
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.workspace-list-icon svg {
  height: 18px;
  width: 18px;
}

.workspace-action-list strong,
.workspace-action-list small {
  display: block;
}

.workspace-action-list strong {
  font-size: 13px;
  margin-bottom: 3px;
}

.workspace-action-list small {
  color: #7c8998;
  font-size: 11px;
  line-height: 1.35;
  text-wrap: pretty;
}

.workspace-list-arrow {
  color: #8492a3;
  justify-self: end;
}

.workspace-pulse {
  background: #f8fafc;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 6px;
}

.workspace-pulse > div {
  border-right: 1px solid #e1e7ef;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 15px 20px;
}

.workspace-pulse > div:last-child {
  border-right: 0;
}

.workspace-pulse span {
  color: #7c8998;
  font-size: 11px;
  font-weight: 700;
}

.workspace-pulse strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.workspace-pulse strong small {
  color: #8a96a5;
  font-size: 12px;
  margin-left: 2px;
}

.workspace-health-heading {
  border-bottom: 1px solid #edf0f4;
}

.workspace-health-state {
  align-items: center;
  background: #eef9f2;
  color: #16834b;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  gap: 7px;
  padding: 6px 9px;
}

.workspace-health-state > span {
  background: currentColor;
  border-radius: 999px;
  height: 6px;
  width: 6px;
}

.workspace-health-state.needs-attention {
  background: #fff0f0;
  color: #c63636;
}

.workspace-health-list {
  padding: 0 22px;
}

.workspace-health-list > a {
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  display: grid;
  gap: 12px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  min-height: 78px;
  transition-duration: 140ms;
  transition-property: background-color;
  transition-timing-function: ease-out;
}

.workspace-health-list > a:hover {
  background: #f8fafc;
}

.health-check-icon {
  align-items: center;
  background: #ecf8f1;
  color: #17804b;
  display: flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.health-check-icon.has-problem {
  background: #fff0f0;
  color: #c63636;
}

.health-check-icon svg {
  height: 19px;
  width: 19px;
}

.workspace-health-list strong,
.workspace-health-list small {
  display: block;
}

.workspace-health-list strong {
  font-size: 13px;
  margin-bottom: 4px;
}

.workspace-health-list small {
  color: #7c8998;
  font-size: 11px;
  line-height: 1.35;
  text-wrap: pretty;
}

.workspace-health-list b {
  align-items: center;
  background: #eef9f2;
  color: #16834b;
  display: inline-flex;
  font-size: 12px;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 8px;
}

.workspace-health-list b.has-problem {
  background: #fff0f0;
  color: #c63636;
}

.workspace-health-footer {
  align-items: center;
  color: #1877f2;
  display: flex;
  font-size: 12px;
  font-weight: 750;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 22px;
}

.workspace-health-footer:hover {
  background: #f7faff;
}

.issue-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.issue-list div {
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
}

.issue-list dt {
  color: #647084;
}

.issue-list dd {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.issue-list dt {
  display: grid;
  gap: 3px;
}

.issue-list dt small {
  color: #7c8998;
  font-size: 12px;
  font-weight: 500;
}

.issue-list dd a {
  color: #1877f2;
  font-size: 13px;
}

.visually-hidden {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.main-dashboard-shell {
  --dashboard-bg: #f3f6fa;
  --dashboard-surface: #ffffff;
  --dashboard-surface-muted: #f7f9fc;
  --dashboard-border: #dfe6ee;
  --dashboard-border-soft: #e9edf2;
  --dashboard-text: #172033;
  --dashboard-muted: #6c788a;
  --dashboard-blue: #1877f2;
  --dashboard-green: #168c55;
  background: var(--dashboard-bg);
  color: var(--dashboard-text);
}

.main-dashboard-shell .suite-main {
  background: var(--dashboard-bg);
  color: var(--dashboard-text);
}

.main-dashboard-shell .suite-sidebar,
.main-dashboard-shell .suite-topbar {
  background: var(--dashboard-surface);
  border-color: var(--dashboard-border);
  color: var(--dashboard-text);
}

.main-dashboard-shell .suite-subtitle,
.main-dashboard-shell .panel-heading p,
.main-dashboard-shell .dashboard-metrics span,
.main-dashboard-shell .dashboard-metrics small,
.main-dashboard-shell .issue-list dt {
  color: var(--dashboard-muted);
}

.main-dashboard-shell .dashboard-metrics a,
.main-dashboard-shell .dashboard-panel {
  background: var(--dashboard-surface);
  border-color: var(--dashboard-border);
}

.dashboard-theme-toggle,
.sync-auto-toggle,
.sync-refresh-button,
.sync-retry-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--dashboard-border);
  color: var(--dashboard-muted);
  display: inline-flex;
  justify-content: center;
}

.main-dashboard-shell .suite-user .dashboard-theme-toggle {
  background: var(--dashboard-surface-muted);
  color: var(--dashboard-text);
  height: 36px;
  padding: 0;
  width: 36px;
}

.dashboard-theme-toggle svg,
.sync-auto-toggle svg,
.sync-refresh-button svg,
.sync-retry-button svg,
.sync-empty-icon svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.dashboard-section {
  margin-bottom: 22px;
}

.dashboard-section-label {
  align-items: center;
  color: var(--dashboard-muted);
  display: flex;
  font-size: 11px;
  font-weight: 800;
  gap: 12px;
  letter-spacing: 1.6px;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.dashboard-section-label::after {
  background: var(--dashboard-border);
  content: "";
  height: 1px;
  width: 100%;
}

.dashboard-workspace-label {
  margin-top: 4px;
}

.sync-monitor-panel {
  background: var(--dashboard-surface);
  border: 1px solid var(--dashboard-border);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(24, 39, 58, 0.05);
  overflow: hidden;
}

.sync-monitor-header {
  align-items: center;
  border-bottom: 1px solid var(--dashboard-border-soft);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px 18px;
}

.sync-monitor-title {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.sync-monitor-title h2 {
  font-size: 17px;
  letter-spacing: 0;
  margin: 0 0 3px;
}

.sync-monitor-title p {
  color: var(--dashboard-muted);
  font-size: 13px;
  margin: 0;
}

.sync-live-dot {
  background: #18b77a;
  border: 8px solid color-mix(in srgb, #18b77a 14%, transparent);
  border-radius: 999px;
  box-sizing: content-box;
  flex: 0 0 auto;
  height: 8px;
  margin-top: 2px;
  width: 8px;
}

.sync-monitor-controls {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.sync-monitor-controls time {
  color: var(--dashboard-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}

.sync-auto-toggle {
  gap: 5px;
  min-height: 36px;
  padding: 7px 10px;
}

.sync-auto-toggle.is-active {
  color: var(--dashboard-green);
}

.sync-refresh-button,
.sync-retry-button {
  height: 36px;
  padding: 0;
  width: 36px;
}

.sync-refresh-button {
  color: var(--dashboard-blue);
}

.sync-retry-button:hover,
.sync-refresh-button:hover,
.dashboard-theme-toggle:hover {
  background: color-mix(in srgb, var(--dashboard-blue) 10%, var(--dashboard-surface));
  border-color: var(--dashboard-blue);
}

.sync-table-wrap {
  overflow-x: auto;
}

.sync-job-table {
  border-collapse: collapse;
  min-width: 900px;
  table-layout: fixed;
  width: 100%;
}

.sync-job-table th {
  background: var(--dashboard-surface-muted);
  color: var(--dashboard-muted);
  font-size: 11px;
  letter-spacing: 0.7px;
  padding: 11px 16px;
  text-align: left;
  text-transform: uppercase;
}

.sync-job-table th:nth-child(1) { width: 25%; }
.sync-job-table th:nth-child(2) { width: 14%; }
.sync-job-table th:nth-child(3) { width: 14%; }
.sync-job-table th:nth-child(4) { width: 21%; }
.sync-job-table th:nth-child(5) { width: 21%; }
.sync-job-table th:nth-child(6) { width: 5%; }

.sync-job-table td {
  border-top: 1px solid var(--dashboard-border-soft);
  color: var(--dashboard-text);
  font-size: 13px;
  padding: 13px 16px;
  vertical-align: middle;
}

.sync-job-table tbody tr:first-child td {
  border-top: 0;
}

.sync-job-table tbody tr:hover {
  background: color-mix(in srgb, var(--dashboard-blue) 4%, var(--dashboard-surface));
}

.sync-page-name {
  display: block;
  font-weight: 750;
  margin-bottom: 2px;
}

.sync-job-table td small,
.sync-details,
.sync-actions {
  color: var(--dashboard-muted);
}

.sync-count,
.sync-job-table time {
  font-variant-numeric: tabular-nums;
}

.sync-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  padding: 4px 9px;
}

.sync-status-completed {
  background: #dcf8e8;
  color: #117743;
}

.sync-status-running {
  background: #e6f0ff;
  color: #1259b5;
}

.sync-status-queued {
  background: #fff2d7;
  color: #8c5a00;
}

.sync-status-failed {
  background: #fee7e5;
  color: #b42318;
}

.sync-actions {
  text-align: right;
}

.sync-actions form {
  display: inline-flex;
}

.sync-monitor-empty {
  align-items: center;
  color: var(--dashboard-muted);
  display: flex;
  gap: 14px;
  min-height: 116px;
  padding: 22px;
}

.sync-monitor-empty strong {
  color: var(--dashboard-text);
  display: block;
  margin-bottom: 4px;
}

.sync-monitor-empty p {
  margin: 0;
}

.sync-empty-icon {
  align-items: center;
  background: var(--dashboard-surface-muted);
  border: 1px solid var(--dashboard-border);
  border-radius: 8px;
  color: var(--dashboard-blue);
  display: flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  width: 40px;
}

html[data-theme="dark"] .main-dashboard-shell {
  --dashboard-bg: #141617;
  --dashboard-surface: #1d1f20;
  --dashboard-surface-muted: #242728;
  --dashboard-border: #35393c;
  --dashboard-border-soft: #2b2e30;
  --dashboard-text: #f0f2f4;
  --dashboard-muted: #9aa2ad;
  --dashboard-blue: #4a9cff;
  --dashboard-green: #27c586;
}

html[data-theme="dark"] .main-dashboard-shell .suite-logo,
html[data-theme="dark"] .main-dashboard-shell .suite-nav a,
html[data-theme="dark"] .main-dashboard-shell .suite-sidebar-bottom a {
  color: var(--dashboard-text);
}

html[data-theme="dark"] .main-dashboard-shell .suite-nav a.active {
  background: #303538;
}

html[data-theme="dark"] .main-dashboard-shell .suite-nav-section,
html[data-theme="dark"] .main-dashboard-shell .suite-sidebar-bottom {
  border-color: var(--dashboard-border);
}

html[data-theme="dark"] .main-dashboard-shell .suite-sidebar-bottom a:last-child,
html[data-theme="dark"] .main-dashboard-shell .suite-user button:not(.dashboard-theme-toggle) {
  background: var(--dashboard-surface-muted);
  color: var(--dashboard-text);
}

html[data-theme="dark"] .main-dashboard-shell .suite-user-avatar {
  background: #253d38;
  border-color: #36564f;
  color: #8ce0c4;
}

html[data-theme="dark"] .main-dashboard-shell .dashboard-metrics a:hover {
  background: #25292b;
  border-color: #52606d;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .workspace-panel-heading p,
html[data-theme="dark"] .workspace-action-list small,
html[data-theme="dark"] .workspace-health-list small,
html[data-theme="dark"] .workspace-pulse span {
  color: var(--dashboard-muted);
}

html[data-theme="dark"] .workspace-action-list > a,
html[data-theme="dark"] .workspace-action-list > a:nth-child(odd),
html[data-theme="dark"] .workspace-health-heading,
html[data-theme="dark"] .workspace-health-list > a {
  border-color: var(--dashboard-border-soft);
}

html[data-theme="dark"] .workspace-action-list > a:hover,
html[data-theme="dark"] .workspace-health-list > a:hover,
html[data-theme="dark"] .workspace-health-footer:hover {
  background: #25292b;
}

html[data-theme="dark"] .workspace-list-icon {
  background: #20364e;
  color: #82bcff;
}

html[data-theme="dark"] .workspace-pulse {
  background: var(--dashboard-surface-muted);
}

html[data-theme="dark"] .workspace-pulse > div {
  border-color: var(--dashboard-border);
}

html[data-theme="dark"] .workspace-health-state {
  background: #143e29;
  color: #79dda4;
}

html[data-theme="dark"] .workspace-health-state.needs-attention,
html[data-theme="dark"] .workspace-health-list b.has-problem,
html[data-theme="dark"] .health-check-icon.has-problem {
  background: #4a2423;
  color: #ffaaa4;
}

html[data-theme="dark"] .workspace-health-list b,
html[data-theme="dark"] .health-check-icon {
  background: #143e29;
  color: #79dda4;
}

html[data-theme="dark"] .sync-status-completed {
  background: #143e29;
  color: #79dda4;
}

html[data-theme="dark"] .sync-status-running {
  background: #193756;
  color: #8dc2ff;
}

html[data-theme="dark"] .sync-status-queued {
  background: #4b3918;
  color: #f4c96b;
}

html[data-theme="dark"] .sync-status-failed {
  background: #4a2423;
  color: #ffaaa4;
}

.issue-page-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.issue-detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cover-card {
  background: #1d2939;
  border-radius: 8px;
  aspect-ratio: 4 / 1;
  max-height: 285px;
  min-height: 180px;
  overflow: hidden;
}

.cover-image {
  background: #102b35;
  display: block;
  height: 100%;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.cover-fallback {
  align-items: center;
  color: #d0d5dd;
  display: grid;
  height: 100%;
  justify-items: center;
  text-align: center;
}

.cover-fallback span {
  font-size: 14px;
  font-weight: 700;
}

.pages-directory-page {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

.page-home-overview {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

.directory-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.directory-summary div {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-height: 62px;
  padding: 12px 16px;
}

.directory-summary strong {
  color: #172033;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.directory-summary span {
  color: #667085;
  font-size: 13px;
  font-weight: 650;
}

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

.directory-toolbar .suite-primary-action {
  gap: 6px;
}

.page-search {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 9px;
  display: flex;
  gap: 9px;
  max-width: 620px;
  padding: 5px 6px 5px 12px;
  width: 100%;
}

.page-search svg {
  color: #7c8998;
  fill: none;
  flex: 0 0 auto;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.page-search input {
  border: 0;
  min-width: 0;
  outline: 0;
  padding: 8px 2px;
}

.page-search button {
  flex: 0 0 auto;
  padding: 9px 13px;
}

.page-directory-list {
  display: grid;
  gap: 14px;
}

.page-directory-card {
  background: #ffffff;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  display: grid;
  align-items: center;
  gap: 16px;
  grid-template-columns: minmax(250px, 1.25fr) minmax(190px, 0.75fr) minmax(130px, 0.55fr) auto;
  padding: 15px 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.page-directory-card:hover {
  border-color: #c7d4e4;
  box-shadow: 0 6px 16px rgba(31, 50, 75, 0.06);
}

.page-directory-identity {
  align-items: center;
  display: flex;
  gap: 13px;
  min-width: 0;
}

.page-directory-identity > .suite-page-avatar {
  flex: 0 0 auto;
  height: 48px;
  width: 48px;
}

.page-directory-identity small {
  color: #667085;
  display: inline-block;
  font-size: 11px;
  margin-left: 8px;
}

.page-directory-identity h2 {
  font-size: 18px;
  margin: 0 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-directory-identity p {
  color: #7c8998;
  font-size: 12px;
  margin: 0 0 7px;
}

.connection-state {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.connection-state.connected { background: #e7f7ef; color: #147543; }
.connection-state.attention { background: #fff4df; color: #9a5a0a; }
.connection-state.inactive { background: #f0f2f5; color: #69778a; }

.page-directory-stats {
  align-items: center;
  display: flex;
  gap: 0;
  justify-content: space-between;
}

.page-directory-stats div {
  display: grid;
  gap: 3px;
  min-width: 58px;
}

.page-directory-stats strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.page-directory-stats span {
  color: #7c8998;
  font-size: 12px;
}

.page-connection-detail {
  display: grid;
  gap: 2px;
}

.page-connection-detail > span,
.page-connection-detail small {
  color: #7c8998;
  font-size: 11px;
}

.page-connection-detail strong {
  font-size: 14px;
}

.page-connection-detail .suite-error {
  margin: 0;
}

.page-directory-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.page-directory-actions form {
  margin: 0;
}

.page-directory-actions button,
.page-directory-actions a {
  min-height: 38px;
  white-space: nowrap;
}

.label-import {
  border-top: 1px solid #edf0f4;
  grid-column: 1 / -1;
  padding-top: 10px;
}

.label-import summary {
  color: #1877f2;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.label-import form {
  align-items: end;
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.label-import form div {
  display: grid;
  gap: 5px;
  max-width: 420px;
}

.label-import input[type="file"] {
  background: #f8fafc;
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  padding: 8px;
}

.label-import small {
  color: #7c8998;
}

.profile-summary {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: -28px;
  min-height: 94px;
  padding: 0 8px 18px;
  position: relative;
}

.profile-identity {
  align-items: center;
  display: flex;
  gap: 18px;
  min-width: 0;
}

.profile-avatar {
  border: 4px solid #ffffff;
  box-shadow: 0 5px 14px rgba(17, 24, 39, 0.18);
  font-size: 34px;
  height: 76px;
  position: relative;
  width: 76px;
}

.profile-avatar.primary {
  z-index: 2;
}

.profile-identity h2 {
  font-size: 24px;
  font-weight: 750;
  line-height: 1.05;
  margin: 0 0 4px;
}

.profile-copy {
  min-width: 0;
  padding-top: 28px;
}

.profile-identity .profile-copy .connection-state {
  color: inherit;
  display: inline-flex;
  margin-bottom: 4px;
}

.profile-copy small {
  color: #667085;
  display: block;
  font-size: 12px;
}

.profile-identity a,
.profile-identity span {
  color: #46566a;
  display: block;
  font-size: 14px;
}

.profile-stats {
  align-items: center;
  display: flex;
  gap: 8px;
  font-weight: 700;
  padding-top: 28px;
  white-space: nowrap;
}

.profile-stats strong {
  color: #1877f2;
  font-size: 20px;
}

.profile-chevron {
  color: #6b7788;
  font-size: 28px;
  font-weight: 400;
}

.suite-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(360px, 1fr) 180px 170px;
  margin-bottom: 42px;
}

.suite-actions form {
  margin: 0;
}

.suite-actions form button {
  min-height: 42px;
}

.suite-primary-action {
  align-items: center;
  background: #0a7ac2;
  border-radius: 6px;
  color: #ffffff;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
}

.suite-primary-action.compact,
.secondary-link-button.compact {
  min-height: 38px;
  white-space: nowrap;
}

.secondary-link-button {
  align-items: center;
  background: #edf2f7;
  border-radius: 6px;
  color: #172033;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
}

.profile-info-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-home-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-home-grid article:last-child {
  grid-column: 1 / -1;
}

.page-home-grid .panel-heading h3 {
  margin-bottom: 4px;
}

.page-home-grid .panel-heading p {
  color: #647084;
  margin: 0;
}

.page-home-grid .assigned-chips {
  margin: 4px 0 18px;
}

.page-actions {
  grid-template-columns: minmax(280px, 1fr) 190px 170px;
  margin-bottom: 16px;
}

.page-workspace-metrics {
  background: #ffffff;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.page-workspace-metrics div {
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 13px 16px;
}

.page-workspace-metrics div + div {
  border-left: 1px solid #edf0f4;
}

.page-workspace-metrics strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.page-workspace-metrics span {
  color: #667085;
  font-size: 12px;
}

.page-actions button,
.page-actions a {
  width: 100%;
}

.profile-info-grid article,
.suite-empty {
  background: #ffffff;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  padding: 18px;
}

.profile-info-grid h3 {
  margin: 0 0 14px;
}

.profile-info-grid dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-info-grid dl div {
  display: flex;
  justify-content: space-between;
}

.profile-info-grid dt {
  color: #647084;
}

.profile-info-grid dd {
  font-weight: 700;
  margin: 0;
}

.message-preview {
  align-items: center;
  border: 1px solid #e1e7ef;
  border-radius: 7px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}

.message-preview span {
  display: grid;
  font-weight: 800;
  gap: 2px;
  min-width: 0;
}

.message-preview strong,
.message-preview small {
  display: block;
}

.message-preview > small {
  flex: 0 0 auto;
  margin-left: 16px;
  text-align: right;
}

.message-preview small {
  color: #647084;
}

.add-page-form {
  display: grid;
  gap: 10px;
}

.access-form {
  display: grid;
  gap: 10px;
}

.access-form label {
  align-items: center;
  border: 1px solid #e1e7ef;
  border-radius: 7px;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px;
}

.access-form input {
  grid-row: span 2;
  width: auto;
}

.access-form span {
  font-weight: 800;
}

.access-form small {
  color: #647084;
}

.add-page-form textarea {
  resize: vertical;
}

.suite-empty {
  margin: 36px;
}

.inbox-shell .suite-empty {
  align-content: center;
  display: grid;
  height: calc(100% - 48px);
  justify-items: center;
  margin: 24px;
  min-height: 320px;
  text-align: center;
}

.inbox-shell .suite-empty h1 {
  margin: 0 0 10px;
}

.inbox-shell .suite-empty p {
  color: #667085;
  margin: 0;
}

.secondary-button {
  background: #edf2f7;
  color: #172033;
}

.topbar {
  align-items: center;
  background: #111827;
  color: white;
  display: flex;
  height: 56px;
  justify-content: space-between;
  padding: 0 24px;
}

.brand {
  font-weight: 800;
}

.userbar {
  align-items: center;
  display: flex;
  gap: 14px;
}

.userbar button {
  background: #374151;
  padding: 7px 10px;
}

.inbox-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 260px;
  height: calc(100vh - 56px);
}

.inbox-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.inbox-shell .suite-sidebar {
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
}

.suite-inbox-main {
  background: #f0f2f5;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.suite-inbox-main .inbox-layout {
  grid-template-columns: 300px minmax(440px, 1fr) 300px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.suite-inbox-main .chat-header {
  min-height: 72px;
}

.conversation-list,
.label-panel {
  background: #ffffff;
  border-right: 1px solid #dbe1ea;
  min-height: 0;
  overflow: hidden;
}

.conversation-list {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.conversation-list-header {
  align-items: center;
  border-bottom: 1px solid #e6eaf0;
  display: flex;
  min-height: 72px;
  padding: 14px 16px;
}

.conversation-list-header h2 {
  font-size: 20px;
  margin: 0 0 2px;
}

.conversation-list-header span {
  color: #667085;
  font-size: 12px;
}

.conversation-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.conversation-search {
  border-bottom: 1px solid #dbe1ea;
  padding: 12px;
}

.conversation-search input,
.side-form select {
  border: 1px solid #cfd7e3;
  border-radius: 6px;
  font: inherit;
  padding: 9px 10px;
  width: 100%;
}

.message-attachment {
  color: #1769d2;
  display: block;
  font-size: 13px;
  margin: 8px 0;
}

.message-image-link {
  display: block;
  margin: 2px 0 7px;
}

.message-image {
  display: block;
  width: min(360px, 100%);
  max-height: 340px;
  object-fit: contain;
  border-radius: 9px;
}

.message.outbound .message-image {
  background: rgba(255, 255, 255, 0.12);
}

.internal-note {
  background: #fff8db;
  border: 1px solid #f0df9a;
  border-radius: 6px;
  margin: 12px 0;
  padding: 10px;
}

.internal-note small {
  color: #746b4b;
  display: block;
  margin-top: 3px;
}

.internal-note p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.label-panel {
  border-left: 1px solid #dbe1ea;
  border-right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0;
}

.conversation-link {
  border-bottom: 1px solid #e8edf4;
  display: grid;
  gap: 5px;
  padding: 13px 16px;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.conversation-link.active {
  background: #e9f2ff;
  box-shadow: inset 3px 0 #1877f2;
}

.conversation-link:hover {
  background: #f5f8fc;
}

.page-filter {
  border-bottom: 1px solid #dbe1ea;
  padding: 12px;
}

.page-filter label {
  color: #445066;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.page-filter select {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  padding: 9px;
  width: 100%;
}

.page-filter.standalone {
  border: 0;
  padding: 0 0 16px;
}

.conversation-link small,
.chat-header p,
.message small {
  color: #647084;
}

.label-row {
  align-items: center;
  color: #445066;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
}

.label-row i,
.label-choice span {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.chat-header {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #dbe1ea;
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
}

.chat-header h1 {
  font-size: 22px;
  margin: 0 0 4px;
}

.chat-header p {
  margin: 0;
}

.status {
  background: #dbf5e7;
  border-radius: 999px;
  color: #11623d;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.alert-button {
  background: #172033;
  color: #ffffff;
  padding: 8px 10px;
}

.alert-button.enabled {
  background: #0f8a4b;
}

.alert-button.standalone {
  margin-bottom: 16px;
}

.messaging-window {
  align-items: center;
  border-bottom: 1px solid #dbe1ea;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 54px;
  padding: 9px 22px;
}

.messaging-window > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.messaging-window strong {
  font-size: 13px;
}

.messaging-window span {
  color: #536174;
  font-size: 12px;
}

.messaging-window time {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.messaging-window.available {
  background: #ecf9f1;
  box-shadow: inset 3px 0 #168653;
}

.messaging-window.available time {
  color: #11623d;
}

.messaging-window.blocked {
  background: #fff3f1;
  box-shadow: inset 3px 0 #c43224;
}

.messaging-window.blocked strong,
.messaging-window.blocked time {
  color: #9f241b;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px clamp(16px, 3vw, 38px);
  scrollbar-gutter: stable;
}

.message {
  background: white;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  max-width: min(680px, 78%);
  padding: 12px 14px;
  position: relative;
}

.message.outbound {
  align-self: flex-end;
  background: #2457d6;
  color: white;
}

.message.outbound small {
  color: #d9e5ff;
}

.message p {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.reaction {
  align-self: flex-end;
  background: #ffffff;
  border: 1px solid #dbe1ea;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(17, 24, 39, 0.12);
  display: inline-flex;
  font-size: 16px;
  margin: -4px 0 6px;
  padding: 2px 6px;
  width: fit-content;
}

.message-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  margin-top: 8px;
  opacity: 0;
  position: relative;
  transition: opacity 120ms ease;
}

.message:focus-within .message-actions,
.message:hover .message-actions {
  opacity: 1;
}

.message-actions button,
.reaction-picker button {
  background: #edf2f7;
  color: #172033;
  font-size: 12px;
  padding: 6px 8px;
}

.reaction-picker {
  background: #ffffff;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
  display: flex;
  gap: 4px;
  left: 96px;
  padding: 6px;
  position: absolute;
  top: 28px;
  z-index: 4;
}

.reaction-picker[hidden] {
  display: none;
}

.reaction-picker button {
  font-size: 17px;
  height: 32px;
  padding: 0;
  width: 32px;
}

.reply-quote,
.reply-preview {
  border-left: 3px solid #2457d6;
  color: #445066;
}

.reply-quote {
  background: #f6f8fb;
  border-radius: 6px;
  display: grid;
  gap: 3px;
  margin: 0 0 8px;
  padding: 8px 10px;
}

.reply-quote strong,
.reply-preview strong {
  color: #172033;
  font-size: 13px;
}

.receipt {
  color: #8a96a8;
  font-weight: 800;
  margin-left: 6px;
}

.receipt.delivered {
  color: #5f6f86;
}

.receipt.read {
  color: #1877f2;
}

.composer-dock {
  background: #ffffff;
  border-top: 1px solid #dbe1ea;
  min-width: 0;
  position: relative;
}

.composer-tools {
  align-items: center;
  display: flex;
  gap: 4px;
  min-height: 34px;
  padding: 4px 12px 0;
}

.composer-tools small {
  color: #7a8494;
  font-size: 11px;
  margin-left: auto;
}

.composer-tool {
  align-items: center;
  background: transparent;
  color: #475467;
  display: inline-flex;
  font-size: 12px;
  gap: 5px;
  padding: 5px 7px;
}

.composer-tool > svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 17px;
}

.composer-tool:hover,
.composer-tool[aria-expanded="true"] {
  background: #edf4ff;
  color: #1769d2;
}

.optin-tool {
  position: relative;
}

.composer-tool-dot {
  background: #8a96a8;
  border: 2px solid #ffffff;
  border-radius: 50%;
  height: 9px;
  position: absolute;
  right: 1px;
  top: 1px;
  width: 9px;
}

.composer-tool-dot.active {
  background: #19a468;
}

.optin-popover {
  background: #ffffff;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  bottom: calc(100% - 2px);
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.2);
  left: 12px;
  padding: 16px;
  position: absolute;
  width: min(440px, calc(100% - 24px));
  z-index: 30;
}

.optin-popover-header,
.optin-actions,
.optin-state {
  align-items: center;
  display: flex;
}

.optin-popover-header {
  justify-content: space-between;
  margin-bottom: 14px;
}

.optin-popover-header h3 {
  font-size: 18px;
  margin: 2px 0 0;
}

.optin-popover form {
  display: grid;
  gap: 11px;
}

.optin-popover label {
  color: #344054;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.optin-popover input,
.optin-popover select {
  background: #ffffff;
  border: 1px solid #cfd7e3;
  border-radius: 7px;
  color: #172033;
  font: inherit;
  min-height: 42px;
  padding: 8px 11px;
}

.optin-popover form > p,
.optin-feedback {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.optin-actions {
  gap: 8px;
}

.optin-actions button {
  flex: 1;
  min-height: 40px;
}

.optin-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.optin-state {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.state-chip {
  background: #edf0f4;
  border-radius: 999px;
  color: #596579;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 9px;
}

.state-chip.open {
  background: #ddf6e9;
  color: #107145;
}

.state-chip.closed {
  background: #fff0dc;
  color: #a24c00;
}

.state-chip.blocked {
  background: #ffe6e4;
  color: #a92820;
}

.optin-feedback {
  border-top: 1px solid #e4e9f0;
  margin-top: 13px;
  padding-top: 11px;
}

@media (max-width: 760px) {
  .optin-popover {
    bottom: 68px;
    left: 10px;
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    position: fixed;
    right: 10px;
    width: auto;
  }
}

.composer-tool:disabled {
  background: transparent;
  color: #a1a9b5;
  cursor: not-allowed;
}

.composer-tray[hidden] {
  display: none;
}

.emoji-row {
  background: #ffffff;
  border-bottom: 1px solid #e6eaf0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 102px;
  overflow-y: auto;
  padding: 8px 14px;
}

.emoji-row button {
  background: #f1f5f9;
  color: #172033;
  font-size: 18px;
  height: 34px;
  padding: 0;
  width: 34px;
}

.quick-replies {
  background: #ffffff;
  border-bottom: 1px solid #e6eaf0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 112px;
  overflow-y: auto;
  padding: 8px 14px;
}

.quick-replies button {
  background: #edf2f7;
  color: #172033;
}

.composer {
  background: #ffffff;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 7px 12px 11px;
}

.composer textarea {
  max-height: 120px;
  min-height: 42px;
  resize: none;
}

.composer textarea:disabled {
  background: #f4f6f8;
  color: #7a8494;
  cursor: not-allowed;
}

.send-button {
  align-self: end;
  border-radius: 50%;
  font-size: 18px;
  height: 42px;
  padding: 0;
  width: 42px;
}

.send-button:disabled {
  background: #c8ced8;
  cursor: not-allowed;
}

.composer-policy-error {
  color: #9f241b;
  font-size: 12px;
  margin: -3px 14px 10px;
}

.composer-policy-error[hidden] {
  display: none;
}

.reply-preview {
  background: #eef5ff;
  border-radius: 6px;
  grid-column: 1 / -1;
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
}

.reply-preview[hidden] {
  display: none;
}

.reply-preview div {
  display: grid;
  gap: 3px;
}

.reply-preview button {
  background: transparent;
  color: #2457d6;
  padding: 4px 6px;
}

textarea,
input,
select {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  padding: 10px;
  width: 100%;
}

.inspector-header {
  border-bottom: 1px solid #e6eaf0;
  min-height: 72px;
  padding: 13px 16px;
}

.inspector-header h2 {
  font-size: 18px;
  margin: 0 0 3px;
}

.inspector-header p,
.inspector-hint,
.inspector-empty {
  color: #667085;
  font-size: 12px;
  margin: 0;
}

.inspector-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.inspector-section {
  border-bottom: 1px solid #e6eaf0;
  padding: 15px 16px;
}

.inspector-section h3,
.inspector-section h4 {
  color: #172033;
  font-size: 14px;
  margin: 0 0 10px;
}

.inspector-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.inspector-title-row h3 {
  margin: 0;
}

.inspector-title-row form {
  margin: 0;
}

.label-choice {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 5px 0;
}

.label-choice input {
  width: auto;
}

.label-panel form > button:not(.text-button),
.compact-create-form > button {
  margin-top: 8px;
  width: 100%;
}

.side-form {
  display: grid;
  gap: 8px;
  margin: 0;
}

.compact-create-form {
  border-top: 1px solid #edf0f4;
  margin-top: 12px;
  padding-top: 12px;
}

.side-form input[type="color"] {
  height: 40px;
  padding: 4px;
}

.label-create-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 44px;
}

.label-create-row input[type="color"] {
  height: 40px;
  padding: 3px;
}

.label-options {
  margin: 8px 0;
}

.text-button {
  background: transparent;
  color: #1769d2;
  font-size: 12px;
  margin: 0;
  padding: 4px 6px;
  width: auto;
}

.inspector-hint {
  margin: -4px 0 10px;
}

.toast-stack {
  display: grid;
  gap: 10px;
  max-width: min(360px, calc(100vw - 28px));
  position: fixed;
  right: 22px;
  top: 18px;
  z-index: 100;
}

.toast {
  align-items: start;
  animation: toast-enter 180ms ease-out;
  background: #111827;
  border: 1px solid #2f3a4d;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.22);
  color: #ffffff;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  padding: 12px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateX(18px);
}

.toast-link {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.toast-link strong {
  font-size: 14px;
  line-height: 1.3;
}

.toast-link > span {
  color: #d9e3f0;
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-link small {
  color: #93c5fd;
  font-weight: 700;
}

.toast-icon {
  align-items: center;
  background: #1877f2;
  border-radius: 999px;
  color: #ffffff;
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.toast-icon svg,
.toast-close svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 17px;
}

.toast-close {
  align-items: center;
  background: transparent;
  color: #aeb8c7;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.toast-close:hover {
  background: #263246;
  color: #ffffff;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.notification-center {
  margin: 0 auto;
  padding: 28px 34px 48px;
  width: 100%;
}

.notification-topbar h1 {
  font-size: 27px;
  letter-spacing: 0;
  margin: 3px 0 5px;
}

.notification-overview {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  margin: 0 auto 16px;
  max-width: 1120px;
}

.notification-overview > div,
.notification-overview > form {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  min-height: 78px;
  padding: 14px 16px;
}

.notification-overview > form {
  padding: 12px;
}

.notification-overview-icon {
  align-items: center;
  background: #e7f3ff;
  border-radius: 7px;
  color: #1877f2;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.notification-overview-icon.muted {
  background: #eaf8f0;
  color: #168a4b;
}

.notification-overview-icon svg,
.notification-read-all svg,
.notification-search svg,
.notification-filter-submit svg,
.notification-seen svg,
.notification-arrow,
.notification-empty svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.notification-overview-icon svg {
  height: 21px;
  width: 21px;
}

.notification-overview > div > span:last-child {
  display: grid;
  gap: 2px;
}

.notification-overview small {
  color: #66758a;
  font-size: 12px;
  font-weight: 700;
}

.notification-overview strong {
  color: #172033;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.notification-read-all {
  align-items: center;
  background: #e7f3ff;
  color: #1769d2;
  display: inline-flex;
  gap: 8px;
  min-height: 46px;
  white-space: nowrap;
}

.notification-read-all svg {
  height: 18px;
  width: 18px;
}

.notification-read-all:disabled {
  background: #eef1f5;
  color: #9aa5b4;
  cursor: not-allowed;
}

.notification-filters {
  align-items: end;
  background: #ffffff;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 260px) auto 42px;
  margin: 0 auto 16px;
  max-width: 1120px;
  padding: 12px;
}

.notification-search {
  align-items: center;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
}

.notification-search svg {
  color: #7c8999;
  height: 18px;
  width: 18px;
}

.notification-search input {
  background: transparent;
  border: 0;
  min-width: 0;
  outline: 0;
  padding: 0;
  width: 100%;
}

.notification-filters > label:not(.notification-search) {
  display: grid;
  gap: 4px;
}

.notification-filters > label:not(.notification-search) > span {
  color: #68778b;
  font-size: 11px;
  font-weight: 750;
}

.notification-filters select {
  min-height: 42px;
}

.notification-state-tabs {
  align-items: center;
  background: #eef2f7;
  border-radius: 6px;
  display: flex;
  min-height: 42px;
  padding: 3px;
}

.notification-state-tabs button {
  background: transparent;
  color: #5a687b;
  min-height: 36px;
  padding: 0 14px;
}

.notification-state-tabs button.active {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.1);
  color: #1769d2;
}

.notification-filter-submit {
  align-items: center;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.notification-filter-submit svg {
  height: 19px;
  width: 19px;
}

.notification-feed {
  background: #ffffff;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  margin: 0 auto;
  max-width: 1120px;
  overflow: hidden;
}

.notification-feed > header {
  align-items: center;
  border-bottom: 1px solid #e4e9ef;
  display: flex;
  justify-content: space-between;
  padding: 17px 18px;
}

.notification-feed h2 {
  font-size: 18px;
  margin: 0 0 3px;
}

.notification-feed header p,
.notification-feed header > span {
  color: #738096;
  font-size: 12px;
  margin: 0;
}

.notification-feed header > span {
  background: #eef2f7;
  border-radius: 999px;
  font-weight: 700;
  padding: 5px 9px;
}

.notification-list {
  display: grid;
}

.notification-item {
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  display: grid;
  gap: 14px;
  grid-template-columns: 46px minmax(0, 1fr) auto 22px;
  min-height: 88px;
  padding: 13px 18px;
  transition: background-color 120ms ease;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item:hover {
  background: #f6f9fd;
}

.notification-item.is-unread {
  background: #f0f7ff;
  box-shadow: inset 3px 0 #1877f2;
}

.notification-item.is-unread:hover {
  background: #e8f3ff;
}

.notification-page-avatar {
  align-items: center;
  background: #e7f3ff;
  border-radius: 999px;
  color: #1769d2;
  display: inline-flex;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  position: relative;
  width: 44px;
}

.notification-page-avatar img {
  border-radius: inherit;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.notification-page-avatar .platform-badge {
  bottom: -2px;
  right: -3px;
}

.notification-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-title-row {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.notification-title-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-title-row time {
  color: #7c8999;
  flex: 0 0 auto;
  font-size: 12px;
}

.notification-copy > small {
  color: #1877f2;
  font-size: 12px;
  font-weight: 700;
}

.notification-preview {
  color: #66758a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-unread-count {
  align-items: center;
  background: #1877f2;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 7px;
}

.notification-seen {
  align-items: center;
  color: #169c56;
  display: inline-flex;
  justify-content: center;
}

.notification-seen svg,
.notification-arrow {
  height: 18px;
  width: 18px;
}

.notification-arrow {
  color: #9aa5b4;
}

.notification-empty {
  align-items: center;
  color: #66758a;
  display: flex;
  flex-direction: column;
  min-height: 310px;
  justify-content: center;
  padding: 30px;
  text-align: center;
}

.notification-empty > span {
  align-items: center;
  background: #e7f3ff;
  border-radius: 999px;
  color: #1877f2;
  display: inline-flex;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.notification-empty svg {
  height: 25px;
  width: 25px;
}

.notification-empty h2 {
  color: #172033;
  margin: 14px 0 5px;
}

.notification-empty p {
  margin: 0 0 14px;
}

.notification-empty a {
  color: #1769d2;
  font-weight: 750;
}

.login-shell,
.empty-state {
  display: grid;
  min-height: calc(100vh - 56px);
  place-items: center;
}

.login-card,
.empty-state {
  background: white;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  padding: 28px;
  width: min(420px, calc(100vw - 32px));
}

.login-card h1,
.empty-state h1 {
  margin-top: 0;
}

.login-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.login-card button {
  width: 100%;
}

.rate-limit-card {
  text-align: center;
}

.rate-limit-card p {
  color: #647084;
  line-height: 1.55;
  margin: 0 0 20px;
}

.rate-limit-icon {
  align-items: center;
  background: #fff3dc;
  border-radius: 50%;
  color: #a15c00;
  display: flex;
  font-size: 22px;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  margin-bottom: 18px;
  width: 48px;
}

.auth-surface {
  background: #f4f7fb;
  padding: 32px 16px;
}

.auth-surface .login-card {
  border-color: #dce3ec;
  box-shadow: 0 18px 48px rgba(32, 53, 78, 0.08);
  display: grid;
  gap: 16px;
  padding: 34px;
  width: min(470px, calc(100vw - 32px));
}

.auth-brand {
  align-items: center;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 9px;
}

.auth-brand-mark {
  align-items: center;
  background: #1877f2;
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.auth-eyebrow {
  color: #1877f2;
  font-size: 12px;
  font-weight: 800;
  margin: 8px 0 -8px;
  text-transform: uppercase;
}

.auth-surface .login-card h1 {
  font-size: 30px;
  letter-spacing: 0;
  margin: 0;
}

.auth-copy {
  color: #58677a;
  line-height: 1.55;
  margin: 0;
}

.code-field {
  color: #344256;
  font-size: 13px;
  font-weight: 750;
}

.code-field input {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: 0.22em;
  margin-top: 7px;
  padding: 14px 16px;
  text-align: center;
}

.code-field small {
  color: #7b8796;
  font-weight: 500;
}

.auth-secondary-link {
  color: #53657b;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.pending-indicator {
  align-items: center;
  background: #eaf3ff;
  border-radius: 999px;
  display: flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.pending-indicator span {
  animation: pending-spin 900ms linear infinite;
  border: 3px solid #b8d6fb;
  border-right-color: #1877f2;
  border-radius: 999px;
  height: 24px;
  width: 24px;
}

@keyframes pending-spin { to { transform: rotate(360deg); } }

.shift-summary {
  align-items: center;
  background: #f6f8fb;
  border: 1px solid #e2e7ee;
  border-radius: 7px;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.shift-summary span { color: #647084; font-size: 13px; }
.shift-summary strong { font-variant-numeric: tabular-nums; }

.live-status {
  align-items: center;
  color: #476078;
  display: flex;
  font-size: 13px;
  gap: 8px;
  margin: 0;
}

.live-status span {
  animation: status-pulse 1.3s ease-in-out infinite;
  background: #27a35a;
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

.live-status.is-error { color: #b42318; }
@keyframes status-pulse { 50% { opacity: 0.35; } }

.user-admin-page { grid-template-columns: repeat(2, minmax(300px, 1fr)); }
.panel-copy { color: #647084; font-size: 14px; line-height: 1.45; margin: 0 0 14px; }
.add-page-form label { color: #344256; display: grid; font-size: 13px; font-weight: 700; gap: 6px; }

.schedule-page {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1240px;
  padding: 28px 34px 48px;
}

.schedule-editor { align-self: start; position: sticky; top: 18px; }
.schedule-form { display: grid; gap: 16px; }
.schedule-form > label { color: #344256; display: grid; font-size: 13px; font-weight: 750; gap: 7px; }
.schedule-form > label > span { color: #8390a0; font-weight: 500; margin-left: 4px; }
.schedule-form textarea { min-height: 72px; resize: vertical; }
.time-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.time-grid label { color: #344256; display: grid; font-size: 13px; font-weight: 750; gap: 7px; }

.weekday-picker {
  border: 0;
  margin: 0;
  padding: 0;
}

.weekday-picker legend { color: #344256; font-size: 13px; font-weight: 750; margin-bottom: 8px; }
.weekday-picker > div { display: grid; gap: 7px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.weekday-picker > div > div { min-width: 0; }
.weekday-picker label {
  align-items: center;
  background: #f6f8fb;
  border: 1px solid #dfe5ed;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  justify-content: center;
  min-height: 38px;
  padding: 7px;
}
.weekday-picker input { accent-color: #1877f2; margin: 0; width: auto; }

.schedule-directory { min-width: 0; }
.section-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 14px; }
.section-heading h2 { font-size: 20px; margin: 0 0 4px; }
.section-heading p { color: #647084; margin: 0; }
.section-heading > span { background: #eaf3ff; border-radius: 999px; color: #1464c8; font-size: 12px; font-weight: 750; padding: 7px 10px; }
.roster-list { display: grid; gap: 12px; }
.roster-agent { background: #fff; border: 1px solid #e1e7ef; border-radius: 8px; padding: 16px; }
.roster-agent > header { align-items: center; display: grid; gap: 11px; grid-template-columns: 36px minmax(0, 1fr) auto; margin-bottom: 14px; }
.roster-agent header div { display: grid; min-width: 0; }
.roster-agent header small { color: #6d7b8c; overflow: hidden; text-overflow: ellipsis; }
.schedule-count { color: #647084; font-size: 12px; font-weight: 700; }
.schedule-days { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.schedule-day { align-items: center; background: #f7f9fc; border: 1px solid #e3e8ef; border-radius: 7px; display: flex; justify-content: space-between; min-width: 0; padding: 9px 9px 9px 11px; }
.schedule-day > span { display: grid; gap: 2px; min-width: 0; }
.schedule-day small { color: #647084; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.icon-button { align-items: center; background: transparent; color: #5e6d7f; display: flex; height: 28px; justify-content: center; padding: 0; width: 28px; }
.danger-icon:hover { background: #ffeded; color: #c52c2c; }
.empty-roster { background: #fff; border: 1px dashed #ccd6e2; border-radius: 8px; color: #657386; display: grid; gap: 4px; padding: 28px; text-align: center; }
.empty-roster strong { color: #253247; }

.approval-page { margin: 0 auto; max-width: 1180px; padding: 28px 34px 48px; }
.approval-list { display: grid; gap: 10px; }
.approval-row { align-items: center; background: #fff; border: 1px solid #e1e7ef; border-radius: 8px; display: grid; gap: 14px; grid-template-columns: 38px minmax(170px, 1fr) minmax(145px, auto) minmax(360px, auto); padding: 13px 14px; }
.approval-person { display: grid; min-width: 0; }
.approval-person small, .approval-shift span { color: #647084; font-size: 12px; }
.approval-shift { display: grid; }
.approval-shift strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.approval-actions { align-items: center; display: grid; gap: 8px; grid-template-columns: minmax(180px, 1fr) auto auto; }
.approval-actions input { font-size: 13px; }

.connect-page-layout { display: grid; gap: 18px; margin: 0 auto; max-width: 1040px; padding: 32px 34px 48px; }
.facebook-connect-panel { align-items: center; display: grid; gap: 18px; grid-template-columns: 54px minmax(0, 1fr) auto; padding: 24px; }
.facebook-connect-panel h2 { margin-bottom: 6px; }
.facebook-connect-panel p { color: #647084; line-height: 1.5; margin: 0; max-width: 590px; }
.facebook-connect-icon { align-items: center; background: #1877f2; border-radius: 999px; color: #fff; display: flex; font-family: Arial, sans-serif; font-size: 31px; font-weight: 800; height: 52px; justify-content: center; width: 52px; }
.facebook-connect-panel .suite-primary-action { white-space: nowrap; }
.emergency-import { grid-column: 2 / -1; }
.emergency-import summary { color: #647084; cursor: pointer; font-size: 13px; font-weight: 700; }
.emergency-import form { margin-top: 12px; max-width: 620px; }
.connected-pages-panel { padding: 22px 24px; }

/* User directory */
.users-directory-page {
  margin: 0;
  max-width: none;
  padding: 24px 28px 48px;
}

.user-create-action {
  gap: 8px;
  white-space: nowrap;
}

.user-create-action svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 18px;
}

.user-directory-panel {
  background: #ffffff;
  border: 1px solid #dfe6ef;
  border-radius: 9px;
  overflow: hidden;
}

.user-directory-search {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #e4e9f0;
  display: grid;
  grid-template-columns: 190px minmax(240px, 1fr) 22px;
  padding: 14px 16px;
}

.user-filter-control,
.user-search-control {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0e9;
  display: flex;
  min-height: 42px;
}

.user-filter-control {
  border-radius: 7px 0 0 7px;
}

.user-search-control {
  border-left: 0;
  border-radius: 0 7px 7px 0;
  gap: 9px;
  padding: 0 12px;
}

.user-filter-control select,
.user-search-control input {
  background: transparent;
  border: 0;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.user-filter-control select {
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  padding: 0 12px;
}

.user-search-control input {
  padding: 9px 0;
}

.user-search-control svg {
  color: #8290a2;
  fill: none;
  flex: 0 0 auto;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 19px;
}

.user-search-indicator {
  border: 2px solid #d9e1eb;
  border-right-color: #1877f2;
  border-radius: 999px;
  height: 17px;
  justify-self: end;
  width: 17px;
}

.user-search-indicator.htmx-request {
  animation: pending-spin 0.8s linear infinite;
}

.user-directory-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.user-directory-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.user-directory-table th {
  background: #fbfcfd;
  border-bottom: 1px solid #e5eaf0;
  color: #69778a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 13px 14px;
  text-align: left;
  text-transform: uppercase;
}

.user-directory-table th:nth-child(1) { width: 70px; }
.user-directory-table th:nth-child(2) { width: 24%; }
.user-directory-table th:nth-child(3) { width: 105px; }
.user-directory-table th:nth-child(4) { width: 130px; }
.user-directory-table th:nth-child(5) { width: 130px; }
.user-directory-table th:nth-child(6) { width: 100px; }
.user-directory-table th:nth-child(7) { width: 100px; }
.user-directory-table th:nth-child(8) { width: 92px; }

.user-directory-table td {
  border-bottom: 1px solid #edf0f4;
  height: 76px;
  padding: 11px 14px;
  vertical-align: middle;
}

.user-directory-table tbody tr {
  transition: background 140ms ease;
}

.user-directory-table tbody tr:not(.user-directory-empty):hover {
  background: #f8fbff;
}

.user-directory-table tbody tr:last-child td {
  border-bottom: 0;
}

.user-id {
  color: #7b8796;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.user-directory-identity {
  align-items: center;
  display: flex;
  gap: 11px;
  min-width: 0;
}

.user-directory-identity > span:last-child {
  min-width: 0;
}

.user-directory-identity strong,
.user-directory-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-directory-identity strong {
  font-size: 14px;
}

.user-directory-identity small {
  color: #778497;
  font-size: 11px;
  margin-top: 3px;
}

.user-role-pill {
  background: #eef2f7;
  border-radius: 999px;
  color: #526175;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
}

.user-role-pill.role-owner,
.user-role-pill.role-admin {
  background: #eaf3ff;
  color: #1464c8;
}

.user-role-pill.role-manager {
  background: #f0edff;
  color: #6246b5;
}

.user-role-pill.role-support {
  background: #e9f8f0;
  color: #137646;
}

.user-role-pill.role-finance {
  background: #fff3e2;
  color: #9a5a0a;
}

.user-stat,
.user-count-link {
  color: inherit;
  display: inline-grid;
  gap: 2px;
  text-decoration: none;
}

.user-stat strong,
.user-count-link strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.user-stat span,
.user-count-link span {
  color: #7b8796;
  font-size: 10px;
}

.user-count-link:hover strong {
  color: #1877f2;
}

.user-directory-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.user-directory-actions form {
  margin: 0;
}

.icon-action-button {
  align-items: center;
  background: #eef3f8;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #445369;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.icon-action-button svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.icon-action-button:hover {
  background: #e2edfa;
  border-color: #c6d9ee;
  color: #1464c8;
}

.icon-action-button.danger:hover {
  background: #ffeded;
  border-color: #f5c5c2;
  color: #b42318;
}

.user-directory-empty td {
  color: #7b8796;
  height: 260px;
  text-align: center;
}

.user-directory-empty td > strong,
.user-directory-empty td > span:not(.empty-directory-icon) {
  display: block;
}

.user-directory-empty td > strong {
  color: #344256;
  margin: 10px 0 4px;
}

.empty-directory-icon {
  align-items: center;
  background: #eef4fb;
  border-radius: 999px;
  color: #5f7188;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.empty-directory-icon svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 22px;
}

.user-directory-footer {
  align-items: center;
  background: #fbfcfd;
  border-top: 1px solid #e5eaf0;
  color: #6d7b8c;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 16px;
}

.user-pagination {
  align-items: center;
  display: flex;
  gap: 9px;
}

.user-pagination a {
  align-items: center;
  background: #edf2f7;
  border-radius: 5px;
  color: #344256;
  display: flex;
  font-size: 19px;
  height: 30px;
  justify-content: center;
  width: 30px;
}

html[data-theme="dark"] .user-directory-panel {
  background: var(--app-surface);
  border-color: var(--app-border);
}

html[data-theme="dark"] .user-directory-search,
html[data-theme="dark"] .user-directory-table th,
html[data-theme="dark"] .user-directory-footer {
  background: #202324;
  border-color: var(--app-border);
}

html[data-theme="dark"] .user-filter-control,
html[data-theme="dark"] .user-search-control {
  background: var(--app-surface-raised);
  border-color: #42484c;
}

html[data-theme="dark"] .user-directory-table th,
html[data-theme="dark"] .user-id,
html[data-theme="dark"] .user-directory-identity small,
html[data-theme="dark"] .user-stat span,
html[data-theme="dark"] .user-count-link span,
html[data-theme="dark"] .user-directory-footer {
  color: var(--app-muted);
}

html[data-theme="dark"] .user-directory-table td {
  border-color: var(--app-border-soft);
}

html[data-theme="dark"] .user-directory-table tbody tr:not(.user-directory-empty):hover {
  background: #22272b;
}

html[data-theme="dark"] .icon-action-button,
html[data-theme="dark"] .user-pagination a {
  background: #2b3033;
  color: #c8d0d8;
}

html[data-theme="dark"] .icon-action-button:hover {
  background: #253b54;
  border-color: #355a84;
  color: #8fc2ff;
}

html[data-theme="dark"] .icon-action-button.danger:hover {
  background: #4a2423;
  border-color: #6b3230;
  color: #ffaaa4;
}

.icon-action-button.warning:hover {
  background: #fff4e5;
  border-color: #f2b970;
  color: #b54708;
}

html[data-theme="dark"] .icon-action-button.warning:hover {
  background: #49351c;
  border-color: #78572d;
  color: #ffc57a;
}

html[data-theme="dark"] .user-directory-empty td > strong {
  color: var(--app-text);
}

html[data-theme="dark"] .empty-directory-icon {
  background: #292e31;
  color: #a9b3bd;
}

@media (max-width: 900px) {
  .users-directory-page {
    padding: 18px 14px 36px;
  }

  .user-directory-search {
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .user-filter-control,
  .user-search-control {
    border: 1px solid #d8e0e9;
    border-radius: 7px;
  }

  .user-search-indicator {
    display: none;
  }

  .user-directory-table-wrap {
    overflow: visible;
  }

  .user-directory-table,
  .user-directory-table tbody {
    display: block;
  }

  .user-directory-table thead {
    display: none;
  }

  .user-directory-table tr {
    border-bottom: 1px solid #e7ecf2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }

  html[data-theme="dark"] .user-directory-table tr {
    border-color: var(--app-border-soft);
  }

  .user-directory-table td {
    border: 0;
    display: grid;
    height: auto;
    padding: 8px 6px;
  }

  .user-directory-table td::before {
    color: #7b8796;
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
  }

  .user-directory-table td:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .user-directory-table td:nth-child(2)::before,
  .user-directory-table td:last-child::before {
    display: none;
  }

  .user-directory-table .user-role-pill,
  .user-directory-table .status-pill {
    width: fit-content;
  }

  .user-directory-table .user-id {
    position: absolute;
    visibility: hidden;
  }

  .user-directory-table .user-directory-actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .user-directory-empty {
    display: block;
  }

  .user-directory-empty td {
    display: block;
    height: auto;
    padding: 60px 12px;
  }

  .user-directory-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Shared application theme */
html[data-theme="dark"] {
  --app-bg: #141617;
  --app-surface: #1d1f20;
  --app-surface-raised: #242728;
  --app-surface-hover: #292d2f;
  --app-border: #35393c;
  --app-border-soft: #2b2e30;
  --app-text: #f0f2f4;
  --app-muted: #9aa2ad;
  --app-blue: #4a9cff;
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: var(--app-bg);
  color: var(--app-text);
}

html[data-theme="dark"] .suite-shell,
html[data-theme="dark"] .suite-main,
html[data-theme="dark"] .suite-inbox-main,
html[data-theme="dark"] .auth-surface {
  background: var(--app-bg);
  color: var(--app-text);
}

html[data-theme="dark"] :is(
  .suite-sidebar,
  .suite-topbar,
  .dashboard-panel,
  .directory-summary > div,
  .page-search,
  .page-directory-card,
  .page-workspace-metrics,
  .profile-info-grid > article,
  .suite-empty,
  .conversation-list,
  .label-panel,
  .chat-header,
  .composer-dock,
  .emoji-row,
  .quick-replies,
  .composer,
  .login-card,
  .empty-state,
  .roster-agent,
  .empty-roster,
  .approval-row
) {
  background: var(--app-surface);
  border-color: var(--app-border);
  color: var(--app-text);
}

html[data-theme="dark"] :is(
  .suite-topbar,
  .suite-sidebar,
  .suite-page-switcher label,
  .page-menu,
  .dashboard-panel,
  .page-row,
  .user-row,
  .access-toggle,
  .access-panel-header,
  .assignment-page-option,
  .page-access-footer,
  .selected-page-details dl div,
  .directory-summary > div,
  .page-search,
  .page-directory-card,
  .label-import,
  .page-workspace-metrics,
  .page-workspace-metrics div + div,
  .profile-info-grid > article,
  .message-preview,
  .access-form label,
  .conversation-list,
  .label-panel,
  .conversation-list-header,
  .conversation-search,
  .page-filter,
  .conversation-link,
  .chat-header,
  .messaging-window,
  .message,
  .reaction,
  .reaction-picker,
  .composer-dock,
  .emoji-row,
  .quick-replies,
  .inspector-header,
  .inspector-section,
  .compact-create-form,
  .login-card,
  .shift-summary,
  .weekday-picker label,
  .roster-agent,
  .schedule-day,
  .empty-roster,
  .approval-row
) {
  border-color: var(--app-border);
}

html[data-theme="dark"] :is(
  .suite-logo,
  .suite-nav a,
  .suite-sidebar-bottom a,
  .suite-tabs a,
  .agent-row,
  .secondary-link-button,
  .secondary-button,
  .directory-summary strong,
  .inspector-section h3,
  .inspector-section h4,
  .reply-quote strong,
  .reply-preview strong,
  .empty-roster strong,
  .add-page-form label,
  .schedule-form > label,
  .time-grid label,
  .weekday-picker legend,
  .code-field
) {
  color: var(--app-text);
}

html[data-theme="dark"] :is(
  .suite-subtitle,
  .panel-heading p,
  .page-row small,
  .user-row small,
  .edit-user-summary small,
  .form-section-heading p,
  .access-toggle small,
  .agent-row small,
  .access-panel-header p,
  .assignment-page-option small,
  .page-access-footer,
  .empty-access-state p,
  .inline-empty,
  .selected-page-details dt,
  .directory-summary span,
  .page-directory-identity small,
  .page-directory-identity p,
  .page-directory-stats span,
  .page-connection-detail > span,
  .page-connection-detail small,
  .label-import small,
  .profile-copy small,
  .profile-identity a,
  .profile-identity span,
  .page-home-grid .panel-heading p,
  .page-workspace-metrics span,
  .profile-info-grid dt,
  .message-preview small,
  .access-form small,
  .inbox-shell .suite-empty p,
  .conversation-list-header span,
  .page-filter label,
  .conversation-link small,
  .chat-header p,
  .message small,
  .messaging-window span,
  .composer-tools small,
  .inspector-header p,
  .inspector-hint,
  .inspector-empty,
  .rate-limit-card p,
  .auth-copy,
  .code-field small,
  .auth-secondary-link,
  .shift-summary span,
  .live-status,
  .panel-copy,
  .schedule-form > label > span,
  .section-heading p,
  .roster-agent header small,
  .schedule-count,
  .schedule-day small,
  .approval-person small,
  .approval-shift span,
  .facebook-connect-panel p,
  .emergency-import summary
) {
  color: var(--app-muted);
}

html[data-theme="dark"] :is(textarea, input, select) {
  background: var(--app-surface-raised);
  border-color: #454b50;
  color: var(--app-text);
}

html[data-theme="dark"] :is(textarea, input, select)::placeholder {
  color: #7f8893;
}

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--app-text);
  box-shadow: 0 0 0 1000px var(--app-surface-raised) inset;
}

html[data-theme="dark"] .suite-theme-toggle,
html[data-theme="dark"] .standalone-theme-toggle {
  background: var(--app-surface-raised);
  border-color: var(--app-border);
  color: var(--app-text);
}

html[data-theme="dark"] .suite-theme-toggle:hover,
html[data-theme="dark"] .standalone-theme-toggle:hover {
  background: #20364e;
  border-color: var(--app-blue);
  color: #82bcff;
}

html[data-theme="dark"] .suite-page-switcher label,
html[data-theme="dark"] .page-menu {
  background: var(--app-surface);
  border-color: var(--app-border);
}

html[data-theme="dark"] .page-menu button {
  color: var(--app-text);
}

html[data-theme="dark"] .page-menu button.selected,
html[data-theme="dark"] .page-menu button:hover,
html[data-theme="dark"] .page-menu a:hover {
  background: #20364e;
}

html[data-theme="dark"] .suite-nav a.active {
  background: #303538;
}

html[data-theme="dark"] .suite-nav a:hover,
html[data-theme="dark"] .suite-sidebar-bottom a:hover {
  background: var(--app-surface-raised);
}

html[data-theme="dark"] .suite-nav-section,
html[data-theme="dark"] .suite-sidebar-bottom {
  border-color: var(--app-border);
  color: var(--app-muted);
}

html[data-theme="dark"] .suite-sidebar-bottom a:last-child,
html[data-theme="dark"] .suite-user button,
html[data-theme="dark"] .secondary-link-button,
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .agent-page-count,
html[data-theme="dark"] .message-actions button,
html[data-theme="dark"] .quick-replies button,
html[data-theme="dark"] .emoji-row button {
  background: var(--app-surface-raised);
  color: var(--app-text);
}

html[data-theme="dark"] .suite-sidebar-bottom kbd {
  background: #303538;
  color: #b4bbc5;
}

html[data-theme="dark"] .suite-user-avatar {
  background: #253d38;
  border-color: #36564f;
  color: #8ce0c4;
}

html[data-theme="dark"] .page-row.selected,
html[data-theme="dark"] .agent-row.selected,
html[data-theme="dark"] .assignment-page-option:has(input:checked),
html[data-theme="dark"] .conversation-link.active {
  background: #20364e;
  border-color: #3f72a6;
}

html[data-theme="dark"] .agent-row:hover,
html[data-theme="dark"] .conversation-link:hover,
html[data-theme="dark"] .page-directory-card:hover {
  background: var(--app-surface-hover);
}

/* Messenger Utility Message templates */
.template-workspace {
  background: #f4f6f9;
  padding: 26px clamp(20px, 4vw, 56px) 48px;
}

.template-page-tabs {
  display: flex;
  gap: 8px;
  margin: 0 auto 18px;
  max-width: 1460px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.template-page-tabs > a {
  align-items: center;
  background: #fff;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  color: #344054;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 750;
  gap: 9px;
  min-height: 46px;
  padding: 6px 12px;
}

.template-page-tabs > a.active {
  background: #eaf3ff;
  border-color: #8fc1ff;
  color: #0d64d8;
}

.suite-page-avatar.small {
  height: 31px;
  width: 31px;
}

.template-toolbar,
.template-layout,
.template-setup-notice,
.template-flashes {
  margin-left: auto;
  margin-right: auto;
  max-width: 1460px;
}

.template-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.template-toolbar h2,
.template-toolbar p {
  margin: 0;
}

.template-toolbar p {
  color: #667085;
  font-size: 13px;
  margin-top: 3px;
}

.template-toolbar .secondary-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.template-toolbar svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  width: 17px;
}

.template-setup-notice {
  background: #fff8e7;
  border: 1px solid #f2cf75;
  border-radius: 7px;
  color: #744c00;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.template-setup-notice p {
  margin: 4px 0 0;
}

.template-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.template-catalog,
.template-submit-panel {
  background: #fff;
  border: 1px solid #dce3ec;
  border-radius: 8px;
}

.template-catalog {
  min-width: 0;
}

.template-section-heading {
  align-items: center;
  border-bottom: 1px solid #e5eaf0;
  display: flex;
  justify-content: space-between;
  padding: 18px 20px;
}

.template-section-heading h2 {
  font-size: 20px;
  margin: 2px 0 0;
}

.template-section-heading > span,
.composer-tool-count {
  align-items: center;
  background: #1877f2;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 5px;
}

.template-list {
  display: grid;
}

.template-row {
  align-items: center;
  border-bottom: 1px solid #e8ecf1;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 190px;
  padding: 17px 20px;
}

.template-row:last-child {
  border-bottom: 0;
}

.template-row-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.template-row-main > p {
  color: #344054;
  line-height: 1.5;
  margin: 8px 0;
  white-space: pre-wrap;
}

.template-row-main > small,
.template-row-main > em {
  color: #7a8494;
  display: block;
  font-size: 12px;
}

.template-row-main > em {
  color: #b42318;
  font-style: normal;
  margin-top: 7px;
}

.template-status {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  padding: 4px 8px;
  text-transform: uppercase;
}

.template-status.status-approved {
  background: #dcf5e8;
  color: #087344;
}

.template-status.status-pending,
.template-status.status-unknown {
  background: #fff1ce;
  color: #935b00;
}

.template-status.status-rejected,
.template-status.status-disabled,
.template-status.status-paused {
  background: #fee7e7;
  color: #b42318;
}

.template-meta {
  display: grid;
  gap: 3px;
}

.template-meta span {
  color: #8a94a3;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.template-meta code,
.template-meta time {
  color: #344054;
  font-size: 12px;
  margin-bottom: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-submit-panel {
  padding: 20px;
  position: sticky;
  top: 20px;
}

.template-submit-panel h2 {
  margin: 3px 0 5px;
}

.template-submit-panel > p {
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.template-submit-panel form,
.template-submit-panel label {
  display: grid;
}

.template-submit-panel form {
  gap: 13px;
  margin-top: 18px;
}

.template-submit-panel label {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.template-submit-panel :is(input, select, textarea) {
  background: #fff;
  border: 1px solid #cfd8e4;
  border-radius: 6px;
  color: #172033;
  font: inherit;
  padding: 10px 11px;
}

.template-submit-panel label small {
  color: #7a8494;
  font-weight: 500;
}

.template-submit-panel button {
  min-height: 44px;
}

.template-submit-panel button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.template-empty {
  color: #667085;
  padding: 46px 22px;
  text-align: center;
}

.template-empty h3,
.template-empty p {
  margin: 0;
}

.template-empty p {
  margin-top: 6px;
}

.template-flashes p {
  border-radius: 6px;
  margin: 0 0 12px;
  padding: 11px 14px;
}

.template-flashes .success {
  background: #dcf5e8;
  color: #087344;
}

.template-flashes .error {
  background: #fee7e7;
  color: #b42318;
}

.template-page-bar {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 auto 20px;
  max-width: 1290px;
}

.template-page-picker {
  color: #667085;
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  letter-spacing: 0;
  text-transform: uppercase;
  width: min(100%, 420px);
}

.template-page-picker-control {
  align-items: center;
  background: #fff;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  display: flex;
  min-height: 52px;
  padding: 5px 8px;
}

.template-page-picker select {
  appearance: none;
  background: transparent;
  border: 0;
  color: #172033;
  cursor: pointer;
  flex: 1;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  min-height: 40px;
  outline: 0;
  padding: 0 34px 0 10px;
  text-transform: none;
}

.template-page-picker-control::after {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  height: 7px;
  margin-left: -28px;
  margin-right: 12px;
  pointer-events: none;
  transform: rotate(45deg) translateY(-2px);
  width: 7px;
}

.template-page-bar .secondary-button,
.template-access-actions :is(.primary-button, .secondary-button) {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
}

.template-page-bar .secondary-button {
  gap: 8px;
}

.template-page-bar svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.template-toolbar,
.template-layout,
.template-access-card {
  max-width: 1290px;
}

.template-ready-badge {
  align-items: center;
  background: #dcf5e8;
  border-radius: 999px;
  color: #087344;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  padding: 7px 11px;
}

.template-ready-badge svg {
  fill: none;
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 15px;
}

.template-access-card {
  align-items: start;
  background: #f7fbff;
  border: 1px solid #b8d8ff;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 44px minmax(0, 1fr);
  margin: 0 auto 18px;
  padding: 20px;
}

.template-access-icon {
  align-items: center;
  background: #e4f1ff;
  border-radius: 7px;
  color: #0d64d8;
  display: flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.template-access-icon svg,
.template-empty-icon svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 22px;
}

.template-access-copy h2 {
  font-size: 20px;
  margin: 3px 0 6px;
  text-wrap: balance;
}

.template-access-copy > p {
  color: #5f6b7c;
  line-height: 1.5;
  margin: 0;
  max-width: 760px;
  text-wrap: pretty;
}

.template-access-steps {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 18px 0;
  padding: 0;
}

.template-access-steps li {
  align-items: center;
  display: flex;
  gap: 11px;
}

.template-access-steps li > span {
  align-items: center;
  background: #e8edf4;
  border-radius: 999px;
  color: #536175;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 850;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.template-access-steps li.complete > span {
  background: #dcf5e8;
  color: #087344;
}

.template-access-steps li div {
  display: grid;
  gap: 2px;
}

.template-access-steps small {
  color: #6d7888;
}

.template-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.template-access-actions .primary-button {
  background: #1877f2;
  color: #fff;
}

.template-admin-details {
  border-top: 1px solid #dce6f2;
  color: #5f6b7c;
  font-size: 12px;
  margin-top: 18px;
  padding-top: 13px;
}

.template-admin-details summary {
  cursor: pointer;
  font-weight: 800;
}

.template-admin-details p {
  margin: 8px 0 0;
}

.template-admin-details code {
  background: #e9eef5;
  border-radius: 4px;
  color: #344054;
  padding: 2px 5px;
}

.template-layout {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
}

.template-submit-panel {
  top: 18px;
}

.template-submit-panel form {
  gap: 16px;
}

.template-submit-panel label > span,
.template-purpose-fieldset legend,
.template-variable-tools > span,
.template-preview > span {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.template-purpose-fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.template-purpose-fieldset legend {
  margin-bottom: 8px;
}

.template-purpose-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.template-purpose-grid button {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  color: #344054;
  display: flex;
  gap: 9px;
  justify-content: start;
  min-height: 58px;
  padding: 9px;
  text-align: left;
  transition-duration: 150ms;
  transition-property: background-color, border-color, box-shadow, transform;
  transition-timing-function: ease-out;
}

.template-purpose-grid button:hover {
  background: #eef5ff;
  border-color: #9bc6fb;
}

.template-purpose-grid button:active {
  transform: scale(.98);
}

.template-purpose-grid button.active {
  background: #eaf3ff;
  border-color: #1877f2;
  box-shadow: 0 0 0 2px rgba(24, 119, 242, .12);
  color: #0d64d8;
}

.template-purpose-grid svg {
  fill: none;
  flex: 0 0 auto;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 19px;
}

.template-purpose-grid button > span {
  display: grid;
  gap: 2px;
}

.template-purpose-grid small {
  color: #7a8494;
  font-size: 10px;
  font-weight: 600;
}

.template-variable-tools {
  display: grid;
  gap: 7px;
}

.template-variable-tools > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template-variable-tools button {
  background: #eef3f8;
  border: 1px solid #d6dee8;
  border-radius: 999px;
  color: #344054;
  font-size: 11px;
  font-weight: 750;
  min-height: 32px;
  padding: 5px 10px;
}

.template-variable-tools > small {
  color: #7a8494;
  font-size: 11px;
}

.template-example-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.template-example-fields:empty {
  display: none;
}

.template-preview {
  display: grid;
  gap: 7px;
}

.template-preview > div {
  background: #eaf3ff;
  border: 1px solid #c7ddfa;
  border-radius: 8px 8px 2px 8px;
  color: #172033;
  line-height: 1.5;
  min-height: 72px;
  padding: 12px 14px;
  white-space: pre-wrap;
}

.template-submit-actions {
  align-items: center;
  border-top: 1px solid #e5eaf0;
  display: grid;
  gap: 10px;
  padding-top: 15px;
}

.template-submit-actions > small {
  color: #7a8494;
  font-size: 11px;
}

.template-submit-actions button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}

.template-submit-actions svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.template-empty-icon {
  align-items: center;
  background: #eef3f8;
  border-radius: 7px;
  color: #667085;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  margin-bottom: 12px;
  width: 42px;
}

.template-empty-page {
  background: #fff;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  margin: 36px auto;
  max-width: 680px;
}

.template-empty-page .primary-button {
  background: #1877f2;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  margin-top: 18px;
  min-height: 44px;
  padding: 0 16px;
}

.utility-template-tray {
  background: #fff;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  bottom: calc(100% - 2px);
  box-shadow: 0 18px 45px rgba(17, 24, 39, .2);
  left: 12px;
  max-height: min(620px, calc(100vh - 170px));
  overflow: hidden;
  position: absolute;
  width: min(620px, calc(100% - 24px));
  z-index: 31;
}

.utility-template-header {
  align-items: start;
  border-bottom: 1px solid #e5eaf0;
  display: flex;
  justify-content: space-between;
  padding: 15px 16px;
}

.utility-template-header h3 {
  font-size: 18px;
  margin: 2px 0 3px;
}

.utility-template-header p {
  color: #667085;
  font-size: 12px;
  margin: 0;
}

.utility-template-warning {
  background: #fff6dd;
  color: #895d00;
  font-size: 12px;
  margin: 0;
  padding: 10px 16px;
}

.utility-template-options {
  display: grid;
  gap: 9px;
  max-height: 470px;
  overflow-y: auto;
  padding: 12px;
}

.utility-template-option {
  border: 1px solid #dbe2eb;
  border-radius: 7px;
  display: grid;
  gap: 10px;
  padding: 13px;
}

.utility-template-option > header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.utility-template-option > header div {
  display: grid;
}

.utility-template-option > header span:not(.template-status) {
  color: #7a8494;
  font-size: 11px;
}

.utility-template-option > p {
  background: #f5f7fa;
  border-left: 3px solid #1877f2;
  color: #344054;
  line-height: 1.45;
  margin: 0;
  padding: 10px;
  white-space: pre-wrap;
}

.utility-template-variables {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.utility-template-variables label {
  color: #667085;
  display: grid;
  font-size: 11px;
  font-weight: 750;
  gap: 4px;
}

.utility-template-variables input {
  background: #fff;
  border: 1px solid #cfd7e3;
  border-radius: 6px;
  color: #172033;
  min-height: 38px;
  padding: 7px 9px;
}

.utility-template-option > button {
  justify-self: end;
  min-height: 36px;
}

html[data-theme="dark"] :is(
  .template-workspace,
  .template-page-tabs,
  .utility-template-tray
) {
  color: #e8edf5;
}

html[data-theme="dark"] .template-workspace {
  background: #111315;
}

html[data-theme="dark"] :is(
  .template-page-tabs > a,
  .template-catalog,
  .template-submit-panel,
  .utility-template-tray,
  .utility-template-option
) {
  background: #1c1f22;
  border-color: #30363d;
  color: #e8edf5;
}

html[data-theme="dark"] .template-page-tabs > a.active {
  background: #172b45;
  border-color: #287ee7;
  color: #77b4ff;
}

html[data-theme="dark"] :is(
  .template-toolbar p,
  .template-row-main > p,
  .template-row-main > small,
  .template-submit-panel > p,
  .template-submit-panel label,
  .template-submit-panel label small,
  .template-meta code,
  .template-meta time,
  .utility-template-header p,
  .utility-template-variables label
) {
  color: #aeb8c6;
}

html[data-theme="dark"] :is(
  .template-submit-panel input,
  .template-submit-panel select,
  .template-submit-panel textarea,
  .utility-template-variables input
) {
  background: #222629;
  border-color: #414850;
  color: #f4f7fb;
}

html[data-theme="dark"] .utility-template-option > p {
  background: #24282c;
  color: #dce3ec;
}

html[data-theme="dark"] :is(
  .template-page-picker-control,
  .template-access-card,
  .template-empty-page
) {
  background: #1c1f22;
  border-color: #30363d;
  color: #e8edf5;
}

html[data-theme="dark"] .template-page-picker select {
  color: #f4f7fb;
}

html[data-theme="dark"] :is(
  .template-access-copy > p,
  .template-access-steps small,
  .template-admin-details,
  .template-purpose-grid small,
  .template-variable-tools > small,
  .template-submit-actions > small
) {
  color: #aeb8c6;
}

html[data-theme="dark"] :is(
  .template-submit-panel label > span,
  .template-purpose-fieldset legend,
  .template-variable-tools > span,
  .template-preview > span
) {
  color: #e8edf5;
}

html[data-theme="dark"] .template-access-icon {
  background: #172b45;
  color: #77b4ff;
}

html[data-theme="dark"] .template-access-steps li > span {
  background: #30363d;
  color: #c1c8d2;
}

html[data-theme="dark"] .template-access-steps li.complete > span {
  background: #173e2e;
  color: #7de2b4;
}

html[data-theme="dark"] .template-admin-details {
  border-color: #30363d;
}

html[data-theme="dark"] .template-admin-details code {
  background: #262b30;
  color: #dce3ec;
}

html[data-theme="dark"] :is(
  .template-purpose-grid button,
  .template-variable-tools button
) {
  background: #24282c;
  border-color: #3b424a;
  color: #dce3ec;
}

html[data-theme="dark"] .template-purpose-grid button:hover {
  background: #26384c;
  border-color: #3f72a6;
}

html[data-theme="dark"] .template-purpose-grid button.active {
  background: #172b45;
  border-color: #287ee7;
  color: #77b4ff;
}

html[data-theme="dark"] .template-preview > div {
  background: #172b45;
  border-color: #335d8e;
  color: #eef5ff;
}

html[data-theme="dark"] .template-submit-actions {
  border-color: #30363d;
}

html[data-theme="dark"] .template-empty-icon {
  background: #262b30;
  color: #aeb8c6;
}

@media (max-width: 960px) {
  .template-layout {
    grid-template-columns: 1fr;
  }

  .template-submit-panel {
    position: static;
  }
}

.template-summary-grid,
.template-view-tabs,
.template-layout {
  margin-left: auto;
  margin-right: auto;
  max-width: 1290px;
  width: 100%;
}

.template-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.template-summary-grid > div {
  background: #fff;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  display: grid;
  gap: 3px;
  min-height: 92px;
  padding: 15px 17px;
}

.template-summary-grid span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.template-summary-grid strong {
  color: #172033;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.template-summary-grid small {
  color: #7a8494;
  font-size: 11px;
}

.template-summary-grid .approved {
  border-top-color: #19a463;
}

.template-summary-grid .pending {
  border-top-color: #d99a16;
}

.template-summary-grid .attention {
  border-top-color: #df4c4c;
}

.template-view-tabs {
  border-bottom: 1px solid #dce3ec;
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
}

.template-view-tabs > button {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #667085;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  min-height: 46px;
  padding: 0 2px;
  transition-duration: 150ms;
  transition-property: border-color, color;
  transition-timing-function: ease-out;
}

.template-view-tabs > button:hover,
.template-view-tabs > button.active {
  color: #0d64d8;
}

.template-view-tabs > button.active {
  border-bottom-color: #1877f2;
}

.template-view-tabs > button span {
  align-items: center;
  background: #e8edf4;
  border-radius: 999px;
  color: #536175;
  display: inline-flex;
  font-size: 10px;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
}

.template-layout {
  display: block;
}

.template-pane[hidden] {
  display: none;
}

.template-section-heading {
  gap: 16px;
}

.template-create-button,
.template-empty-action {
  align-items: center;
  background: #1877f2;
  border: 1px solid #1877f2;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
  justify-content: center;
  min-height: 40px;
  padding: 0 13px;
  transition-duration: 150ms;
  transition-property: background-color, border-color, transform;
  transition-timing-function: ease-out;
}

.template-create-button:hover,
.template-empty-action:hover {
  background: #0d64d8;
  border-color: #0d64d8;
}

.template-create-button:active,
.template-empty-action:active {
  transform: scale(.98);
}

.template-create-button svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
  width: 16px;
}

.template-empty-action {
  margin-top: 18px;
}

.template-submit-panel {
  padding: 0;
  position: static;
}

.template-builder-heading {
  align-items: start;
  border-bottom: 1px solid #e5eaf0;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 20px 22px;
}

.template-builder-heading h2,
.template-builder-heading p {
  margin: 0;
}

.template-builder-heading h2 {
  font-size: 21px;
  margin-top: 3px;
}

.template-builder-heading p {
  color: #667085;
  font-size: 13px;
  margin-top: 5px;
}

.template-builder-heading .secondary-button {
  flex: 0 0 auto;
  min-height: 40px;
}

.template-submit-panel form {
  gap: 20px;
  margin: 0;
  padding: 22px;
}

.template-purpose-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.template-purpose-grid button {
  min-height: 72px;
  padding: 12px;
}

.template-builder-fields {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.template-preview > div {
  max-width: 760px;
}

.template-submit-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.template-submit-actions button {
  min-width: 230px;
}

html[data-theme="dark"] .template-summary-grid > div {
  background: #1c1f22;
  border-color: #30363d;
}

html[data-theme="dark"] .template-summary-grid :is(strong, span) {
  color: #e8edf5;
}

html[data-theme="dark"] .template-summary-grid small,
html[data-theme="dark"] .template-builder-heading p {
  color: #aeb8c6;
}

html[data-theme="dark"] .template-view-tabs,
html[data-theme="dark"] .template-builder-heading {
  border-color: #30363d;
}

html[data-theme="dark"] .template-view-tabs > button {
  color: #aeb8c6;
}

html[data-theme="dark"] .template-view-tabs > button:hover,
html[data-theme="dark"] .template-view-tabs > button.active {
  color: #77b4ff;
}

html[data-theme="dark"] .template-view-tabs > button span {
  background: #30363d;
  color: #dce3ec;
}

@media (max-width: 820px) {
  .template-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-purpose-grid,
  .template-builder-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .template-summary-grid,
  .template-purpose-grid,
  .template-builder-fields {
    grid-template-columns: 1fr;
  }

  .template-view-tabs {
    gap: 12px;
  }

  .template-builder-heading {
    display: grid;
  }

  .template-submit-actions {
    grid-template-columns: 1fr;
  }

  .template-submit-actions button {
    min-width: 0;
    width: 100%;
  }
}

.runtime-status {
  align-items: stretch;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto 18px;
  max-width: 1290px;
  overflow: hidden;
  width: 100%;
}

.runtime-status > div {
  align-items: center;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #dde3ea);
  display: flex;
  gap: 10px;
  min-height: 56px;
  padding: 10px 14px;
}

.runtime-status > div:first-child {
  border-radius: 6px 0 0 6px;
}

.runtime-status > div:last-child {
  border-radius: 0 6px 6px 0;
}

.runtime-status span:not(.runtime-dot, .runtime-queue-icon) {
  display: grid;
  gap: 2px;
}

.runtime-status strong {
  color: var(--ink, #101828);
  font-size: 13px;
}

.runtime-status small {
  color: var(--muted, #667085);
  font-size: 12px;
}

.runtime-dot {
  background: #98a2b3;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(152, 162, 179, 0.12);
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

.runtime-dot.runtime-online {
  background: #12b76a;
  box-shadow: 0 0 0 5px rgba(18, 183, 106, 0.12);
}

.runtime-dot.runtime-offline {
  background: #f04438;
  box-shadow: 0 0 0 5px rgba(240, 68, 56, 0.12);
}

.runtime-dot.runtime-inline {
  background: #f79009;
  box-shadow: 0 0 0 5px rgba(247, 144, 9, 0.12);
}

.runtime-queue-icon {
  align-items: center;
  background: #eef4ff;
  border-radius: 5px;
  color: #175cd3;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.runtime-queue-icon svg,
.conversation-pagination svg,
.load-older-messages svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.conversation-pagination {
  align-items: center;
  border-top: 1px solid var(--border, #dde3ea);
  display: flex;
  flex: 0 0 46px;
  justify-content: center;
  padding: 6px 12px;
}

.conversation-pagination a,
.conversation-pagination > span {
  align-items: center;
  color: var(--ink, #344054);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.conversation-pagination > span {
  opacity: 0.35;
}

.conversation-pagination small {
  color: var(--muted, #667085);
  min-width: 58px;
  text-align: center;
}

.load-older-messages {
  align-items: center;
  align-self: center;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 6px;
  color: var(--ink, #344054);
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  justify-content: center;
  margin: 8px auto 14px;
  min-height: 34px;
  padding: 6px 12px;
}

.load-older-messages:hover {
  background: var(--surface-subtle, #f8fafc);
}

.directory-pagination {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: center;
  padding: 18px 0 6px;
}

.directory-pagination a {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 5px;
  color: var(--ink, #344054);
  padding: 7px 12px;
}

.directory-pagination span {
  color: var(--muted, #667085);
  font-size: 13px;
}

html[data-theme="dark"] .runtime-status > div,
html[data-theme="dark"] .load-older-messages,
html[data-theme="dark"] .directory-pagination a {
  background: #1d1f20;
  border-color: #35383b;
}

html[data-theme="dark"] .runtime-status strong,
html[data-theme="dark"] .load-older-messages,
html[data-theme="dark"] .directory-pagination a {
  color: #f2f4f7;
}

html[data-theme="dark"] .runtime-status small,
html[data-theme="dark"] .conversation-pagination small,
html[data-theme="dark"] .directory-pagination span {
  color: #98a2b3;
}

@media (max-width: 720px) {
  .runtime-status {
    grid-template-columns: 1fr;
  }

  .runtime-status > div:first-child,
  .runtime-status > div:last-child {
    border-radius: 0;
  }
}

@media (max-width: 680px) {
  .template-workspace {
    padding: 16px 12px 36px;
  }

  .template-page-bar {
    align-items: stretch;
    display: grid;
  }

  .template-page-picker {
    width: 100%;
  }

  .template-page-bar form,
  .template-page-bar button {
    width: 100%;
  }

  .template-access-card {
    grid-template-columns: 1fr;
  }

  .template-purpose-grid,
  .template-example-fields {
    grid-template-columns: 1fr;
  }

  .template-row {
    grid-template-columns: 1fr;
  }

  .utility-template-tray {
    bottom: 70px;
    left: 8px;
    max-height: calc(100dvh - 100px);
    position: fixed;
    right: 8px;
    width: auto;
  }

  .utility-template-variables {
    grid-template-columns: 1fr;
  }
}

html[data-theme="dark"] .selection-count {
  background: #20364e;
  color: #8dc2ff;
}

html[data-theme="dark"] .inline-empty {
  border-color: #4b5258;
}

html[data-theme="dark"] .assigned-chips span {
  background: #253033;
  border-color: var(--app-border);
}

html[data-theme="dark"] .page-search input {
  background: transparent;
}

html[data-theme="dark"] .connection-state.connected,
html[data-theme="dark"] .status-pill.active {
  background: #143e29;
  color: #79dda4;
}

html[data-theme="dark"] .connection-state.attention {
  background: #4b3918;
  color: #f4c96b;
}

html[data-theme="dark"] .connection-state.inactive,
html[data-theme="dark"] .status-pill.inactive {
  background: #303538;
  color: #bbc2cb;
}

html[data-theme="dark"] .label-import input[type="file"],
html[data-theme="dark"] .workspace-pulse,
html[data-theme="dark"] .shift-summary,
html[data-theme="dark"] .weekday-picker label,
html[data-theme="dark"] .schedule-day {
  background: var(--app-surface-raised);
  border-color: var(--app-border);
}

html[data-theme="dark"] .profile-avatar {
  border-color: var(--app-surface);
}

html[data-theme="dark"] .messaging-window.available {
  background: #143128;
}

html[data-theme="dark"] .messaging-window.available time {
  color: #79dda4;
}

html[data-theme="dark"] .messaging-window.blocked {
  background: #3d2422;
}

html[data-theme="dark"] .messaging-window.blocked strong,
html[data-theme="dark"] .messaging-window.blocked time {
  color: #ffaaa4;
}

html[data-theme="dark"] .optin-popover {
  background: var(--app-surface);
  border-color: var(--app-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] .composer-tool-dot {
  border-color: var(--app-surface);
}

html[data-theme="dark"] .optin-popover label,
html[data-theme="dark"] .optin-popover-header h3 {
  color: var(--app-text);
}

html[data-theme="dark"] .optin-popover input,
html[data-theme="dark"] .optin-popover select {
  background: var(--app-surface-raised);
  border-color: var(--app-border);
  color: var(--app-text);
}

html[data-theme="dark"] .optin-popover form > p,
html[data-theme="dark"] .optin-feedback {
  color: var(--app-text-muted);
}

html[data-theme="dark"] .optin-feedback {
  border-color: var(--app-border);
}

html[data-theme="dark"] .state-chip.neutral {
  background: #343a40;
  color: #c2c9d1;
}

html[data-theme="dark"] .state-chip.open {
  background: #153d2b;
  color: #78dda5;
}

html[data-theme="dark"] .state-chip.closed {
  background: #4a321a;
  color: #ffc477;
}

html[data-theme="dark"] .state-chip.blocked {
  background: #4c2423;
  color: #ffaaa4;
}

html[data-theme="dark"] .internal-note {
  background: #3a321b;
  border-color: #62552a;
}

html[data-theme="dark"] .internal-note small {
  color: #d7c885;
}

html[data-theme="dark"] .message:not(.outbound) {
  background: var(--app-surface);
  border-color: var(--app-border);
  color: var(--app-text);
}

html[data-theme="dark"] .reaction,
html[data-theme="dark"] .reaction-picker {
  background: var(--app-surface-raised);
  border-color: #464c51;
}

html[data-theme="dark"] .reply-quote {
  background: var(--app-surface-raised);
  color: #b5bec9;
}

html[data-theme="dark"] .reply-preview {
  background: #20364e;
  color: #c4ddfb;
}

html[data-theme="dark"] .composer-tool {
  color: #b4bdc8;
}

html[data-theme="dark"] .composer-tool:hover,
html[data-theme="dark"] .composer-tool[aria-expanded="true"] {
  background: #20364e;
  color: #8dc2ff;
}

html[data-theme="dark"] :is(
  .notification-overview > div,
  .notification-overview > form,
  .notification-filters,
  .notification-feed
) {
  background: var(--app-surface);
  border-color: var(--app-border);
  color: var(--app-text);
}

html[data-theme="dark"] .notification-overview strong,
html[data-theme="dark"] .notification-empty h2,
html[data-theme="dark"] .notification-title-row strong {
  color: var(--app-text);
}

html[data-theme="dark"] .notification-overview small,
html[data-theme="dark"] .notification-feed header p,
html[data-theme="dark"] .notification-feed header > span,
html[data-theme="dark"] .notification-title-row time,
html[data-theme="dark"] .notification-preview,
html[data-theme="dark"] .notification-empty {
  color: var(--app-muted);
}

html[data-theme="dark"] .notification-search,
html[data-theme="dark"] .notification-filters select {
  background: var(--app-surface-raised);
  border-color: #454a4e;
  color: var(--app-text);
}

html[data-theme="dark"] .notification-search input {
  color: var(--app-text);
}

html[data-theme="dark"] .notification-state-tabs,
html[data-theme="dark"] .notification-feed header > span,
html[data-theme="dark"] .notification-read-all:disabled {
  background: var(--app-surface-raised);
  color: var(--app-muted);
}

html[data-theme="dark"] .notification-state-tabs button {
  color: #b4bdc8;
}

html[data-theme="dark"] .notification-state-tabs button.active {
  background: #20364e;
  box-shadow: none;
  color: #8dc2ff;
}

html[data-theme="dark"] .notification-feed > header,
html[data-theme="dark"] .notification-item {
  border-color: var(--app-border-soft);
}

html[data-theme="dark"] .notification-item:hover {
  background: var(--app-surface-hover);
}

html[data-theme="dark"] .notification-item.is-unread {
  background: #182a3d;
}

html[data-theme="dark"] .notification-item.is-unread:hover {
  background: #20364e;
}

html[data-theme="dark"] .notification-copy > small,
html[data-theme="dark"] .notification-empty a {
  color: #77b7ff;
}

html[data-theme="dark"] .composer textarea:disabled {
  background: #292c2e;
  color: #7f8893;
}

html[data-theme="dark"] .rate-limit-icon {
  background: #4b3918;
  color: #f4c96b;
}

html[data-theme="dark"] .pending-indicator,
html[data-theme="dark"] .section-heading > span {
  background: #20364e;
  color: #8dc2ff;
}

html[data-theme="dark"] .empty-roster {
  border-color: #4b5258;
}

html[data-theme="dark"] .danger-icon:hover {
  background: #4a2423;
  color: #ffaaa4;
}

@media (max-width: 1200px) and (min-width: 901px) {
  .suite-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .page-directory-card {
    grid-template-columns: minmax(250px, 1fr) minmax(190px, auto);
  }

  .page-connection-detail {
    grid-column: 1;
  }

  .page-directory-actions {
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  .notification-center {
    padding: 20px 16px 36px;
  }

  .notification-overview {
    grid-template-columns: 1fr 1fr;
  }

  .notification-overview > form {
    grid-column: 1 / -1;
  }

  .notification-read-all {
    justify-content: center;
    width: 100%;
  }

  .notification-filters {
    grid-template-columns: 1fr 1fr auto;
  }

  .notification-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .toast-stack {
    left: 12px;
    max-width: none;
    right: 12px;
    top: 12px;
  }

  .notification-overview,
  .notification-filters {
    grid-template-columns: 1fr;
  }

  .notification-overview > form,
  .notification-search {
    grid-column: auto;
  }

  .notification-filter-submit {
    width: 100%;
  }

  .notification-item {
    gap: 10px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    padding: 12px;
  }

  .notification-page-avatar {
    height: 40px;
    width: 40px;
  }

  .notification-arrow {
    display: none;
  }

  .notification-title-row time {
    display: none;
  }
}

@media (max-width: 900px) {
  .suite-fixed-shell,
  .suite-fixed-main,
  .suite-scroll-region {
    max-width: 100%;
    width: 100%;
  }

  .assignment-workspace,
  .assignment-page-grid {
    grid-template-columns: 1fr;
  }

  .assignment-workspace {
    padding: 20px 16px 40px;
  }

  .page-access-tools {
    grid-template-columns: 1fr 1fr;
  }

  .page-access-tools input {
    grid-column: 1 / -1;
  }

  .access-panel-header {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .access-panel-header .selection-count {
    grid-column: 2;
    justify-self: start;
  }

  .page-access-heading,
  .page-access-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .page-access-footer button {
    width: 100%;
  }

  .edit-user-grid {
    grid-template-columns: 1fr;
  }

  .edit-user-summary {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .edit-user-summary .status-pill {
    grid-column: 2;
    justify-self: start;
  }

  .form-footer-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-footer-actions a,
  .form-footer-actions button {
    width: 100%;
  }

  .user-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .user-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .suite-shell {
    grid-template-columns: 1fr;
  }

  .suite-fixed-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .suite-fixed-main {
    display: block;
    height: auto;
    min-height: calc(100svh - 62px);
    overflow: visible;
  }

  .suite-scroll-region {
    overflow: visible;
  }

  .suite-sidebar {
    align-items: center;
    display: flex;
    gap: 6px;
    min-height: 62px;
    overflow-x: auto;
    padding: 8px;
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .suite-fixed-shell .suite-sidebar {
    height: 62px;
    max-width: 100vw;
    min-height: 62px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
  }

  .suite-logo {
    flex: 0 0 auto;
    font-size: 14px;
    margin: 0 8px 0 0;
  }

  .suite-brand-row {
    flex: 0 0 auto;
    margin: 0 8px 0 0;
  }

  .suite-theme-toggle {
    height: 36px;
    width: 36px;
  }

  .crm-logo-icon { width: 27px; }
  .suite-page-switcher,
  .suite-sidebar-bottom,
  .suite-nav-section { display: none; }

  .suite-nav {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
  }

  .suite-nav a {
    flex: 0 0 auto;
    min-height: 42px;
    white-space: nowrap;
  }

  .dashboard-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-topbar .suite-primary-action { align-self: flex-start; }

  .suite-actions,
  .profile-info-grid,
  .dashboard-metrics,
  .dashboard-grid,
  .admin-page,
  .selected-page-layout,
  .main-dashboard-grid,
  .workspace-command-grid {
    grid-template-columns: 1fr;
  }

  .schedule-page,
  .approval-row,
  .facebook-connect-panel {
    grid-template-columns: 1fr;
  }

  .schedule-editor { position: static; }
  .schedule-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weekday-picker > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approval-actions { grid-template-columns: 1fr 1fr; }
  .approval-actions input { grid-column: 1 / -1; }
  .emergency-import { grid-column: auto; }

  .page-home-grid,
  .issue-detail-grid {
    grid-template-columns: 1fr;
  }

  .directory-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .directory-summary div {
    align-content: center;
    display: grid;
    gap: 2px;
    justify-items: center;
    min-width: 0;
    padding: 10px 6px;
    text-align: center;
  }

  .page-workspace-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-workspace-metrics div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #edf0f4;
  }

  .page-workspace-metrics div:nth-child(4) {
    border-top: 1px solid #edf0f4;
  }

  .page-home-grid article:last-child {
    grid-column: auto;
  }

  .directory-toolbar,
  .page-directory-card,
  .label-import form {
    align-items: stretch;
    flex-direction: column;
  }

  .page-directory-card {
    display: flex;
    overflow: hidden;
  }

  .dashboard-page,
  .profile-overview {
    max-width: 100%;
    min-width: 0;
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
  }

  .pages-directory-page,
  .page-home-overview,
  .page-profile-hero,
  #page-directory-results,
  .page-directory-list,
  .page-directory-card,
  .page-directory-card > *,
  .page-directory-identity,
  .page-directory-identity > div,
  .page-directory-stats,
  .page-connection-detail,
  .page-directory-actions,
  .label-import,
  .page-search {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .page-home-overview .cover-card {
    max-width: 100%;
    width: 100%;
  }

  .page-search input {
    min-width: 0;
  }

  .page-directory-stats {
    justify-content: space-between;
  }

  .page-directory-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .page-directory-actions form,
  .page-directory-actions a,
  .page-directory-actions button {
    width: 100%;
  }

  .page-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .panel-heading,
  .panel-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sync-monitor-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sync-monitor-controls {
    justify-content: flex-end;
    width: 100%;
  }

  .sync-monitor-controls time {
    margin-right: auto;
  }

  .sync-monitor-empty {
    align-items: flex-start;
  }

  .workspace-action-list {
    grid-template-columns: 1fr;
  }

  .workspace-action-list > a:nth-child(odd),
  .workspace-action-list > a:nth-child(even) {
    border-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .workspace-health-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-pulse > div {
    padding-left: 12px;
    padding-right: 12px;
  }

  .sync-job-table {
    min-width: 0;
    table-layout: auto;
  }

  .sync-job-table thead {
    display: none;
  }

  .sync-job-table tbody,
  .sync-job-table tr,
  .sync-job-table td {
    display: block;
    width: 100%;
  }

  .sync-job-table tr {
    border-top: 1px solid var(--dashboard-border-soft);
    display: grid;
    gap: 8px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 13px 16px;
  }

  .sync-job-table tbody tr:first-child {
    border-top: 0;
  }

  .sync-job-table td {
    border: 0;
    padding: 0;
  }

  .sync-job-table td:nth-child(2),
  .sync-job-table td:nth-child(6) {
    align-self: start;
    grid-column: 2;
    grid-row: 1;
  }

  .sync-job-table td:nth-child(6) {
    grid-row: 5;
  }

  .sync-job-table td:nth-child(3),
  .sync-job-table td:nth-child(4),
  .sync-job-table td:nth-child(5) {
    align-items: baseline;
    display: flex;
    gap: 14px;
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .sync-job-table td:nth-child(3)::before,
  .sync-job-table td:nth-child(4)::before,
  .sync-job-table td:nth-child(5)::before {
    color: var(--dashboard-muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .sync-job-table td:nth-child(3)::before { content: "Conversations"; }
  .sync-job-table td:nth-child(4)::before { content: "Last updated"; }
  .sync-job-table td:nth-child(5)::before { content: "Details"; }

  .sync-actions {
    min-height: 0;
  }

  .sync-actions > span {
    display: none;
  }

  .main-dashboard-shell .suite-user {
    flex-wrap: wrap;
  }

  .profile-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .cover-card {
    aspect-ratio: 3 / 1;
    min-height: 130px;
  }

  .profile-stats {
    padding-top: 0;
  }

  .profile-copy {
    padding-top: 26px;
  }

  .message-preview {
    align-items: flex-start;
  }

  .message-preview strong,
  .message-preview span small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .inbox-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .inbox-shell {
    height: auto;
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
  }

  .inbox-shell .suite-sidebar {
    height: 62px;
    max-width: 100vw;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
  }

  .suite-inbox-main {
    height: auto;
    max-width: 100%;
    min-height: calc(100svh - 62px);
    min-width: 0;
    overflow: visible;
    width: 100%;
  }

  .suite-inbox-main .inbox-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    width: 100%;
  }

  .conversation-list,
  .chat-panel,
  .label-panel {
    border: 0;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .conversation-list,
  .label-panel {
    max-height: 280px;
  }

  .chat-panel {
    height: calc(100svh - 62px);
    min-height: 620px;
  }

  .label-panel {
    min-height: 420px;
  }

  .composer-tools small {
    display: none;
  }

  .messaging-window {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 10px 16px;
  }
}

/* Keep the inbox workspace rules authoritative over legacy inbox layout styles. */
.suite-inbox-main .inbox-layout {
  background: #f4f6f8;
  grid-template-columns: 210px 340px minmax(360px, 1fr) 280px;
}

.suite-inbox-main .inbox-layout.all-chats-layout {
  grid-template-columns: 360px minmax(420px, 1fr) 290px;
}

.suite-inbox-main .inbox-layout.pages-horizontal {
  grid-template-columns: 340px minmax(360px, 1fr) 280px;
  grid-template-rows: 76px minmax(0, 1fr);
}

html[data-theme="dark"] .suite-inbox-main .inbox-layout,
html[data-theme="dark"] .empty-chat-panel {
  background: #141617;
}

.suite-inbox-main .chat-header {
  gap: 10px;
  padding: 12px 14px;
}

.suite-inbox-main .chat-header h1 {
  font-size: 17px;
  margin-bottom: 2px;
}

.suite-inbox-main .chat-header p {
  font-size: 12px;
}

.suite-inbox-main .header-actions {
  flex: 0 0 auto;
  gap: 6px;
}

.suite-inbox-main .header-actions .alert-button,
.suite-inbox-main .header-actions .status {
  font-size: 11px;
  padding: 6px 8px;
  white-space: nowrap;
}

@media (max-width: 1500px) {
  .suite-inbox-main .inbox-layout {
    grid-template-columns: 190px 310px minmax(330px, 1fr) 260px;
  }

  .suite-inbox-main .inbox-layout.all-chats-layout {
    grid-template-columns: 330px minmax(380px, 1fr) 270px;
  }
}

@media (max-width: 1320px) {
  .suite-inbox-main .inbox-layout {
    grid-template-columns: 190px 310px minmax(340px, 1fr);
  }

  .suite-inbox-main .inbox-layout.all-chats-layout {
    grid-template-columns: 330px minmax(420px, 1fr);
  }

  .suite-inbox-main .inbox-layout .label-panel {
    display: none;
  }

  .suite-inbox-main .inbox-layout.pages-horizontal {
    grid-template-columns: 320px minmax(380px, 1fr);
  }
}

@media (max-width: 900px) {
  .suite-inbox-main .inbox-layout,
  .suite-inbox-main .inbox-layout.all-chats-layout,
  .suite-inbox-main .inbox-layout.pages-horizontal {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(560px, 1fr);
    height: auto;
    min-height: calc(100svh - 62px);
  }

  .suite-inbox-main .inbox-layout.all-chats-layout {
    grid-template-rows: auto minmax(560px, 1fr);
  }

  .suite-inbox-main .chat-header {
    padding: 10px 12px;
  }

  .suite-inbox-main .chat-header h1 {
    font-size: 16px;
  }
}

.conversation-label-manager {
  display: grid;
  gap: 10px;
}

.applied-label-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.applied-label-chip {
  align-items: center;
  background: color-mix(in srgb, var(--label-color) 14%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--label-color) 42%, #ffffff);
  border-radius: 999px;
  color: #364153;
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
  max-width: 100%;
  min-height: 27px;
  padding: 3px 4px 3px 8px;
}

.applied-label-chip > i {
  background: var(--label-color);
  border-radius: 50%;
  flex: 0 0 auto;
  height: 7px;
  width: 7px;
}

.applied-label-chip > b {
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.applied-label-chip > button {
  align-items: center;
  background: transparent;
  color: #647084;
  display: inline-flex;
  flex: 0 0 auto;
  height: 21px;
  justify-content: center;
  padding: 0;
  width: 21px;
}

.applied-label-chip > button:hover {
  background: rgba(17, 24, 39, 0.08);
  color: #172033;
}

.applied-label-chip svg,
.label-search-control svg {
  fill: none;
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 15px;
}

.label-search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  position: relative;
}

.label-search-control .label-search-icon {
  color: #7b8798;
  left: 10px;
  pointer-events: none;
  position: absolute;
  top: 12px;
  z-index: 1;
}

.label-search-control input {
  border-radius: 6px 0 0 6px;
  height: 40px;
  padding-left: 33px;
}

.label-add-button {
  align-items: center;
  border-radius: 0 6px 6px 0;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.label-add-button:disabled {
  background: #c9d1dc;
  cursor: not-allowed;
}

.label-search-results {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.17);
  display: grid;
  grid-column: 1 / -1;
  left: 0;
  max-height: 238px;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: 44px;
  z-index: 8;
}

.label-search-results[hidden] {
  display: none;
}

.label-search-results > button {
  align-items: center;
  background: transparent;
  border-bottom: 1px solid #edf0f4;
  border-radius: 0;
  color: #172033;
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  padding: 9px 10px;
  text-align: left;
}

.label-search-results > button:hover,
.label-search-results > button.selected {
  background: #eaf3ff;
  color: #0d64d8;
}

.label-search-results > button i {
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.label-search-results > button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-search-results > button small {
  color: #7b8798;
  font-size: 10px;
}

.label-manager-status {
  color: #168653;
  font-size: 11px;
  min-height: 15px;
  margin: -4px 0 0;
}

.label-manager-status.error {
  color: #c43224;
}

html[data-theme="dark"] .applied-label-chip {
  background: color-mix(in srgb, var(--label-color) 22%, #242728);
  border-color: color-mix(in srgb, var(--label-color) 52%, #242728);
  color: #f0f2f4;
}

html[data-theme="dark"] .applied-label-chip > button {
  color: #aab2bc;
}

html[data-theme="dark"] .applied-label-chip > button:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

html[data-theme="dark"] .label-search-results {
  background: #242728;
  border-color: #454b50;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .label-search-results > button {
  border-color: #35393c;
  color: #f0f2f4;
}

html[data-theme="dark"] :is(.label-search-results > button:hover, .label-search-results > button.selected) {
  background: #102b4c;
  color: #63aaff;
}

/* Persistent workspace navigation */
.suite-sidebar-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid #dce3eb;
  color: #637083;
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.suite-sidebar-toggle svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 19px;
}

.suite-sidebar-bottom a.active {
  background: #27343f;
  color: #fff;
}

.suite-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.sidebar-collapsed .suite-sidebar {
  padding-left: 8px;
  padding-right: 8px;
}

.sidebar-collapsed .suite-brand-row {
  justify-content: center;
  margin-inline: 0;
}

.sidebar-collapsed .suite-logo span,
.sidebar-collapsed .suite-page-switcher,
.sidebar-collapsed .suite-global-controls > :not(.suite-sidebar-toggle),
.sidebar-collapsed .suite-nav-section,
.sidebar-collapsed .suite-nav a > :not(svg, .nav-count, .nav-dot),
.sidebar-collapsed .suite-sidebar-bottom a > :not(svg),
.sidebar-collapsed .suite-sidebar-bottom kbd {
  display: none;
}

.sidebar-collapsed .suite-logo {
  display: none;
}

.sidebar-collapsed .suite-nav a,
.sidebar-collapsed .suite-sidebar-bottom a {
  font-size: 0;
  justify-content: center;
  padding: 0;
}

.sidebar-collapsed .suite-nav a svg,
.sidebar-collapsed .suite-sidebar-bottom a svg {
  height: 22px;
  width: 22px;
}

.sidebar-collapsed .nav-count {
  position: absolute;
  right: 1px;
  top: 1px;
}

.sidebar-collapsed .suite-sidebar-toggle svg path:last-child {
  transform: rotate(180deg);
  transform-origin: center;
}

html[data-theme="dark"] .suite-sidebar-toggle {
  border-color: var(--app-border);
  color: var(--app-muted);
}

html[data-theme="dark"] .suite-sidebar-bottom a.active {
  background: #0d5aa7;
  color: #fff;
}

.suite-main.suite-fixed-main {
  overflow: hidden;
}

@media (max-width: 900px) {
  .suite-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .suite-shell:not(.sidebar-expanded-mobile) .suite-sidebar {
    padding-left: 8px;
    padding-right: 8px;
  }

  .suite-shell:not(.sidebar-expanded-mobile) .suite-logo,
  .suite-shell:not(.sidebar-expanded-mobile) .suite-page-switcher,
  .suite-shell:not(.sidebar-expanded-mobile) .suite-global-controls > :not(.suite-sidebar-toggle),
  .suite-shell:not(.sidebar-expanded-mobile) .suite-nav-section,
  .suite-shell:not(.sidebar-expanded-mobile) .suite-nav a > :not(svg, .nav-count, .nav-dot),
  .suite-shell:not(.sidebar-expanded-mobile) .suite-sidebar-bottom a > :not(svg) {
    display: none;
  }
}

/* Inbox clarity and realtime delivery states */
.suite-global-controls {
  align-items: center;
  display: flex;
  gap: 4px;
}

.suite-global-controls > button {
  height: 34px;
  width: 34px;
}

.suite-alert-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid #dce3eb;
  color: #637083;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 38px;
}

.suite-alert-toggle svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 19px;
}

.suite-alert-toggle i {
  background: #98a2b1;
  border: 2px solid #ffffff;
  border-radius: 50%;
  bottom: 6px;
  height: 8px;
  position: absolute;
  right: 6px;
  width: 8px;
}

.suite-alert-toggle:hover {
  background: #edf5ff;
  border-color: #9bc9ff;
  color: #1877f2;
}

.suite-alert-toggle.enabled {
  background: #eaf8f1;
  border-color: #9bd8b8;
  color: #12804d;
}

.suite-alert-toggle.enabled i {
  background: #16a465;
}

.conversation-browser-counts {
  align-items: center;
  display: flex;
  gap: 7px;
}

.unread-total {
  align-items: center;
  background: #e32636;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  min-height: 25px;
  padding: 3px 8px;
}

.unread-total[hidden] {
  display: none;
}

.unread-total svg {
  fill: none;
  height: 14px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 14px;
}

.suite-inbox-main .inbox-layout.tools-collapsed {
  grid-template-columns: 210px 340px minmax(430px, 1fr);
}

.suite-inbox-main .inbox-layout.all-chats-layout.tools-collapsed {
  grid-template-columns: 360px minmax(480px, 1fr);
}

.suite-inbox-main .inbox-layout.pages-horizontal.tools-collapsed {
  grid-template-columns: 340px minmax(480px, 1fr);
}

.inbox-layout.tools-collapsed .label-panel {
  display: none;
}

.customer-tools-toggle svg,
.customer-tools-close svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.inspector-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.inspector-header > div {
  min-width: 0;
}

.messages {
  background: #f6f7f9;
  gap: 8px;
  padding: 14px clamp(14px, 2vw, 28px);
}

.message {
  border-color: #dde3ea;
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.03);
  font-size: 13px;
  line-height: 1.45;
  max-width: min(620px, 74%);
  padding: 9px 11px 7px;
}

.message.outbound {
  background: #1769e0;
  border-color: #1769e0;
  border-radius: 14px 14px 4px 14px;
}

.message p {
  margin-bottom: 5px;
}

.message-date-divider {
  align-items: center;
  color: #748094;
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 12px;
  margin: 9px 0 5px;
  text-align: center;
  width: 100%;
}

.message-date-divider::before,
.message-date-divider::after {
  border-top: 1px solid #d9dfe7;
  content: "";
  flex: 1 1 auto;
}

.message-date-divider time {
  flex: 0 0 auto;
}

.message.image-only {
  max-width: min(330px, 74%);
  padding: 6px;
}

.message.image-only .message-image-link {
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  cursor: zoom-in;
  margin: 0 0 6px;
  overflow: hidden;
  padding: 5px;
}

.message.image-only .message-image {
  border-radius: 5px;
  max-height: 420px;
}

.message.image-only > small,
.message.image-only > .message-actions {
  margin-left: 5px;
  margin-right: 5px;
}

.message small {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 10px;
  gap: 5px;
  line-height: 1.3;
}

.receipt {
  align-items: center;
  background: #edf1f5;
  border: 1px solid #d7dee7;
  border-radius: 999px;
  color: #536174;
  display: inline-flex;
  font-size: 9px;
  font-weight: 800;
  gap: 3px;
  line-height: 1;
  margin-left: 2px;
  min-height: 20px;
  padding: 3px 6px;
}

.message.outbound .receipt {
  background: rgba(7, 35, 86, 0.28);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

.message.outbound .receipt.read {
  background: #ffffff;
  border-color: #ffffff;
  color: #075fc7;
}

.message.outbound .receipt.failed {
  background: #fff1f0;
  border-color: #ffc2bd;
  color: #a6261c;
}

.message.outbound .receipt.pending [data-receipt-icon],
.message.outbound .receipt.sending [data-receipt-icon] {
  animation: receipt-pulse 1.1s ease-in-out infinite;
}

@keyframes receipt-pulse {
  50% { opacity: 0.42; }
}

.message-actions {
  margin-top: 5px;
}

.composer-dock {
  box-shadow: 0 -8px 22px rgba(17, 24, 39, 0.04);
}

.composer {
  padding-bottom: 9px;
}

.composer textarea {
  border-radius: 8px;
}

html[data-theme="dark"] .suite-alert-toggle {
  background: var(--app-surface-raised);
  border-color: var(--app-border);
  color: var(--app-muted);
}

html[data-theme="dark"] .suite-alert-toggle i {
  border-color: var(--app-surface);
}

html[data-theme="dark"] .suite-alert-toggle.enabled {
  background: #153d2c;
  border-color: #287c55;
  color: #7ee2ad;
}

html[data-theme="dark"] .messages {
  background: #151718;
}

html[data-theme="dark"] .message-date-divider {
  color: #929ba8;
}

html[data-theme="dark"] .message-date-divider::before,
html[data-theme="dark"] .message-date-divider::after {
  border-color: #34383c;
}

html[data-theme="dark"] .message {
  background: #232628;
  border-color: #353a3e;
  box-shadow: none;
}

html[data-theme="dark"] .message.image-only .message-image-link {
  background: #111315;
  border-color: #3a3f43;
}

html[data-theme="dark"] .message.outbound {
  background: #1264d7;
  border-color: #1264d7;
}

@media (max-width: 1500px) {
  .suite-inbox-main .inbox-layout.tools-collapsed {
    grid-template-columns: 190px 310px minmax(430px, 1fr);
  }

  .suite-inbox-main .inbox-layout.all-chats-layout.tools-collapsed {
    grid-template-columns: 330px minmax(460px, 1fr);
  }
}

@media (max-width: 1320px) {
  .suite-inbox-main .inbox-layout.tools-open .label-panel {
    bottom: 0;
    box-shadow: -14px 0 36px rgba(17, 24, 39, 0.18);
    display: grid;
    position: absolute;
    right: 0;
    top: 0;
    width: min(310px, calc(100vw - 20px));
    z-index: 20;
  }

  .suite-inbox-main .inbox-layout {
    position: relative;
  }
}

@media (max-width: 900px) {
  .suite-inbox-main .inbox-layout.tools-collapsed,
  .suite-inbox-main .inbox-layout.all-chats-layout.tools-collapsed,
  .suite-inbox-main .inbox-layout.pages-horizontal.tools-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .message {
    max-width: 88%;
  }

  .receipt [data-receipt-label] {
    display: none;
  }
}
