.conversation-shell {
  display: grid;
  grid-template-columns: 300px minmax(360px, 1fr) 320px;
  gap: 12px;
  min-height: calc(100vh - 92px);
}

.inbox-list,
.thread-panel,
.customer-panel {
  min-height: calc(100vh - 92px);
  overflow: hidden;
}

.inbox-toolbar {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--color-border);
}

.conversation-list {
  overflow-y: auto;
  max-height: calc(100vh - 238px);
}

.conversation-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  text-align: left;
  padding: 10px;
  cursor: pointer;
}

.conversation-row:hover,
.conversation-row:focus {
  background: #F7FAFB;
  outline: none;
}

.row-title {
  font-weight: 800;
  min-width: 0;
}

.row-preview,
.row-meta {
  color: var(--color-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-tags {
  grid-row: 1 / span 3;
  grid-column: 2;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.thread-panel {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.thread-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
}

.thread-title {
  margin: 0;
  font-size: 18px;
}

.message-list {
  overflow-y: auto;
  padding: 14px;
  background: #EEF3F1;
}

.message-bubble {
  max-width: min(680px, 78%);
  margin: 0 0 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
}

.message-bubble.outgoing {
  margin-left: auto;
  background: #E7F7F5;
  border-color: rgba(0, 157, 165, 0.22);
}

.message-bubble.internal {
  max-width: 100%;
  background: rgba(217, 145, 24, 0.12);
  border-style: dashed;
}

.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-media {
  display: block;
  margin: -5px -7px 9px;
  overflow: hidden;
  border-radius: 6px;
}

.message-media.image img,
.message-media video {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #E9EEF2;
}

.message-media audio {
  display: block;
  width: 100%;
  min-width: 180px;
}

.message-media.message-audio {
  width: min(340px, calc(100% - 16px));
  padding: 6px 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 7px;
  background: #f7fbff;
}

.message-media.message-audio audio {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 30px;
}

.message-file {
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 6px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #174A78;
  text-decoration: none;
}

.message-file .nav-icon { width: 24px; height: 24px; flex: 0 0 24px; }
.message-file span,
.message-file strong,
.message-file small { display: block; min-width: 0; }
.message-file strong { overflow-wrap: anywhere; }
.message-file small { margin-top: 2px; color: #667386; }

.message-media-pending {
  margin-bottom: 8px;
  border-radius: 5px;
  padding: 8px 10px;
  background: #EEF3F7;
  color: #667386;
  font-size: 13px;
  font-weight: 700;
}

.message-media-pending.failed {
  background: #FBEDED;
  color: #9C3232;
}

.message-meta {
  color: var(--color-muted);
  font-size: 11px;
  margin-top: 4px;
}

.reply-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--color-border);
}

.reply-actions {
  display: grid;
  gap: 8px;
  align-content: end;
}

.note-compose {
  background: #F9FBFC;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-token {
  border: 0;
  cursor: pointer;
}

.tag-token.green {
  background: rgba(21, 150, 106, 0.12);
  color: var(--color-success);
}

.tag-token.amber {
  background: rgba(217, 145, 24, 0.14);
  color: #9A650F;
}

.tag-token.red {
  background: rgba(200, 72, 72, 0.12);
  color: var(--color-danger);
}

.tag-token.teal,
.tag-token.blue {
  background: rgba(0, 157, 165, 0.12);
  color: var(--color-accent-hover);
}

.queue-metrics {
  margin-bottom: 14px;
}

.queue-summary {
  margin-bottom: 14px;
}

.queue-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.queue-toolbar {
  grid-template-columns: 180px 180px auto auto;
}

.queue-tabs {
  display: grid;
  gap: 14px;
}

.queue-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.table-action {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.code-block {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: #F7FAFB;
  font-size: 12px;
}

.flash-stack {
  margin-bottom: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.conversation-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(400px, 1fr) minmax(270px, 300px);
  gap: 10px;
  min-height: calc(100vh - 102px);
  color: #192434;
}

.conversation-inbox-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #E3EAF1;
  background: #FFFFFF;
}

.conversation-inbox-head h1,
.conversation-dialog-head h2 {
  margin: 2px 0 0;
  color: #172033;
  font-size: 20px;
  line-height: 1.2;
}

.conversation-eyebrow {
  color: #087D82;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.conversation-workspace .panel {
  border-color: #DEE6EE;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(17, 31, 52, 0.07);
}

.conversation-inbox,
.conversation-thread,
.conversation-context {
  min-height: calc(100vh - 102px);
}

.conversation-inbox,
.conversation-thread {
  overflow: hidden;
}

.conversation-context {
  display: grid;
  align-content: start;
  gap: 12px;
}

.conversation-filters {
  display: grid;
  gap: 9px;
  padding: 10px;
  border-bottom: 1px solid #E3EAF1;
  background: #FFFFFF;
}

.conversation-control {
  min-height: 42px;
  border-color: #DCE5EE;
  border-radius: 7px;
  color: #263244;
  font-size: 15px;
}

.search-control {
  position: relative;
  display: block;
}

.search-control .input {
  padding-right: 40px;
}

.field-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 20px;
  height: 20px;
  color: #7A889C;
  transform: translateY(-50%);
  pointer-events: none;
}

.conversation-list {
  max-height: calc(100vh - 310px);
  overflow-y: auto;
}

.conversation-row {
  width: 100%;
  min-height: 86px;
  border: 0;
  border-left: 3px solid transparent;
  border-bottom: 1px solid #E7EDF3;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-areas:
    "avatar title time"
    "avatar preview unread"
    "chips chips chips";
  gap: 3px 10px;
  padding: 12px 12px 10px 10px;
  text-align: left;
  background: #FFFFFF;
  cursor: pointer;
}

.conversation-row:hover,
.conversation-row:focus {
  background: #F7FBFC;
  outline: none;
}

.conversation-row.active {
  border-left-color: var(--color-accent);
  background: linear-gradient(90deg, rgba(0, 157, 165, 0.12), rgba(0, 157, 165, 0.04));
}

.avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #DCE8EF, #F4F8FA);
  color: #667386;
  font-weight: 800;
  font-size: 15px;
}

.avatar > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: #E8EEF4;
}

.notification-center {
  position: relative;
}

.notification-toggle {
  position: relative;
}

.notification-toggle.permission-needed::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 9px;
  height: 9px;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background: #D99118;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border: 2px solid #FFFFFF;
  border-radius: 9px;
  padding: 0 4px;
  background: #C83E3E;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
}

.notification-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 24px));
  border: 1px solid #D8E0E7;
  border-radius: 7px;
  background: #FFFFFF;
  box-shadow: 0 18px 45px rgba(29, 39, 51, 0.18);
  overflow: hidden;
}

.notification-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid #E4E9EE;
}

.notification-panel > header div {
  display: grid;
  gap: 2px;
}

.notification-panel > header span,
.notification-item small,
.notification-item time {
  color: #6C798A;
  font-size: 12px;
}

.notification-panel button {
  border: 0;
  background: transparent;
  color: #087E83;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.notification-permission {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin: 12px;
  padding: 12px;
  border: 1px solid #CDE2E3;
  border-radius: 7px;
  background: #F2FAFA;
}

.notification-permission[data-state="granted"] {
  border-color: #C8E7D9;
  background: #F1FAF6;
}

.notification-permission[data-state="denied"],
.notification-permission[data-state="unsupported"] {
  border-color: #E8D5D5;
  background: #FFF7F7;
}

.notification-permission-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #DDF1F1;
  color: #087E83;
}

.notification-permission[data-state="granted"] .notification-permission-icon {
  background: #DDF3E8;
  color: #147A58;
}

.notification-permission[data-state="denied"] .notification-permission-icon,
.notification-permission[data-state="unsupported"] .notification-permission-icon {
  background: #F4E2E2;
  color: #A33B3B;
}

.notification-permission-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.notification-permission-copy strong {
  color: #263445;
  font-size: 14px;
}

.notification-permission-copy small {
  color: #667386;
  font-size: 12px;
  line-height: 1.35;
}

.notification-panel .notification-permission > button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 6px;
  background: #009DA5;
  color: #FFFFFF;
  font-size: 13px;
  white-space: nowrap;
}

.notification-panel .notification-permission > button:hover {
  background: #087E83;
}

.notification-list {
  max-height: min(480px, 65vh);
  overflow-y: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid #EDF1F4;
  color: #263445;
  text-decoration: none;
}

.notification-item:hover,
.notification-item.unread {
  background: #F3FAFA;
}

.notification-item > span:last-child {
  display: grid;
  gap: 3px;
}

.notification-type-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #B6C1CC;
}

.notification-item.unread .notification-type-dot {
  background: #009DA5;
}

.notification-empty {
  padding: 28px 16px;
  color: #6C798A;
  text-align: center;
}

@media (max-width: 520px) {
  .notification-panel {
    position: fixed;
    top: 64px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .notification-permission {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .notification-panel .notification-permission > button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.avatar.photo-1 {
  background:
    radial-gradient(circle at 50% 32%, #F4C7A9 0 16%, transparent 17%),
    radial-gradient(circle at 48% 28%, #6E4A35 0 23%, transparent 24%),
    linear-gradient(145deg, #EAF7F4, #C7E8E0);
}

.avatar.photo-2 {
  background:
    radial-gradient(circle at 50% 30%, #E9B98F 0 15%, transparent 16%),
    radial-gradient(circle at 50% 25%, #303640 0 21%, transparent 22%),
    linear-gradient(145deg, #F4E8D8, #D7E7F3);
}

.avatar-muted {
  background: #E8EEF4;
  color: #728095;
}

.row-avatar {
  grid-area: avatar;
}

.row-title {
  grid-area: title;
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  color: #1E293B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-time {
  grid-area: time;
  color: #8A97A9;
  font-size: 13px;
}

.row-preview {
  grid-area: preview;
  min-width: 0;
  color: #667386;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-unread {
  grid-area: unread;
  align-self: center;
  justify-self: end;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  background: #009DA5;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.row-chips {
  grid-area: chips;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-width: 0;
}

.chip {
  min-height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: #EFF5FA;
  color: #344255;
  font-size: 13px;
  font-weight: 800;
}

.chip.teal,
.badge.teal {
  background: rgba(0, 157, 165, 0.13);
  color: #087D82;
}

.chip.blue,
.badge.blue {
  background: rgba(38, 99, 235, 0.12);
  color: #2454B6;
}

.chip.amber,
.badge.amber {
  background: rgba(217, 145, 24, 0.16);
  color: #95630D;
}

.chip.green,
.badge.green {
  background: rgba(21, 150, 106, 0.13);
  color: #147A58;
}

.chip.purple,
.badge.purple {
  background: rgba(124, 88, 202, 0.13);
  color: #6845B8;
}

.conversation-thread {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto auto;
}

.thread-header {
  min-height: 72px;
  padding: 12px 14px;
  border-bottom: 1px solid #E3EAF1;
  background: #FFFFFF;
}

.thread-contact,
.thread-contact-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.thread-title {
  margin: 0;
  color: #172033;
  font-size: 19px;
  line-height: 1.2;
}

.thread-subtitle {
  margin: 3px 0 0;
  color: #667386;
  font-size: 15px;
}

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

.thread-status {
  min-width: 136px;
  min-height: 40px;
  padding-left: 34px;
  background:
    radial-gradient(circle at 17px 50%, #12B76A 0 4px, transparent 5px),
    #FFFFFF;
}

.message-list {
  position: relative;
  overflow-y: auto;
  padding: 18px;
  background:
    radial-gradient(circle at 10% 18%, rgba(0, 157, 165, 0.06) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 34%, rgba(38, 63, 98, 0.05) 0 1px, transparent 2px),
    linear-gradient(180deg, #FBF7F1, #F8F2EA);
  background-size: 58px 58px, 72px 72px, auto;
}

.thread-empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #728095;
  text-align: center;
}

.message-bubble {
  max-width: min(560px, 76%);
  margin: 0 0 10px;
  padding: 11px 13px 8px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(17, 31, 52, 0.05);
}

.message-bubble.outgoing {
  margin-left: auto;
  background: linear-gradient(180deg, #DCF8D8, #DDF2D4);
  border-color: rgba(21, 150, 106, 0.16);
}

.message-bubble.internal {
  max-width: 100%;
  background: rgba(255, 248, 226, 0.92);
  border-color: rgba(217, 145, 24, 0.28);
  border-style: dashed;
}

.message-text {
  color: #172033;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #6D7A8D;
  font-size: 13px;
  margin-top: 4px;
}

.composer-tabs {
  display: flex;
  gap: 18px;
  padding: 10px 14px 0;
  border-top: 1px solid #E3EAF1;
  background: #FFFFFF;
}

.composer-tab {
  min-height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 2px;
  background: transparent;
  color: #667386;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
}

.composer-tab.active {
  border-bottom-color: var(--color-accent);
  color: #087D82;
}

.reply-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 0;
  background: #FFFFFF;
}

.message-compose-input {
  min-height: 72px;
  resize: vertical;
  border-color: #DCE5EE;
  font-size: 15px;
}

.composer-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.composer-actions .icon-btn:first-child {
  margin-right: auto;
}

.send-btn {
  min-width: 94px;
}

.note-compose {
  background: #FBFCFD;
}

.context-card {
  overflow: hidden;
}

.context-card-header {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid #E3EAF1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #FFFFFF;
  color: #172033;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
}

.context-card.collapsed .context-card-body {
  display: none;
}

.context-card.collapsed .context-card-header svg {
  transform: rotate(180deg);
}

.context-card-body {
  padding: 14px;
  background: #FFFFFF;
}

.customer-empty-card {
  min-height: 244px;
  border: 1px dashed #D3DDE8;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 20px;
  color: #667386;
  text-align: center;
}

.customer-empty-card p {
  max-width: 230px;
  margin: 0;
  font-size: 14px;
}

.context-primary,
.context-secondary {
  width: 100%;
}

.customer-card {
  display: grid;
  gap: 10px;
}

.customer-link-panel {
  display: grid;
  gap: 10px;
}

.customer-link-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #E3EAF1;
}

.customer-link-head strong {
  display: block;
  color: #172033;
  font-size: 15px;
}

.customer-link-head span {
  display: block;
  color: #667386;
  font-size: 13px;
}

.customer-link-empty {
  border: 1px dashed #D3DDE8;
  border-radius: 8px;
  padding: 14px;
  background: #FBFCFD;
  color: #667386;
  font-size: 14px;
  text-align: center;
}

.customer-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.customer-card-title {
  margin: 0;
  font-size: 16px;
}

.customer-card-meta {
  margin: 2px 0 0;
  color: #667386;
  font-size: 14px;
}

.customer-candidate-list {
  display: grid;
  gap: 8px;
  max-height: 178px;
  overflow-y: auto;
  padding-right: 2px;
}

.candidate-button {
  width: 100%;
  border: 1px solid #DCE5EE;
  border-radius: 7px;
  padding: 9px 10px;
  background: #F8FAFC;
  color: #172033;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.candidate-button:hover,
.candidate-button:focus {
  border-color: rgba(0, 157, 165, 0.45);
  background: rgba(0, 157, 165, 0.07);
  outline: none;
}

.candidate-button strong,
.candidate-button span {
  display: block;
}

.candidate-button strong {
  color: #172033;
  font-size: 14px;
}

.candidate-button span {
  margin-top: 2px;
  color: #667386;
  font-size: 13px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  border: 0;
  min-height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  background: rgba(0, 157, 165, 0.13);
  color: #087D82;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.tag-chip .remove-mark {
  color: currentColor;
  opacity: 0.65;
}

.tag-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.tag-picker .select {
  width: auto;
  min-width: 154px;
  min-height: 32px;
  border-style: dashed;
  border-radius: 8px;
  padding: 4px 12px 4px 32px;
  background:
    linear-gradient(90deg, transparent 0 27px, #FFFFFF 27px),
    radial-gradient(circle at 18px 50%, transparent 0 8px, transparent 8px),
    #FFFFFF;
  color: #667386;
  font-size: 14px;
  font-weight: 700;
}

.tag-picker::before {
  content: "+";
  position: absolute;
  margin-left: 12px;
  color: #728095;
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
}

.tag-picker .btn {
  display: none;
}

.context-icon {
  display: inline-flex;
  color: #8291A6;
}

.conversation-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 24px;
  color: #728095;
  font-size: 15px;
  text-align: center;
}

.conversation-empty strong {
  color: #263244;
  font-size: 16px;
}

.conversation-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  box-shadow: 0 24px 70px rgba(15, 31, 53, 0.28);
}

.conversation-dialog.compact {
  width: min(480px, calc(100vw - 32px));
}

.customer-link-dialog {
  width: min(600px, calc(100vw - 32px));
}

.customer-link-source {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid #DCE5EA;
  border-radius: 7px;
  background: #F7FAFA;
}

.customer-link-source > span:last-child,
.customer-link-source strong,
.customer-link-source small {
  display: block;
  min-width: 0;
}

.customer-link-source strong {
  color: #1F2C3C;
  font-size: 15px;
}

.customer-link-source small {
  margin-top: 2px;
  color: #6B7889;
  font-size: 13px;
}

.customer-link-results {
  min-height: 190px;
  max-height: min(390px, 46vh);
  overflow-y: auto;
  border: 1px solid #DCE5EA;
  border-radius: 7px;
  background: #FFFFFF;
}

.customer-search-state {
  min-height: 188px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #687587;
  text-align: center;
}

.customer-search-result {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-bottom: 1px solid #E4EAEE;
  padding: 10px 12px;
  background: #FFFFFF;
  color: #1F2C3C;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.customer-search-result:last-child {
  border-bottom: 0;
}

.customer-search-result:hover,
.customer-search-result:focus-visible {
  background: #EDF8F6;
  outline: 2px solid transparent;
}

.customer-search-result:disabled {
  cursor: wait;
  opacity: 0.55;
}

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

.customer-search-result strong {
  font-size: 15px;
}

.customer-search-result small {
  margin-top: 3px;
  overflow: hidden;
  color: #687587;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-search-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #E3F3F0;
  color: #12735E;
  font-size: 13px;
  font-weight: 800;
}

.conversation-dialog::backdrop {
  background: rgba(15, 31, 53, 0.52);
}

.conversation-dialog-card {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 22px;
  background: #FFFFFF;
}

.conversation-dialog-head,
.conversation-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.conversation-dialog-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

.form-error {
  margin: 0;
  border: 1px solid #F3C3C7;
  border-radius: 6px;
  padding: 10px 12px;
  background: #FFF3F4;
  color: #A4313A;
  font-size: 14px;
  font-weight: 700;
}
