/*
 * Reference-aligned inbox workspace.
 * This layer intentionally leaves the global Klaxify navigation and top bar alone.
 */

.inbox-app-shell .helpdesk-inbox {
  grid-template-columns: clamp(340px, 22vw, 400px) minmax(580px, 1fr) clamp(390px, 25vw, 450px);
  gap: 5px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.inbox-app-shell .conversation-queue,
.inbox-app-shell .ticket-workspace,
.inbox-app-shell .customer-context {
  border: 1px solid rgba(192, 204, 225, .62);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(249, 251, 255, .82));
  box-shadow:
    0 14px 36px rgba(45, 61, 101, .07),
    inset 0 1px 0 rgba(255, 255, 255, .98);
}

/* Conversation queue */

.inbox-app-shell .queue-header {
  min-height: 60px;
  padding: 15px 15px 8px 18px;
}

.inbox-app-shell .queue-header h1 {
  font-size: 23px;
}

.inbox-app-shell .queue-controls {
  gap: 7px;
}

.inbox-app-shell .queue-controls button,
.inbox-app-shell .queue-controls .queue-view-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-color: rgba(127, 145, 178, .22);
  border-radius: 9px;
  color: #233451;
  font-size: 17px;
}

.inbox-app-shell .queue-search {
  min-height: 42px;
  margin: 0 12px 8px;
  border-color: rgba(119, 137, 168, .24);
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
}

.inbox-app-shell .queue-search input {
  font-size: 14px;
}

.inbox-app-shell .queue-search kbd {
  display: none;
}

.inbox-app-shell .queue-list {
  padding: 0 8px 4px;
}

.inbox-app-shell .queue-select-row {
  display: block !important;
  grid-template-columns: none !important;
  position: relative;
}

.inbox-app-shell .queue-select-row .queue-item {
  width: 100%;
}

.inbox-app-shell .queue-person {
  min-width: 0;
}

.inbox-app-shell .queue-person strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-app-shell .queue-select-row > .queue-select {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 4px;
  width: 16px;
  height: 16px;
  margin: 0;
  opacity: 0;
  transition: opacity .16s ease;
}

.inbox-app-shell .queue-select-row:hover > .queue-select,
.inbox-app-shell .queue-select-row > .queue-select:checked {
  opacity: 1;
}

.inbox-app-shell .queue-item {
  min-height: 96px;
  margin: 0;
  padding: 13px 14px;
  border-radius: 11px;
}

.inbox-app-shell .queue-item.active {
  margin: 0;
  border-color: #5c87ff;
  background:
    radial-gradient(circle at 90% 30%, rgba(103, 175, 255, .12), transparent 36%),
    linear-gradient(145deg, rgba(244, 248, 255, .98), rgba(249, 250, 255, .93));
  box-shadow: 0 7px 18px rgba(47, 82, 177, .08);
}

.inbox-app-shell .queue-avatar-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  align-self: flex-start;
}

.inbox-app-shell img.queue-avatar {
  width: 48px;
  height: 48px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.inbox-app-shell .queue-platform-badge {
  position: absolute;
  right: -1px;
  bottom: -2px;
  width: auto;
  height: auto;
  max-width: 19px;
  max-height: 19px;
  padding: 0;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  object-position: center;
  filter:
    drop-shadow(1px 0 0 #fff)
    drop-shadow(-1px 0 0 #fff)
    drop-shadow(0 1px 0 #fff)
    drop-shadow(0 -1px 0 #fff);
  box-shadow: none;
}

.inbox-app-shell .queue-person strong {
  color: #15223a;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.01em;
}

.inbox-app-shell .queue-person time {
  font-size: 12.5px;
}

.inbox-app-shell .queue-subject {
  max-width: 100%;
  overflow: hidden;
  font-size: 14.75px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-app-shell .queue-meta {
  gap: 5px;
  margin-top: 4px;
}

.inbox-app-shell .queue-meta em {
  display: none;
}

.inbox-app-shell .queue-meta em.channel-email { background: #3d7cff; }
.inbox-app-shell .queue-meta em.channel-instagram { background: linear-gradient(135deg, #ff9a32, #ef2d86 55%, #7448ff); }
.inbox-app-shell .queue-meta em.channel-facebook { background: #1877f2; border-radius: 50%; }
.inbox-app-shell .queue-meta em.channel-chat { background: #24b878; border-radius: 50%; }

.inbox-app-shell .queue-meta i {
  padding: 4px 9px;
  border-radius: 6px;
  background: #eaf2ff;
  color: #2b5db8;
  font-size: 11.5px;
  font-weight: 650;
}

.inbox-app-shell .queue-meta .queue-vip {
  background: #f1eaff;
  color: #7e56c6;
}

.inbox-app-shell .queue-meta .queue-risk {
  display: none;
}

.inbox-app-shell .queue-unread {
  top: 38px;
  right: 10px;
  width: 8px;
  min-width: 8px;
  height: 8px;
  background: #146dff;
}

.inbox-app-shell .sample-data-control {
  display: none;
}

.inbox-app-shell .queue-pagination {
  min-height: 42px;
  margin: 4px 12px 9px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  border: 1px solid rgba(126, 144, 176, .16);
  border-radius: 11px;
  background: rgba(255, 255, 255, .58);
  color: #8290a6;
  font-size: 11px;
}

.inbox-app-shell .queue-pagination > div {
  display: flex;
  gap: 12px;
}

.inbox-app-shell .queue-pagination button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #6c7c96;
  font-size: 20px;
}

/* Conversation workspace */

.inbox-app-shell .conversation-tabbar {
  height: 46px;
  min-height: 46px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 6px 8px 0;
  border-bottom: 1px solid rgba(128, 146, 178, .16);
  background: rgba(252, 253, 255, .70);
}

.inbox-app-shell .conversation-tabbar a,
.inbox-app-shell .conversation-tabbar button {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(119, 139, 174, .18);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: rgba(248, 250, 255, .78);
  color: #273750;
  font-size: 13px;
  font-weight: 780;
}

.inbox-app-shell .conversation-tabbar a.active {
  min-width: 178px;
  max-width: 58%;
  justify-content: space-between;
  gap: 14px;
  padding: 0 12px 0 14px;
  border-color: #4f7fff;
  background: #fff;
  box-shadow: 0 -4px 13px rgba(63, 101, 215, .07);
}

.inbox-app-shell .conversation-tabbar a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-app-shell .conversation-tabbar a b {
  color: #8090a7;
  font-size: 18px;
  font-weight: 500;
}

.inbox-app-shell .conversation-tabbar button {
  width: 36px;
  border-bottom: 1px solid rgba(119, 139, 174, .18);
  border-radius: 9px;
  font-size: 20px;
  font-weight: 500;
}

.inbox-app-shell .ticket-header {
  min-height: 94px;
  padding: 11px 17px 10px 20px;
  background: rgba(255, 255, 255, .56);
}

.inbox-app-shell .ticket-header h2 {
  margin-bottom: 9px;
  font-size: 20px;
}

.inbox-app-shell .ticket-header p {
  gap: 8px;
}

.inbox-app-shell .ticket-header .ticket-id-chip,
.inbox-app-shell .ticket-header .ticket-customer-chip,
.inbox-app-shell .ticket-header .service-target {
  display: none !important;
}

.inbox-app-shell .ticket-header .ticket-status-pill {
  min-height: 32px;
  padding: 0 12px;
  border-color: #bfe9db;
  background: #ebfaf5;
  color: #188562;
  font-size: 12px;
  font-weight: 750;
}

.inbox-app-shell .ticket-order-chip {
  min-height: 32px;
  padding: 0 12px;
  border-color: rgba(116, 133, 166, .19);
  background: rgba(255, 255, 255, .86);
  color: #647187;
  font-size: 12px;
}

.inbox-app-shell .ticket-actions {
  gap: 1px;
}

.inbox-app-shell .ticket-actions > button,
.inbox-app-shell .ticket-actions > form > button,
.inbox-app-shell .ticket-actions .ticket-close-view,
.inbox-app-shell .ticket-actions .menu-anchor > button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #3b4c67;
  font-size: 18px;
}

.inbox-app-shell .ticket-actions .context-panel-toggle {
  display: none;
}

.inbox-app-shell .helpdesk-inbox.context-panel-collapsed .ticket-actions .context-panel-toggle {
  display: grid;
}

.inbox-app-shell .ticket-actions .menu-anchor > button {
  font-size: 14px;
}

.inbox-app-shell .ticket-scroll {
  padding: 17px 20px 20px;
  background:
    radial-gradient(circle at 78% 30%, rgba(232, 240, 255, .50), transparent 38%),
    rgba(253, 254, 255, .57);
}

.inbox-app-shell .customer-message-card {
  position: relative;
  width: min(68%, 530px);
  max-width: none;
  min-height: 72px;
  margin: 0 0 17px;
  padding: 0 0 0 52px;
  border: 1px solid rgba(114, 136, 175, .24);
  border-bottom: 0;
  background: rgba(255, 255, 255, .64);
  box-shadow: 0 -2px 8px rgba(61, 82, 128, .045);
}

.inbox-app-shell .customer-message-card header {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  display: block;
}

.inbox-app-shell .customer-message-card header > span,
.inbox-app-shell .customer-message-card header > time {
  display: none;
}

.inbox-app-shell .customer-message-card p {
  margin: 0;
  padding: 14px 16px 12px;
  border: 1px solid rgba(126, 144, 176, .22);
  border-radius: 13px 13px 13px 5px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 5px 15px rgba(37, 52, 82, .04);
  font-size: 15.5px;
  line-height: 1.55;
}

.inbox-app-shell .conversation-reply-card {
  position: relative;
  width: min(64%, 500px);
  min-height: 72px;
  margin: 0 50px 18px auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.inbox-app-shell .conversation-reply-card header {
  position: absolute;
  top: 1px;
  right: -49px;
  width: 40px;
}

.inbox-app-shell .conversation-reply-card header > span:not(.conversation-reply-avatar),
.inbox-app-shell .conversation-reply-card header > time {
  display: none;
}

.inbox-app-shell .conversation-reply-card .conversation-reply-avatar {
  width: 38px;
  height: 38px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e7efff;
  color: #2858c5;
  box-shadow: 0 4px 12px rgba(36, 55, 96, .12);
}

.inbox-app-shell .conversation-reply-card > p {
  margin: 0;
  padding: 14px 16px 12px;
  border: 1px solid #bdd6fb;
  border-radius: 13px 13px 5px 13px;
  background: linear-gradient(145deg, #eaf4ff, #f3f8ff);
  color: #243650;
  font-size: 15.5px;
  line-height: 1.55;
}

.inbox-app-shell .conversation-reply-card > footer {
  display: none;
}

/* klax IQ recommendation */

.inbox-app-shell .ticket-workspace > .ai-guidance-card {
  position: relative;
  min-height: 142px;
  margin: 7px 23px 9px;
  padding: 16px 17px 14px 64px;
  border-color: #e9c653;
  border-radius: 13px;
  background: linear-gradient(145deg, #fffaf0, #fffef8);
  box-shadow: none;
}

.inbox-app-shell .ai-guidance-card > header {
  min-height: 28px;
  align-items: flex-start;
}

.inbox-app-shell .ai-guidance-card > header > span:not(.ai-spark) {
  display: grid;
  gap: 4px;
}

.inbox-app-shell .ai-guidance-card .ai-spark {
  position: absolute;
  top: 17px;
  left: 15px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 31px;
  box-shadow: none;
}

.inbox-app-shell .ai-guidance-card > header strong {
  display: block;
  color: #1559cc;
  font-size: 15px;
}

.inbox-app-shell .ai-guidance-card > header small {
  display: block;
  max-width: 440px;
  margin-top: 8px;
  color: #536178;
  font-size: 13.5px;
  line-height: 1.5;
}

.inbox-app-shell .ai-reference-confidence {
  margin-left: auto;
  color: #5e6c82;
  font-size: 11.5px;
  font-style: normal;
  white-space: nowrap;
}

.inbox-app-shell .ai-reference-confidence b {
  color: #24a36f;
  font-size: 14px;
}

.inbox-app-shell .ai-response-preview {
  min-height: 35px;
  padding: 3px 0 0;
}

.inbox-app-shell .ai-guidance-card .ai-response-copy {
  max-height: 38px;
  color: #48566c;
  font-size: 14px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
}

.inbox-app-shell .ai-response-view,
.inbox-app-shell .resolution-contract-summary,
.inbox-app-shell .ai-guidance-card > footer > .ai-confidence,
.inbox-app-shell .ai-guidance-card > footer > .ai-draft-state,
.inbox-app-shell .ai-guidance-card .regenerate-button {
  display: none;
}

.inbox-app-shell .ai-guidance-card > footer {
  margin-top: 3px;
  justify-content: flex-start;
}

.inbox-app-shell .ai-guidance-card > footer > div {
  gap: 7px;
}

.inbox-app-shell .ai-guidance-card .send-ai-button,
.inbox-app-shell .ai-guidance-card .ai-modify-button {
  min-width: 132px;
  min-height: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 12.5px;
}

.inbox-app-shell .ai-guidance-card .ai-modify-button {
  border: 1px solid #8ab3f5;
  background: #fff;
  color: #1461d5;
}

.inbox-app-shell .reference-action-pills {
  min-height: 48px;
  margin: 0 23px 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow-x: auto;
}

.inbox-app-shell .reference-action-pills .context-action-pill {
  min-height: 42px;
  height: 42px;
  padding: 0 17px;
  flex: 0 0 auto;
  border: 1px solid #c7d8f8;
  border-radius: 10px;
  background: #fff;
  color: #165bc5;
  font-size: 13.5px;
  font-weight: 720;
  box-shadow: 0 3px 9px rgba(42, 73, 154, .035);
}

.inbox-app-shell .reference-action-pills .context-action-pill span {
  margin-right: 8px;
  color: #2e72ff;
  font-size: 17px;
  line-height: 1;
}

/* Reply composer */

.inbox-app-shell .ticket-workspace > .reply-composer {
  min-height: 192px;
  margin: 0 13px 10px;
  border-radius: 13px;
  box-shadow: none;
}

.inbox-app-shell .composer-tabs {
  min-height: 43px;
  height: 43px;
  padding: 0 13px;
  gap: 4px;
  flex-wrap: nowrap;
}

.inbox-app-shell .composer-tabs > button {
  height: 42px;
  padding: 0 12px;
  font-size: 12.5px;
}

.inbox-app-shell .composer-tabs .ai-assist-tab {
  margin-left: auto;
}

.inbox-app-shell .reply-composer > textarea {
  height: 102px;
  min-height: 102px;
  padding: 15px 16px;
  font-size: 15.5px;
  line-height: 1.52;
}

.inbox-app-shell .composer-footer {
  min-height: 61px;
  padding: 7px 11px;
}

.inbox-app-shell .composer-footer button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  font-size: 19px;
}

.inbox-app-shell .composer-footer .composer-send {
  min-width: 111px;
  height: 39px;
  border-color: #2457e6;
  background: linear-gradient(135deg, #2f64ff, #2452e6);
  color: #fff;
  font-size: 12.5px;
  font-weight: 760;
  text-shadow: 0 1px 1px rgba(14, 39, 109, .18);
}

.inbox-app-shell .composer-footer .composer-send-options {
  height: 39px;
  color: #53627a;
}

.inbox-app-shell .composer-footer .composer-send:hover,
.inbox-app-shell .composer-footer .composer-send:focus-visible {
  background: linear-gradient(135deg, #255df8, #1f49d3);
  color: #fff;
}

/* App-level message dialogs are portaled out of the clipped conversation frame. */
.inbox-app-shell > .app-dialog[data-dialog-portal="app"] {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 500;
  padding: clamp(18px, 6vh, 64px) 20px 20px;
  place-items: start center;
  overflow-y: auto;
}

.inbox-app-shell > .app-dialog[data-dialog-portal="app"] > section {
  max-height: calc(100dvh - clamp(38px, 12vh, 128px));
}

/* Comfortable app-scale typography for message and klax IQ dialogs. */
.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] > section {
  width: min(720px, calc(100vw - 36px));
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] section > header {
  min-height: 78px;
  padding: 15px 20px;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] section > header > div {
  gap: 13px;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] section > header > div > span {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 19px;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] header small {
  font-size: 12px;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] header h3 {
  margin-top: 4px;
  font-size: 21px;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] header > button {
  width: 42px;
  height: 42px;
  font-size: 25px;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] .action-explainer-body {
  gap: 15px;
  padding: 21px;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] .action-explainer-body > p {
  font-size: 16.5px;
  line-height: 1.55;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] .action-explainer-body > div {
  gap: 7px;
  padding: 14px 15px;
  border-radius: 12px;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] .action-explainer-body > div > strong {
  font-size: 12.5px;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] .action-explainer-body > div > span:not(.action-policy) {
  font-size: 15.5px;
  line-height: 1.55;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] .action-policy {
  width: max-content;
  min-height: 30px;
  padding: 5px 10px;
  font-size: 14px;
  line-height: 1.35;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] .action-explainer-body > small {
  font-size: 13.5px;
  line-height: 1.55;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] section > footer {
  min-height: 72px;
  padding: 13px 20px;
}

.inbox-app-shell > .action-explainer-dialog[data-dialog-portal="app"] footer button {
  min-height: 44px;
  padding-inline: 17px;
  border-radius: 10px;
  font-size: 14.5px;
}

.inbox-app-shell > .ai-recommendation-dialog[data-dialog-portal="app"] header small {
  font-size: 11px;
}

.inbox-app-shell > .ai-recommendation-dialog[data-dialog-portal="app"] header h3 {
  font-size: 20px;
}

.inbox-app-shell > .ai-recommendation-dialog[data-dialog-portal="app"] .ai-recommendation-body > small {
  font-size: 13px;
}

.inbox-app-shell > .ai-recommendation-dialog[data-dialog-portal="app"] footer button {
  min-height: 44px;
  padding-inline: 17px;
  font-size: 14px;
}

/* Customer and Shopify context */

.inbox-app-shell .customer-context {
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}

.inbox-app-shell .customer-context > * {
  flex: 0 0 auto;
}

.inbox-app-shell .context-panel-title {
  position: static;
  top: auto;
  min-height: 54px;
  flex: 0 0 auto;
  padding: 0 16px 0 18px;
  border-bottom: 0;
  background: transparent;
}

.inbox-app-shell .context-panel-title strong {
  font-size: 18px;
}

.inbox-app-shell .context-panel-title a {
  display: none;
}

.inbox-app-shell .context-panel-title button {
  background: transparent;
}

.inbox-app-shell .customer-context > .customer-summary {
  order: 1;
  margin: 0 12px 8px;
  height: auto !important;
  min-height: 174px;
  padding: 10px 10px 12px;
  border: 0;
  background: transparent;
  overflow: visible !important;
  box-shadow: none;
}

.inbox-app-shell .customer-name > img {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
}

.inbox-app-shell .customer-name h3 {
  font-size: 18px;
  letter-spacing: -.01em;
}

.inbox-app-shell .customer-name p {
  font-size: 13.25px;
  line-height: 1.48;
}

.inbox-app-shell .customer-shopify-tags {
  display: none;
}

.inbox-app-shell .verified-customer {
  color: #5f6f84 !important;
  font-weight: 650;
}

.inbox-app-shell .verified-customer i {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  margin-right: 5px;
  border-radius: 50%;
  background: #1eb682;
  color: #fff;
  font-size: 9px;
  font-style: normal;
}

.inbox-app-shell .customer-stats {
  display: none;
}

.inbox-app-shell .customer-memory-chips {
  margin-top: 11px;
  gap: 6px;
}

.inbox-app-shell .customer-memory-chips > a,
.inbox-app-shell .customer-memory-chips > span {
  min-height: 31px;
  padding: 5px 10px;
  border: 1px solid #d9e2f5;
  border-radius: 8px;
  background: #f7f9ff;
  color: #315db5;
  font-size: 11.5px;
}

.inbox-app-shell .customer-memory-chips > :nth-child(2) {
  border-color: #f2d7e6;
  background: #fff5fa;
  color: #b14680;
}

.inbox-app-shell .customer-memory-chips > :nth-child(3) {
  border-color: #d6e7f8;
  background: #f6fbff;
  color: #315f9b;
}

.inbox-app-shell .customer-context > .ai-insights-card {
  order: 2;
  margin: 0 12px 8px;
  position: relative;
  padding: 15px;
  border-color: rgba(133, 116, 215, .16);
  border-radius: 12px;
  background: linear-gradient(145deg, #fbfaff, #f7f5ff);
  box-shadow: none;
}

.inbox-app-shell .ai-insights-card header h3 {
  font-size: 14px;
}

.inbox-app-shell .ai-insights-card .intelligence-summary {
  margin: 10px 0 0;
  padding: 10px 11px;
  border: 1px solid rgba(125, 104, 211, .13);
  border-radius: 9px;
  background: rgba(255, 255, 255, .54);
  color: #44527a;
  font-size: 12.75px;
  line-height: 1.5;
}

.inbox-app-shell .ai-insights-card > dl,
.inbox-app-shell .ai-insights-card .suggested-tag-list {
  display: none;
}

.inbox-app-shell .customer-context > .shopify-panel-orders,
.inbox-app-shell .customer-context > .shopify-order-card {
  order: 3;
  margin: 0 12px 8px;
  border-radius: 12px;
  box-shadow: none;
}

.inbox-app-shell .shopify-order-card {
  padding: 12px;
}

.inbox-app-shell .shopify-order-card > header {
  min-height: 35px;
}

.inbox-app-shell .shopify-order-card > header h3 {
  font-size: 14px;
}

.inbox-app-shell .shopify-order-card > dl {
  display: none;
}

.inbox-app-shell .shopify-order-card .order-product {
  margin-top: 7px;
  padding: 8px;
  border-top: 1px solid rgba(123, 142, 174, .14);
  border-bottom: 1px solid rgba(123, 142, 174, .14);
}

.inbox-app-shell .shopify-order-card .order-tracking {
  margin-top: 7px;
  font-size: 10.5px;
}

.inbox-app-shell .shopify-panel-heading {
  min-height: 43px;
}

.inbox-app-shell .shopify-panel-heading > button {
  display: none;
}

.inbox-app-shell .shopify-panel-order {
  border: 0;
  border-radius: 0;
}

.inbox-app-shell .shopify-panel-order > summary {
  padding: 9px 10px;
}

.inbox-app-shell .shopify-order-inline {
  display: flex;
  flex-direction: column;
}

.inbox-app-shell .shopify-inline-actions {
  order: 99;
  position: sticky;
  bottom: 0;
  z-index: 2;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 8px;
  background: rgba(255, 255, 255, .92);
}

.inbox-app-shell .shopify-inline-actions button {
  min-height: 36px;
}

.inbox-app-shell .shopify-fulfillment-tracker {
  margin: 9px 0 4px;
  border-radius: 10px;
}

.inbox-app-shell .shopify-fulfillment-tracker > header {
  min-height: 42px;
  padding: 8px 9px;
}

.inbox-app-shell .fulfillment-tracker-body {
  grid-template-columns: minmax(0, 1fr);
  padding: 10px;
}

.inbox-app-shell .fulfillment-tracker-body li {
  min-height: 38px;
}

.inbox-app-shell .fulfillment-tracker-body aside {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 9px;
}

.inbox-app-shell .fulfillment-tracker-body aside strong {
  margin: 0;
}

.inbox-app-shell .customer-context > .customer-timeline {
  order: 4;
  display: block;
  margin: 0 12px 8px;
}

.inbox-app-shell .customer-context > .customer-memory-card {
  order: 5;
  display: block;
  margin: 0 12px 8px;
}

.inbox-app-shell .customer-context > .csat-conversation-card,
.inbox-app-shell .customer-context > .inbox-review-card {
  order: 6;
}

@media (min-width: 1700px) {
  .inbox-app-shell .helpdesk-inbox {
    grid-template-columns: 410px minmax(680px, 1fr) 460px;
  }

  .inbox-app-shell .queue-person strong { font-size: 17px; }
  .inbox-app-shell .queue-subject,
  .inbox-app-shell .customer-message-card p,
  .inbox-app-shell .conversation-reply-card > p,
  .inbox-app-shell .reply-composer > textarea { font-size: 16px; }
}

@media (max-width: 1480px) {
  .inbox-app-shell .helpdesk-inbox {
    grid-template-columns: 330px minmax(535px, 1fr) 370px;
  }

  .inbox-app-shell .ai-guidance-card > header small {
    max-width: 350px;
  }
}

@media (max-width: 1500px) {
  .inbox-app-shell .helpdesk-inbox {
    grid-template-columns: 300px minmax(510px, 1fr);
  }

  .inbox-app-shell .ticket-actions .context-panel-toggle {
    display: grid;
  }

  .inbox-app-shell .customer-context {
    position: fixed;
    top: 84px;
    right: 12px;
    bottom: 12px;
    z-index: 38;
    width: min(420px, calc(100vw - 94px));
    box-shadow: -18px 20px 55px rgba(25, 39, 70, .18);
  }
}

html[data-theme="dark"] .inbox-app-shell .conversation-tabbar,
html[data-theme="dark"] .inbox-app-shell .conversation-tabbar a.active,
html[data-theme="dark"] .inbox-app-shell .queue-pagination,
html[data-theme="dark"] .inbox-app-shell .reference-action-pills .context-action-pill {
  border-color: #30435f;
  background: #15243a;
  color: #dce7f7;
}

html[data-theme="dark"] .inbox-app-shell .customer-message-card p,
html[data-theme="dark"] .inbox-app-shell .conversation-reply-card > p {
  border-color: #334862;
  background: #172941;
  color: #e4ebf5;
}

/* Desktop-app refinement pass */
.inbox-app-shell,
.inbox-app-shell * {
  scrollbar-width: none;
}

.inbox-app-shell::-webkit-scrollbar,
.inbox-app-shell *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.inbox-app-shell.show-inbox-scrollbars,
.inbox-app-shell.show-inbox-scrollbars * {
  scrollbar-width: thin;
}

.inbox-app-shell.show-inbox-scrollbars::-webkit-scrollbar,
.inbox-app-shell.show-inbox-scrollbars *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  display: block;
}

.inbox-app-shell.show-inbox-scrollbars::-webkit-scrollbar-thumb,
.inbox-app-shell.show-inbox-scrollbars *::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(97, 116, 151, .38);
  background-clip: padding-box;
}

.inbox-app-shell .helpdesk-sidebar.collapsed {
  width: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.inbox-app-shell:has(.helpdesk-sidebar.collapsed) #app-view {
  padding-left: 18px;
}

.inbox-app-shell .queue-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px 10px 17px;
}

.inbox-app-shell .queue-header h1 {
  margin: 0;
  align-self: center;
  line-height: 42px;
}

.inbox-app-shell .queue-controls {
  display: flex;
  align-items: center;
  align-self: center;
  justify-self: end;
  gap: 8px;
  height: 42px;
}

.inbox-app-shell .queue-controls .queue-control-icon {
  width: 20px;
  height: 20px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inbox-app-shell .queue-controls .menu-anchor {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.inbox-app-shell .queue-controls button,
.inbox-app-shell .queue-controls .queue-view-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  border: 1px solid rgba(117, 138, 178, .24);
  border-radius: 11px;
  background: rgba(255, 255, 255, .70);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  font-size: 19px;
}

.inbox-app-shell .queue-menu,
.inbox-app-shell .ticket-menu,
.inbox-app-shell .composer-tool-popover,
.inbox-app-shell .macro-picker,
.inbox-app-shell .mention-picker {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 16px;
  background: rgba(250, 252, 255, .88);
  box-shadow: 0 20px 52px rgba(31, 48, 83, .20), inset 0 1px 0 rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
}

.inbox-app-shell .queue-menu {
  top: calc(100% + 10px);
  min-width: 270px;
}

.inbox-app-shell .queue-filter-menu {
  width: 250px;
}

.inbox-app-shell .queue-menu p,
.inbox-app-shell .ticket-menu p {
  margin: 5px 10px 8px;
  font-size: 11.5px;
}

.inbox-app-shell .queue-menu a,
.inbox-app-shell .queue-menu > button,
.inbox-app-shell .ticket-menu a,
.inbox-app-shell .ticket-menu form > button {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
}

.inbox-app-shell .queue-menu a b {
  font-size: 12px;
}

.inbox-app-shell .queue-meta i {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid #d8e0ee;
  border-radius: 7px;
  background: rgba(255, 255, 255, .84);
  color: #44546d;
  font-size: 11.5px;
  font-weight: 670;
}

.inbox-app-shell .queue-meta i.queue-vip,
.inbox-app-shell .queue-meta i.queue-risk {
  background: rgba(255, 255, 255, .84);
}

.inbox-app-shell .conversation-tabbar {
  border-bottom-color: rgba(128, 146, 178, .12);
}

.inbox-app-shell .conversation-tabbar a.active {
  border: 1px solid rgba(92, 123, 188, .28);
  border-bottom-color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 -2px 8px rgba(61, 82, 128, .05);
}

.inbox-app-shell .conversation-tabbar button {
  border: 1px solid rgba(119, 139, 174, .18);
}

.inbox-app-shell .ticket-actions {
  gap: 6px;
}

.inbox-app-shell .ticket-actions > button,
.inbox-app-shell .ticket-actions > form > button,
.inbox-app-shell .ticket-actions .ticket-close-view,
.inbox-app-shell .ticket-actions .menu-anchor > button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(119, 139, 174, .20);
  border-radius: 11px;
  background: rgba(255, 255, 255, .60);
  font-size: 19px;
}

.inbox-app-shell .ticket-actions .menu-anchor > button {
  font-size: 16px;
}

.inbox-app-shell .ticket-actions .ticket-header-menu {
  left: auto;
  right: 0;
  width: 240px;
  min-width: 240px;
  z-index: 180;
}

.inbox-app-shell .ticket-actions .ticket-header-menu form,
.inbox-app-shell .ticket-actions .ticket-header-menu form > button,
.inbox-app-shell .ticket-actions .ticket-header-menu > a,
.inbox-app-shell .ticket-actions .ticket-header-menu > button {
  width: 100%;
  min-width: 0;
}

.inbox-app-shell .ticket-workspace > .ai-guidance-card {
  min-height: 142px;
  margin-block: 7px;
  padding: 14px 16px 12px 62px;
}

.inbox-app-shell .ai-guidance-card .ai-spark {
  top: 14px;
  left: 14px;
  width: 39px;
  height: 39px;
  font-size: 28px;
}

.inbox-app-shell .ai-guidance-card > header small {
  margin-top: 3px;
  max-width: 520px;
  font-size: 12.5px;
  line-height: 1.35;
}

.inbox-app-shell .ai-response-preview {
  width: 100%;
  min-height: 34px;
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 5px 0 1px;
}

.inbox-app-shell .ai-guidance-card .ai-response-copy {
  max-height: 40px;
  margin: 0;
  color: #48566c;
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
}

.inbox-app-shell .ai-guidance-card .ai-response-copy b {
  color: #263955;
  font-weight: 760;
}

.inbox-app-shell .ai-response-view {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #175ed6;
  font-size: 12px;
}

.inbox-app-shell .ai-guidance-card > footer {
  position: static;
  min-height: 39px;
  margin: 5px 0 0;
  justify-content: flex-end;
}

.inbox-app-shell .ai-guidance-card > footer > div {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.inbox-app-shell .ai-guidance-card .ai-view-button {
  width: auto;
  min-width: 142px;
  height: 39px;
  padding: 0 13px;
  border: 1px solid #c7d8f8;
  border-radius: 9px;
  background: rgba(255, 255, 255, .76);
  color: #175ed6;
  font-family: inherit;
  font-size: 13px;
  font-weight: 730;
}

.inbox-app-shell .ai-guidance-card .ai-view-button:hover {
  border-color: #9ebcf0;
  background: #fff;
}

.inbox-app-shell .ai-guidance-card .send-ai-button,
.inbox-app-shell .ai-guidance-card .ai-modify-button {
  min-width: 126px;
  height: 39px;
  font-size: 13px;
}

.inbox-app-shell .reference-action-pills {
  min-height: 50px;
}

.inbox-app-shell .reference-action-pills .context-action-pill {
  min-height: 43px;
  height: 43px;
  border-radius: 12px;
  font-size: 14px;
}

.inbox-app-shell .composer-footer {
  padding-inline: 12px;
}

.inbox-app-shell .composer-tools {
  display: flex;
  align-items: center;
  gap: 3px;
}

.inbox-app-shell .composer-footer .composer-tools > button {
  width: 43px;
  min-width: 43px;
  height: 43px;
  border-radius: 11px;
  color: #52627c;
  font-size: 20px;
}

.inbox-app-shell .composer-footer button svg {
  width: 23px;
  height: 23px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inbox-app-shell .composer-footer .composer-send-options svg {
  width: 17px;
  height: 17px;
}

.inbox-app-shell .queue-scrollbar-toggle[aria-pressed="true"] {
  border-color: rgba(48, 103, 231, .38);
  background: #edf3ff;
  color: #175ed6;
}

.inbox-app-shell .composer-footer .composer-mention {
  font-family: inherit;
  font-size: 22px;
}

.inbox-app-shell .composer-footer .composer-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  border-radius: 10px 0 0 10px;
  background: #1464f6;
  box-shadow: 0 7px 16px rgba(20, 100, 246, .22);
  font-size: 13px;
}

.inbox-app-shell .composer-footer .composer-send svg {
  width: 19px;
  height: 19px;
}

.inbox-app-shell .composer-footer .composer-send-options {
  border-left-color: rgba(255, 255, 255, .38);
  border-radius: 0 10px 10px 0;
  background: #1464f6;
  color: #fff;
}

.inbox-app-shell .composer-footer .composer-tools > button:hover,
.inbox-app-shell .composer-footer .composer-tools > button[aria-expanded="true"] {
  background: #eef3ff;
  color: #185ce1;
}

.inbox-app-shell .composer-tool-popover header strong,
.inbox-app-shell .macro-picker header,
.inbox-app-shell .mention-picker header {
  font-size: 14px;
}

.inbox-app-shell .composer-tool-popover header small,
.inbox-app-shell .macro-picker header small,
.inbox-app-shell .mention-picker header small {
  font-size: 11.5px;
}

.inbox-app-shell .customer-memory-chips > a,
.inbox-app-shell .customer-memory-chips > span,
.inbox-app-shell .customer-memory-chips > :nth-child(2),
.inbox-app-shell .customer-memory-chips > :nth-child(3) {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #d7e0ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  color: #40506a;
  font-size: 12px;
  font-weight: 650;
}

.inbox-app-shell .customer-memory-chips > * > span,
.inbox-app-shell .customer-memory-chips > * > i {
  color: #3777e8;
  font-style: normal;
}

.inbox-app-shell .customer-memory-chips > :nth-child(2) > span,
.inbox-app-shell .customer-memory-chips > :nth-child(2) > i {
  color: #e4518d;
}

.inbox-app-shell .customer-memory-chips > :nth-child(3) > span,
.inbox-app-shell .customer-memory-chips > :nth-child(3) > i {
  color: #6976e8;
}

.inbox-app-shell .ai-insights-card .intelligence-summary {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #44527a;
  font-size: 13px;
  line-height: 1.55;
}

.inbox-app-shell .tracking-detail-link,
.inbox-app-shell .shopify-inline-tracking,
.inbox-app-shell .order-modal-tracking {
  border: 0;
  background: transparent;
  color: #1857ed;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}

.inbox-app-shell .shopify-inline-tracking,
.inbox-app-shell .order-modal-tracking {
  width: 100%;
}

.inbox-app-shell .fulfillment-tracker-body .tracking-detail-link {
  padding: 0;
  color: #1857ed;
  font-size: 11px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

/* Customer-column sheets stay inside the customer workspace on desktop. */
.inbox-app-shell .customer-context {
  position: relative;
  isolation: isolate;
}

.inbox-app-shell .customer-context .app-dialog {
  position: absolute;
  inset: 0;
  z-index: 30;
  width: 100%;
  height: 100%;
  padding: 8px;
  place-items: stretch;
  overflow: hidden;
}

.inbox-app-shell .customer-context .app-dialog .dialog-backdrop {
  border-radius: 15px;
  background: rgba(223, 231, 245, .42);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.inbox-app-shell .customer-context .app-dialog > section {
  width: 100%;
  max-width: none;
  max-height: 100%;
  align-self: stretch;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .90), rgba(244, 248, 255, .78));
  box-shadow: 0 22px 58px rgba(30, 49, 83, .23), inset 0 1px 0 rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(28px) saturate(155%);
  backdrop-filter: blur(28px) saturate(155%);
}

.inbox-app-shell .customer-context .shopify-inline-dialog section > header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 17px;
  background: rgba(250, 252, 255, .78);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.inbox-app-shell .customer-context .shopify-inline-dialog section > header h3 {
  font-size: 19px;
}

.inbox-app-shell .customer-context .shopify-inline-dialog form {
  gap: 15px;
  padding: 18px 17px 22px;
}

.inbox-app-shell .customer-context .shopify-inline-dialog label {
  gap: 7px;
  font-size: 13px;
}

.inbox-app-shell .customer-context .shopify-inline-dialog input,
.inbox-app-shell .customer-context .shopify-inline-dialog select,
.inbox-app-shell .customer-context .shopify-inline-dialog textarea {
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid rgba(124, 144, 179, .28);
  border-radius: 11px;
  background: rgba(255, 255, 255, .80);
  font-family: inherit;
  font-size: 14px;
}

.inbox-app-shell .customer-context .shopify-inline-dialog footer button,
.inbox-app-shell .customer-context .shopify-inline-dialog footer .button {
  min-height: 42px;
  padding-inline: 15px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
}

.inbox-app-shell .tracking-dialog-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.inbox-app-shell .tracking-dialog-status {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(113, 137, 177, .20);
  border-radius: 13px;
  background: rgba(255, 255, 255, .65);
}

.inbox-app-shell .tracking-dialog-status span {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dcf6e8;
  color: #18784f;
  font-size: 11px;
  font-weight: 780;
}

.inbox-app-shell .tracking-dialog-status strong {
  color: #17243a;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.inbox-app-shell .tracking-dialog-status small {
  color: #748197;
  font-size: 12px;
}

.inbox-app-shell .tracking-dialog-body ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inbox-app-shell .tracking-dialog-body li {
  position: relative;
  min-height: 54px;
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 10px;
}

.inbox-app-shell .tracking-dialog-body li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 27px;
  bottom: 0;
  width: 1px;
  background: #d5deed;
}

.inbox-app-shell .tracking-dialog-body li i {
  z-index: 1;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #ccd7e8;
  border-radius: 50%;
  background: #fff;
  color: #8290a5;
  font-size: 11px;
  font-style: normal;
}

.inbox-app-shell .tracking-dialog-body li.complete i {
  border-color: #2abb7c;
  background: #2abb7c;
  color: #fff;
}

.inbox-app-shell .tracking-dialog-body li.active i {
  border-color: #2870ee;
  color: #2870ee;
  box-shadow: 0 0 0 4px #eaf1ff;
}

.inbox-app-shell .tracking-dialog-body li span {
  display: grid;
  align-content: start;
  gap: 3px;
  padding-top: 2px;
}

.inbox-app-shell .tracking-dialog-body li b {
  color: #26354c;
  font-size: 13px;
}

.inbox-app-shell .tracking-dialog-body li small {
  color: #8490a2;
  font-size: 11.5px;
}

.inbox-app-shell .tracking-detail-dialog > section > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px 18px;
}

@media (max-width: 760px) {
  .inbox-app-shell .customer-context .app-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    padding: 10px;
  }

  .inbox-app-shell .customer-context .app-dialog > section {
    width: 100%;
    max-height: 100%;
  }

  .inbox-app-shell .inline-field-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .inbox-app-shell .ai-response-preview {
    width: 100%;
  }

  .inbox-app-shell .ai-guidance-card > footer {
    position: static;
    margin-top: 6px;
  }
}

.inbox-app-shell .helpdesk-nav .nav-group > summary b {
  font-size: 14.5px;
  letter-spacing: -.01em;
}
