.zc-workspace,
.zc-floating-layer,
.zc-modal-backdrop {
  --zc-accent: var(--zentro-terracotta, var(--teal, #d46b46));
  --zc-accent-strong: var(--zentro-terracotta-dark, var(--teal-dark, #b95332));
  --zc-ink: var(--ink, #51364b);
  --zc-muted: var(--muted, #766a72);
  --zc-paper: var(--paper, #fff9f2);
  --zc-canvas: var(--cream, #f8f3ec);
  --zc-line: var(--line, #e6d9cf);
  --zc-soft-line: var(--soft-line, #f1e9e2);
  --zc-deep: var(--zentro-plum-deep, var(--navy-deep, #392335));
  --zc-danger: var(--danger, #a5423c);
  --zc-shadow: var(--shadow, 0 18px 44px rgba(81, 54, 75, .16));
  color: var(--zc-ink);
  font: inherit;
}

.zc-workspace *,
.zc-floating-layer *,
.zc-modal-backdrop * {
  box-sizing: border-box;
}

.zc-workspace button,
.zc-workspace input,
.zc-workspace select,
.zc-workspace textarea,
.zc-floating-layer button,
.zc-floating-layer select,
.zc-floating-layer textarea,
.zc-modal-backdrop button,
.zc-modal-backdrop input {
  font: inherit;
}

.zc-workspace button,
.zc-floating-layer button,
.zc-modal-backdrop button {
  cursor: pointer;
}

.zc-workspace button:disabled,
.zc-floating-layer button:disabled,
.zc-modal-backdrop button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.zc-workspace button:focus-visible,
.zc-workspace input:focus-visible,
.zc-workspace select:focus-visible,
.zc-workspace textarea:focus-visible,
.zc-floating-layer button:focus-visible,
.zc-floating-layer select:focus-visible,
.zc-floating-layer textarea:focus-visible,
.zc-modal-backdrop button:focus-visible,
.zc-modal-backdrop input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--zc-accent) 34%, transparent);
  outline-offset: 2px;
}

.zc-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 282px) minmax(0, 1fr);
  height: min(760px, calc(100vh - 158px));
  height: min(760px, calc(100dvh - 158px));
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--zc-line);
  border-radius: 20px;
  background: var(--zc-paper);
  box-shadow: var(--shadow-soft, 0 6px 20px rgba(81, 54, 75, .08));
}

.zc-session-unavailable {
  visibility: hidden;
}

.zc-spaces-panel {
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 0, color-mix(in srgb, var(--zc-accent) 25%, transparent), transparent 35%),
    var(--zc-deep);
  color: #fff9f2;
}

.zc-spaces-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 90px;
  padding: 19px 18px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
}

.zc-spaces-heading h3,
.zc-compact-heading h3,
.zc-conversation-heading h3,
.zc-management-form h3 {
  margin: 0;
}

.zc-eyebrow {
  margin: 0 0 4px;
  color: var(--zc-accent-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.zc-spaces-panel .zc-eyebrow {
  color: #f0cfc4;
}

.zc-space-rail {
  height: calc(100% - 90px);
  overflow-y: auto;
  padding: 12px 10px 18px;
  scrollbar-color: rgba(255, 255, 255, .25) transparent;
}

.zc-space-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 2px 0;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 249, 242, .76);
  text-align: left;
}

.zc-space-button:hover,
.zc-space-button.active {
  background: rgba(255, 255, 255, .11);
  color: #fff;
}

.zc-space-button.active {
  box-shadow: inset 3px 0 var(--zc-accent);
}

.zc-space-button > span:nth-child(2) {
  min-width: 0;
}

.zc-space-button strong,
.zc-space-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zc-space-button strong {
  font-size: 13px;
}

.zc-space-button small {
  margin-top: 3px;
  color: inherit;
  font-size: 10px;
  opacity: .68;
}

.zc-space-avatar,
.zc-message-avatar,
.zc-compact-avatar,
.zc-mention-avatar,
.zc-member-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--zc-accent) 18%, var(--zc-paper));
  color: var(--zc-accent-strong);
  font-size: 11px;
  font-weight: 900;
}

.zc-space-avatar {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

.zc-space-unread,
.zc-unread-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  min-height: 20px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--zc-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.zc-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.zc-admin-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 9px;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.zc-admin-button-light {
  border-color: var(--zc-line);
  background: var(--zc-paper);
  color: var(--zc-accent-strong);
}

.zc-conversation {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--zc-paper) 88%, transparent), color-mix(in srgb, var(--zc-canvas) 84%, transparent)),
    var(--zc-paper);
}

.zc-conversation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 90px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--zc-line);
  background: color-mix(in srgb, var(--zc-paper) 92%, transparent);
}

.zc-conversation-title {
  min-width: 0;
}

.zc-conversation-title h3,
.zc-conversation-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zc-conversation-title span {
  display: block;
  margin-top: 4px;
  color: var(--zc-muted);
  font-size: 11px;
}

.zc-heading-actions {
  flex: 0 0 auto;
}

.zc-mobile-space-select {
  display: none;
}

.zc-message-region {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px 28px;
  overscroll-behavior: contain;
  scrollbar-color: color-mix(in srgb, var(--zc-muted) 38%, transparent) transparent;
}

.zc-history-action {
  display: flex;
  justify-content: center;
  min-height: 0;
}

.zc-history-button {
  z-index: 1;
  margin: 10px 0 -5px;
  padding: 6px 12px;
  border: 1px solid var(--zc-line);
  border-radius: 999px;
  background: var(--zc-paper);
  color: var(--zc-accent-strong);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 12px rgba(44, 29, 41, .08);
}

.zc-day-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
  color: var(--zc-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.zc-day-divider::before,
.zc-day-divider::after {
  height: 1px;
  flex: 1;
  background: var(--zc-line);
  content: "";
}

.zc-message {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: end;
  gap: 11px;
  width: 100%;
  max-width: 960px;
  margin: 0 0 12px;
}

.zc-message.own {
  grid-template-columns: minmax(0, 1fr) 36px;
  margin-left: auto;
}

.zc-message.grouped {
  margin-top: -4px;
  margin-bottom: 6px;
}

.zc-message + .zc-message:not(.grouped) {
  margin-top: 6px;
}

.zc-message.grouped .zc-message-avatar {
  visibility: hidden;
}

.zc-message.grouped .zc-message-meta {
  display: none;
}

.zc-message-avatar {
  width: 36px;
  height: 36px;
}

.zc-message-content {
  width: fit-content;
  max-width: min(78%, 720px);
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--zc-line) 88%, var(--zc-ink) 12%);
  border-radius: 14px 14px 14px 4px;
  background: color-mix(in srgb, var(--zc-paper) 84%, var(--zc-canvas));
  box-shadow: 0 2px 8px rgba(81, 54, 75, .07);
}

.zc-message.own .zc-message-avatar {
  grid-column: 2;
  grid-row: 1;
}

.zc-message.own .zc-message-content {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  border-color: color-mix(in srgb, var(--zc-accent) 34%, var(--zc-line));
  border-radius: 14px 14px 4px 14px;
  background: color-mix(in srgb, var(--zc-accent) 15%, var(--zc-paper));
}

.zc-message.own .zc-message-meta {
  justify-content: flex-end;
}

.zc-message-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 18px;
}

.zc-message-meta strong {
  color: var(--zc-ink);
  font-size: 12px;
}

.zc-message-meta time {
  color: var(--zc-muted);
  font-size: 10px;
}

.zc-message-text {
  margin: 1px 0 0;
  color: var(--zc-ink);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.zc-valid-mention {
  padding: 1px 3px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--zc-accent) 13%, transparent);
  color: color-mix(in srgb, var(--zc-accent) 78%, var(--zc-ink));
  font-weight: 900;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.zc-message-attachments {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 9px;
  margin-top: 6px;
}

.zc-image-attachment {
  display: block;
  max-width: min(300px, 100%);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--zc-line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--zc-canvas) 82%, #000 4%);
  box-shadow: 0 4px 15px rgba(44, 29, 41, .08);
}

.zc-image-attachment img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 230px;
  object-fit: contain;
}

.zc-image-loading {
  display: grid;
  place-items: center;
  width: 210px;
  min-height: 124px;
  padding: 16px;
  color: var(--zc-muted);
  font-size: 11px;
}

.zc-document-card {
  display: grid;
  grid-template-columns: 42px minmax(130px, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  min-height: 64px;
  padding: 9px 12px 9px 9px;
  border: 1px solid var(--zc-line);
  border-radius: 12px;
  background: var(--zc-paper);
  color: var(--zc-ink);
  text-align: left;
  box-shadow: 0 3px 12px rgba(44, 29, 41, .06);
}

.zc-document-card:hover {
  border-color: var(--zc-accent);
}

.zc-document-badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--zc-accent) 13%, var(--zc-paper));
  color: var(--zc-accent-strong);
  font-size: 9px;
  font-weight: 900;
}

.zc-document-copy {
  min-width: 0;
}

.zc-document-copy strong,
.zc-document-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zc-document-copy strong {
  font-size: 11px;
}

.zc-document-copy small {
  margin-top: 3px;
  color: var(--zc-muted);
  font-size: 9px;
}

.zc-document-action {
  color: var(--zc-accent-strong);
  font-size: 10px;
  font-weight: 800;
}

.zc-composer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 13px 18px 15px;
  border-top: 1px solid var(--zc-line);
  background: color-mix(in srgb, var(--zc-paper) 96%, transparent);
}

.zc-composer-field {
  position: relative;
}

.zc-composer textarea,
.zc-quick-reply textarea,
.zc-workspace select,
.zc-floating-layer select,
.zc-management-form input {
  width: 100%;
  border: 1px solid var(--zc-line);
  border-radius: 11px;
  outline: none;
  background: var(--zc-paper);
  color: var(--zc-ink);
}

.zc-composer textarea {
  display: block;
  min-height: 48px;
  max-height: 150px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.4;
}

.zc-composer textarea:focus,
.zc-quick-reply textarea:focus,
.zc-workspace select:focus,
.zc-floating-layer select:focus,
.zc-management-form input:focus {
  border-color: var(--zc-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--zc-accent) 14%, transparent);
}

.zc-composer-actions {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.zc-icon-button,
.zc-send-button,
.zc-open-full,
.zc-modal-cancel {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 850;
}

.zc-icon-button,
.zc-modal-cancel {
  border: 1px solid var(--zc-line);
  background: var(--zc-paper);
  color: var(--zc-ink);
}

.zc-send-button,
.zc-open-full {
  border: 1px solid transparent;
  background: var(--zc-accent);
  color: #fff;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--zc-accent) 20%, transparent);
}

.zc-send-button:hover,
.zc-open-full:hover {
  background: var(--zc-accent-strong);
}

.zc-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.zc-attachment-rules,
.zc-status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 10px;
}

.zc-attachment-rules {
  color: var(--zc-muted);
}

.zc-status {
  min-height: 0;
  color: var(--zc-muted);
}

.zc-status.is-error {
  color: var(--zc-danger);
}

.zc-status:empty {
  display: none;
}

.zc-pending-attachments {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
}

.zc-pending-attachments:empty {
  display: none;
}

.zc-pending-file {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  max-width: 250px;
  min-height: 48px;
  padding: 5px 6px;
  border: 1px solid var(--zc-line);
  border-radius: 10px;
  background: var(--zc-canvas);
}

.zc-pending-file.image {
  display: block;
  width: 104px;
  height: 78px;
  padding: 0;
  overflow: hidden;
  background: #181318;
}

.zc-pending-file.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zc-pending-name {
  overflow: hidden;
  color: var(--zc-ink);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zc-pending-file.image .zc-pending-name {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 14px 5px 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75));
  color: #fff;
}

.zc-remove-pending {
  padding: 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--zc-danger);
  font-size: 9px;
  font-weight: 850;
}

.zc-pending-file.image .zc-remove-pending {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(25, 17, 23, .78);
  color: #fff;
}

.zc-mention-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 7px);
  left: 0;
  z-index: 4;
  max-height: 250px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--zc-line);
  border-radius: 12px;
  background: var(--zc-paper);
  box-shadow: var(--zc-shadow);
}

.zc-mention-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--zc-ink);
  text-align: left;
}

.zc-mention-option:hover,
.zc-mention-option.active {
  background: color-mix(in srgb, var(--zc-accent) 10%, var(--zc-paper));
}

.zc-mention-avatar,
.zc-member-avatar {
  width: 32px;
  height: 32px;
}

.zc-empty {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  color: var(--zc-muted);
  text-align: center;
}

.zc-empty strong {
  color: var(--zc-ink);
  font-size: 13px;
}

.zc-empty span {
  max-width: 360px;
  font-size: 11px;
  line-height: 1.5;
}

.zc-empty-rail {
  min-height: 150px;
  color: rgba(255, 255, 255, .65);
}

.zc-empty-rail strong {
  color: #fff;
}

.zc-floating-layer {
  position: fixed;
  inset: 0;
  z-index: 46;
  pointer-events: none;
}

.zc-floating-layer[hidden] {
  display: none;
}
.zc-unread-count[hidden],
.zc-history-button[hidden],
.zc-mention-list[hidden] {
  display: none;
}


.zc-chat-bubble {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 46px;
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--zc-accent) 45%, transparent);
  border-radius: 999px;
  background: var(--zc-deep);
  color: #fff;
  box-shadow: 0 14px 34px rgba(45, 27, 41, .28);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  opacity: 0;
  transform: translate(10px, 10px) scale(.86);
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
}

.zc-floating-layer.is-chat-nearby .zc-chat-bubble,
.zc-floating-layer.is-panel-open .zc-chat-bubble,
.zc-chat-bubble:focus-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.zc-chat-bubble:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--zc-deep) 88%, var(--zc-accent));
}

.zc-floating-layer .zc-chat-bubble { cursor: pointer; }

.zc-floating-layer .zc-chat-bubble.is-dragging {
  cursor: grabbing;
  transform: none;
}

.zc-bubble-icon {
  position: relative;
  width: 20px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.zc-bubble-icon::after {
  position: absolute;
  bottom: -5px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  background: var(--zc-deep);
  content: "";
  transform: skewY(-35deg);
}

.zc-unread-count {
  position: absolute;
  top: -4px;
  right: -3px;
  border: 2px solid var(--zc-paper);
}

.zc-compact-panel {
  position: absolute;
  right: 24px;
  bottom: 92px;
  width: min(390px, calc(100vw - 32px));
  max-height: min(590px, calc(100vh - 110px));
  overflow-y: auto;
  border: 1px solid var(--zc-line);
  border-radius: 18px;
  background: var(--zc-paper);
  box-shadow: 0 22px 58px rgba(45, 27, 41, .28);
  pointer-events: auto;
}

.zc-compact-panel[hidden] {
  display: none;
}

.zc-compact-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 17px 12px;
}

.zc-compact-heading-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.zc-sound-preview,
.zc-sound-toggle,
.zc-close-button,
.zc-modal-close {
  min-width: 34px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--zc-line);
  border-radius: 999px;
  background: var(--zc-canvas);
  color: var(--zc-ink);
  font-size: 10px;
  font-weight: 850;
}

.zc-compact-select {
  display: grid;
  gap: 5px;
  padding: 0 17px 12px;
  color: var(--zc-muted);
  font-size: 10px;
  font-weight: 800;
}

.zc-compact-select select,
.zc-mobile-space-select select {
  min-height: 40px;
  padding: 8px 10px;
}

.zc-compact-messages {
  max-height: 276px;
  padding: 7px 0;
  overflow-y: auto;
  border-top: 1px solid var(--zc-soft-line);
  border-bottom: 1px solid var(--zc-soft-line);
  background: color-mix(in srgb, var(--zc-canvas) 42%, var(--zc-paper));
}

.zc-bubble-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.zc-compact-messages .zc-empty {
  min-height: 160px;
}

.zc-compact-message {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: end;
  gap: 9px;
  padding: 4px 15px;
}

.zc-compact-message.own {
  grid-template-columns: minmax(0, 1fr) 32px;
}

.zc-compact-message > div:not(.zc-compact-avatar) {
  width: fit-content;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--zc-line);
  border-radius: 12px 12px 12px 4px;
  background: var(--zc-paper);
}

.zc-compact-message.own .zc-compact-avatar {
  grid-column: 2;
  grid-row: 1;
}

.zc-compact-message.own > div:not(.zc-compact-avatar) {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  border-color: color-mix(in srgb, var(--zc-accent) 34%, var(--zc-line));
  border-radius: 12px 12px 4px 12px;
  background: color-mix(in srgb, var(--zc-accent) 15%, var(--zc-paper));
}

.zc-compact-avatar {
  width: 32px;
  height: 32px;
}

.zc-compact-message header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.zc-compact-message strong {
  font-size: 11px;
}

.zc-compact-message time {
  color: var(--zc-muted);
  font-size: 9px;
}

.zc-compact-message p {
  display: -webkit-box;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--zc-muted);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.zc-quick-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 12px 15px 7px;
}

.zc-compact-message.own header {
  justify-content: flex-end;
}

.zc-quick-reply textarea {
  min-height: 42px;
  max-height: 90px;
  padding: 9px 10px;
  resize: vertical;
}

.zc-quick-reply .zc-status {
  grid-column: 1 / -1;
}

.zc-quick-reply .zc-send-button {
  min-height: 44px;
  padding: 8px 13px;
  white-space: nowrap;
}

.zc-open-full {
  display: block;
  width: auto;
  min-width: 148px;
  min-height: 44px;
  margin: 6px auto 15px;
  padding: 8px 14px;
}

body.zc-modal-open {
  overflow: hidden;
}

.zc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(25, 17, 23, .72);
  backdrop-filter: blur(5px);
}

.zc-modal {
  position: relative;
  width: min(590px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow-y: auto;
  border: 1px solid var(--zc-line);
  border-radius: 18px;
  background: var(--zc-paper);
  box-shadow: 0 28px 80px rgba(17, 9, 15, .38);
}

.zc-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.zc-image-viewer {
  display: grid;
  place-items: center;
  width: min(1050px, 100%);
  padding: 48px 20px 16px;
  background: #171217;
  color: #fff;
}

.zc-image-viewer .zc-modal-close {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.zc-image-viewer img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
}

.zc-image-viewer p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 11px;
}

.zc-management-form {
  padding: 25px;
}

.zc-management-form header {
  padding-right: 72px;
}

.zc-management-form header p:last-child {
  margin: 7px 0 18px;
  color: var(--zc-muted);
  font-size: 11px;
  line-height: 1.5;
}

.zc-management-name {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--zc-ink);
  font-size: 11px;
  font-weight: 800;
}

.zc-management-form input[type="text"],
.zc-management-form input:not([type]) {
  min-height: 42px;
  padding: 9px 11px;
}

.zc-space-visibility {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 13px;
  border: 1px solid var(--zc-line);
  border-radius: 13px;
}

.zc-space-visibility > legend,
.zc-scope-detail > legend {
  padding: 0 7px;
  color: var(--zc-ink);
  font-size: 11px;
  font-weight: 850;
}

.zc-space-visibility > p {
  margin: -3px 0 0;
  color: var(--zc-muted);
  font-size: 10px;
  line-height: 1.45;
}

.zc-scope-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.zc-scope-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--zc-soft-line);
  border-radius: 10px;
  background: var(--zc-canvas);
}

.zc-scope-option:has(input:checked) {
  border-color: var(--zc-accent);
  background: color-mix(in srgb, var(--zc-accent) 9%, var(--zc-paper));
}

.zc-scope-option input,
.zc-clinic-scope input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--zc-accent);
}

.zc-scope-option strong,
.zc-scope-option small {
  display: block;
}

.zc-scope-option strong {
  color: var(--zc-ink);
  font-size: 10px;
}

.zc-scope-option small {
  margin-top: 3px;
  color: var(--zc-muted);
  font-size: 9px;
  line-height: 1.35;
}

.zc-scope-detail {
  display: grid;
  gap: 7px;
  color: var(--zc-ink);
  font-size: 10px;
  font-weight: 800;
}

.zc-scope-detail[hidden] {
  display: none;
}

.zc-scope-detail select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--zc-line);
  border-radius: 10px;
  background: var(--zc-paper);
  color: var(--zc-ink);
}

.zc-clinic-scope label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 3px;
  font-weight: 700;
}

.zc-member-list {
  display: grid;
  gap: 7px;
  max-height: 390px;
  margin: 0;
  padding: 13px;
  overflow-y: auto;
  border: 1px solid var(--zc-line);
  border-radius: 13px;
}

.zc-member-list legend {
  padding: 0 7px;
  color: var(--zc-ink);
  font-size: 11px;
  font-weight: 850;
}

.zc-member-option {
  display: grid;
  grid-template-columns: auto 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--zc-soft-line);
  border-radius: 10px;
  background: var(--zc-canvas);
}

.zc-member-option.incompatible {
  opacity: .48;
  filter: grayscale(.35);
}

.zc-member-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--zc-accent);
}

.zc-member-option strong,
.zc-member-option small {
  display: block;
}

.zc-member-option strong {
  color: var(--zc-ink);
  font-size: 11px;
}

.zc-member-option small {
  margin-top: 2px;
  color: var(--zc-muted);
  font-size: 9px;
}

.zc-modal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

html[data-theme="dark"] .zc-workspace,
html[data-theme="dark"] .zc-compact-panel,
html[data-theme="dark"] .zc-modal,
html[data-theme="dark"] .zc-composer,
html[data-theme="dark"] .zc-conversation-heading,
html[data-theme="dark"] .zc-document-card,
html[data-theme="dark"] .zc-mention-list {
  border-color: var(--zc-line);
  background-color: var(--zc-paper);
  color: var(--zc-ink);
}

html[data-theme="dark"] .zc-chat-bubble {
  border-color: color-mix(in srgb, var(--zc-accent) 50%, transparent);
}

html[data-theme="dark"] .zc-image-attachment {
  background: #120e12;
}

@media (max-width: 920px) {
  .zc-workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .zc-spaces-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .zc-space-rail {
    height: calc(100% - 120px);
  }

  .zc-conversation-heading {
    padding-inline: 16px;
  }

  .zc-heading-actions .zc-admin-button {
    max-width: 120px;
  }
}

@media (max-width: 720px) {
  .zc-workspace {
    display: block;
    height: calc(100vh - 126px);
    height: calc(100dvh - 126px);
    min-height: 0;
    border-radius: 14px;
  }

  .zc-spaces-panel {
    display: none;
  }

  .zc-conversation {
    height: 100%;
  }

  .zc-conversation-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 104px;
  }

  .zc-mobile-space-select {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: var(--zc-muted);
    font-size: 10px;
    font-weight: 800;
  }

  .zc-conversation-title span {
    max-width: 62vw;
  }

  .zc-message-region {
    padding: 14px 13px 22px;
  }

  .zc-message-content {
    max-width: 88%;
  }

  .zc-composer {
    grid-template-columns: 1fr;
    padding: 10px 11px 12px;
  }

  .zc-composer-actions {
    justify-content: flex-end;
  }

  .zc-attachment-rules {
    display: none;
  }

  .zc-chat-bubble {
    right: 14px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    opacity: .72;
    transform: none;
    pointer-events: auto;
  }

  .zc-bubble-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .zc-modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .zc-modal {
    width: 100%;
    max-height: 88vh;
    border-radius: 18px 18px 0 0;
  }

  .zc-management-form {
    padding: 22px 16px;
  }

  .zc-scope-options {
    grid-template-columns: 1fr;
  }

  .zc-modal-actions {
    grid-template-columns: 1fr 1fr;
  }

  .zc-modal-actions .zc-status {
    grid-column: 1 / -1;
  }

  .zc-image-viewer {
    border-radius: 0;
  }
}

@media (max-width: 440px) {
  .zc-compact-panel {
    width: calc(100vw - 20px);
  }

  .zc-quick-reply {
    grid-template-columns: 1fr;
  }

  .zc-document-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .zc-document-action {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zc-chat-bubble {
    transition: none;
  }
}
