/* R006 workspace structure aligned to the deployed Inbox and Chat layouts. */
body[data-page="workspace"] {
  overflow: hidden;
}

.app-shell {
  --details-width: clamp(260px, 23vw, 300px);
  --sidebar-expanded-width: 260px;
  --sidebar-width: var(--sidebar-expanded-width);
  --ticket-list-width: 350px;
  grid-template-columns:
    var(--sidebar-width)
    var(--ticket-list-width)
    minmax(0, 1fr)
    var(--details-width);
  grid-template-rows: 64px minmax(0, 1fr);
  height: 100dvh;
}

.app-shell.sidebar-collapsed {
  --sidebar-width: 64px;
}

.app-shell > .global-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  height: 100dvh;
}

.app-shell > .workspace-topbar {
  grid-column: 2 / -1;
  grid-row: 1;
}

.app-shell > .ticket-list {
  grid-column: 2;
  grid-row: 2;
}

.app-shell > .conversation {
  grid-column: 3;
  grid-row: 2;
}

.app-shell > .details-panel {
  grid-column: 4;
  grid-row: 2;
}

.workspace-topbar {
  align-items: center;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
  min-width: 0;
  padding: 12px 16px 12px 24px;
}

.workspace-scope {
  flex: none;
  font-size: 15px;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-search {
  align-items: center;
  background: var(--g50);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  flex: 1 1 300px;
  gap: 8px;
  height: 36px;
  max-width: 420px;
  min-width: 150px;
  padding: 0 12px;
}

.topbar-search:focus-within {
  border-color: var(--g500);
  box-shadow: 0 0 0 3px rgba(90, 90, 90, 0.12);
}

.topbar-search svg,
.layout-select svg,
.new-email-trigger svg {
  fill: none;
  flex: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 16px;
}

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

.workspace-topbar-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-left: auto;
}

.layout-select {
  position: relative;
}

.layout-select-trigger {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 6px;
  display: flex;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
}

.layout-select-trigger > span:nth-child(2) {
  min-width: 44px;
  text-align: left;
}

.layout-select-chevron {
  color: var(--muted);
}

.layout-select-trigger:focus-visible,
.layout-select-menu button:focus-visible {
  outline: 2px solid var(--g700);
  outline-offset: 2px;
}

.layout-select-menu {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 6px;
  box-shadow: 0 5px 14px rgb(0 0 0 / 0.12);
  display: grid;
  min-width: 150px;
  padding: 4px;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 40;
}

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

.layout-select-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  display: flex;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
  width: 100%;
}

.layout-select-menu button:hover,
.layout-select-menu button[aria-selected="true"] {
  background: var(--g100);
}

.layout-select-menu button[aria-selected="true"] {
  font-weight: 800;
}

.workspace-selectors > small {
  display: none;
}

.ticket-list,
.conversation,
.details-panel {
  height: auto;
  min-height: 0;
}

.list-header {
  align-items: center;
  height: 60px;
  min-height: 60px;
  padding: 8px 18px;
}

.list-header h1 {
  font-size: 15px;
  margin: 0;
}

.list-header p {
  margin-top: 3px;
}

.list-header-actions {
  align-items: center;
  gap: 16px;
}

.new-email-trigger {
  height: 36px;
  width: 36px;
}

.count-pill {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-weight: 500;
  height: auto;
  padding: 0;
  width: auto;
}

.context-chips[hidden] {
  display: none;
}

.app-shell.layout-inbox:not(.has-conversation) {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.app-shell.layout-inbox:not(.has-conversation) > .ticket-list {
  display: flex;
  grid-column: 2;
}

.app-shell.layout-inbox:not(.has-conversation) > .conversation,
.app-shell.layout-inbox:not(.has-conversation) > .details-panel {
  display: none;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-list-resizer {
  display: none;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-row {
  align-items: center;
  background: var(--g25);
  border-bottom: 1px solid var(--border);
  border-left: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 20px minmax(140px, 200px) minmax(0, 1fr) 76px 48px;
  grid-template-rows: 28px;
  height: 45px;
  min-height: 45px;
  padding: 8px 20px;
  position: relative;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-row:hover,
.app-shell.layout-inbox:not(.has-conversation) .ticket-row.selected {
  background: var(--g100);
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-row > .avatar {
  display: none;
}

.app-shell.layout-inbox:not(.has-conversation) .row-copy,
.app-shell.layout-inbox:not(.has-conversation) .row-top {
  display: contents;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-requester {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
}

.app-shell.layout-inbox:not(.has-conversation) .row-top > time {
  grid-column: 5;
  grid-row: 1;
  text-align: right;
}

.app-shell.layout-inbox:not(.has-conversation) .row-copy > small:first-of-type {
  color: var(--muted);
  font-size: 0;
  grid-column: 1;
  grid-row: 1;
}

.app-shell.layout-inbox:not(.has-conversation) .row-copy > small:first-of-type .channel-marker {
  font-size: 14px;
}

.app-shell.layout-inbox:not(.has-conversation) .row-copy > span:nth-of-type(2) {
  grid-column: 3;
  grid-row: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-tag-line {
  display: none;
}

.app-shell.layout-inbox:not(.has-conversation) .row-meta {
  grid-column: 4;
  grid-row: 1;
  justify-content: flex-end;
  margin: 0;
}

.app-shell.layout-inbox:not(.has-conversation) .row-meta em {
  border: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  padding: 0;
}

.app-shell.layout-inbox:not(.has-conversation) .row-meta small {
  display: none;
}

.app-shell.layout-inbox.has-conversation {
  grid-template-columns:
    var(--sidebar-width)
    minmax(0, 1fr)
    var(--details-width);
}

.app-shell.layout-inbox.has-conversation.details-hidden {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 0;
}

.app-shell.layout-inbox.has-conversation > .ticket-list {
  display: none;
}

.app-shell.layout-inbox.has-conversation > .conversation {
  display: flex;
  grid-column: 2;
}

.app-shell.layout-inbox.has-conversation > .details-panel {
  grid-column: 3;
}

.app-shell.layout-inbox.has-conversation .mobile-ticket-back {
  display: inline-flex;
}

.app-shell.layout-chat {
  grid-template-columns:
    var(--sidebar-width)
    var(--ticket-list-width)
    minmax(0, 1fr)
    var(--details-width);
}

.app-shell.layout-chat.details-hidden {
  grid-template-columns:
    var(--sidebar-width)
    var(--ticket-list-width)
    minmax(0, 1fr)
    0;
}

.app-shell.layout-chat > .ticket-list,
.app-shell.layout-chat > .conversation {
  display: flex;
}

.app-shell.layout-chat .list-header {
  height: 76px;
  min-height: 76px;
}

.app-shell.layout-chat .count-pill {
  align-items: center;
  background: var(--g100);
  border-radius: 999px;
  color: var(--g700);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

@media(max-width: 1199px) {
  .app-shell,
  .app-shell.layout-inbox:not(.has-conversation),
  .app-shell.layout-inbox.has-conversation,
  .app-shell.layout-inbox.has-conversation.details-hidden {
    --sidebar-width: 64px;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .app-shell.layout-chat,
  .app-shell.layout-chat.details-hidden {
    --ticket-list-width: clamp(270px, 34vw, 330px);
    grid-template-columns: 64px var(--ticket-list-width) minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .app-shell > .workspace-topbar {
    grid-column: 2 / -1;
  }

  .app-shell.layout-inbox:not(.has-conversation) > .ticket-list,
  .app-shell.layout-inbox.has-conversation > .conversation {
    grid-column: 2;
    grid-row: 2;
  }

  .app-shell.layout-chat > .ticket-list {
    grid-column: 2;
    grid-row: 2;
  }

  .app-shell.layout-chat > .conversation {
    grid-column: 3;
    grid-row: 2;
  }

  .workspace-topbar {
    padding-left: 14px;
  }
}

@media(max-width: 767px) {
  .app-shell,
  .app-shell.layout-inbox:not(.has-conversation),
  .app-shell.layout-inbox.has-conversation,
  .app-shell.layout-inbox.has-conversation.details-hidden,
  .app-shell.layout-chat,
  .app-shell.layout-chat.details-hidden {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .app-shell > .workspace-topbar {
    grid-column: 2;
  }

  .app-shell.layout-chat > .ticket-list,
  .app-shell.layout-chat > .conversation,
  .app-shell.layout-inbox > .ticket-list,
  .app-shell.layout-inbox > .conversation {
    grid-column: 2;
    grid-row: 2;
  }

  .app-shell:not(.has-conversation) > .ticket-list {
    display: flex;
  }

  .app-shell:not(.has-conversation) > .conversation,
  .app-shell.has-conversation > .ticket-list {
    display: none;
  }

  .app-shell.has-conversation > .conversation {
    display: flex;
  }

  .workspace-scope {
    display: none;
  }

  .workspace-topbar {
    gap: 8px;
    padding: 10px;
  }

  .topbar-search {
    flex-basis: auto;
  }

  .layout-select-trigger {
    padding: 8px 9px;
  }

  .layout-select-trigger > span:nth-child(2) {
    display: none;
  }

  .app-shell.layout-inbox:not(.has-conversation) .ticket-row {
    gap: 4px 8px;
    grid-template-columns: 18px minmax(0, 1fr) 44px;
    grid-template-rows: 20px 20px;
    height: 65px;
    min-height: 65px;
    padding: 10px 12px;
  }

  .app-shell.layout-inbox:not(.has-conversation) .ticket-requester {
    grid-column: 2;
  }

  .app-shell.layout-inbox:not(.has-conversation) .row-top > time {
    grid-column: 3;
  }

  .app-shell.layout-inbox:not(.has-conversation) .row-copy > span:nth-of-type(2) {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  .app-shell.layout-inbox:not(.has-conversation) .row-meta {
    display: none;
  }
}

/* R006 Round 3: compact subject identity and persistent response modes. */
.email-subject-primary {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.email-subject-channel {
  align-items: center;
  color: var(--g600);
  display: inline-flex;
  flex: none;
  justify-content: center;
}

.email-subject-channel .wf-icon {
  height: 18px;
  width: 18px;
}

.email-subject-ticket {
  color: var(--g600);
  flex: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  margin-right: 2px;
}

.email-subject-primary h1 {
  flex: 1 1 auto;
}

.inbox-response-button[aria-pressed="true"] {
  background: var(--g700);
  border-color: var(--g700);
  color: var(--white);
}

.inbox-response-button[aria-pressed="true"]:hover,
.inbox-response-button[aria-pressed="true"]:focus-visible {
  background: var(--g800);
  border-color: var(--g800);
}

.app-shell.layout-inbox.has-conversation > .conversation > .composer .composer-mode-buttons {
  display: none;
}

@media(max-width: 460px) {
  .email-subject-primary {
    align-items: flex-start;
  }

  .email-subject-channel,
  .email-subject-ticket {
    margin-top: 3px;
  }
}

/* Round 5: icon-only channels and bulk Ticket selection. */
.ticket-bulk-toolbar {
  align-items: center;
  background: var(--g25);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-height: 45px;
  padding: 6px 12px;
}

.bulk-select-all {
  align-items: center;
  display: inline-flex;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  min-height: 32px;
  white-space: nowrap;
}

.bulk-select-all input,
.ticket-select {
  accent-color: var(--g700);
  height: 15px;
  margin: 0;
  width: 15px;
}

.bulk-actions {
  align-items: center;
  display: flex;
  flex: 1 1 430px;
  flex-wrap: wrap;
  gap: 6px;
}

.bulk-actions[hidden] {
  display: none;
}

.bulk-action-button,
.bulk-actions select {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  height: 32px;
  padding: 0 9px;
}

.bulk-action-button:hover,
.bulk-actions select:hover {
  background: var(--g100);
}

.ticket-row {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.ticket-row.is-checked {
  background: var(--g100);
}

.ticket-requester {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-width: 0;
}

.ticket-requester > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-number {
  color: var(--muted);
  flex: none;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

.ticket-row .ticket-requester > strong,
.ticket-row .row-top > time,
.ticket-row .ticket-subject-text {
  font-weight: 400;
}

.ticket-row.is-unread .ticket-requester > strong,
.ticket-row.is-unread .row-top > time,
.ticket-row.is-unread .ticket-subject-text {
  color: var(--text);
  font-weight: 800;
}

.ticket-snippet {
  color: var(--muted);
  display: none;
  font-weight: 400;
}

.ticket-select {
  align-self: start;
  margin-top: 12px;
}

.ticket-row-open {
  align-items: start;
  background: transparent;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-width: 0;
  padding: 0;
  text-align: left;
  width: 100%;
}

.ticket-row-open:focus-visible {
  border-radius: 4px;
  outline-offset: 2px;
}

.ticket-channel .channel-routing {
  margin-left: 6px;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-bulk-toolbar {
  padding-left: 20px;
  padding-right: 20px;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-row {
  align-items: center;
  gap: 8px;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-rows: 44px;
  padding: 0 20px;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-select {
  align-self: center;
  grid-column: 1;
  margin: 0;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-row-open {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-column: 2;
  grid-template-columns: 20px minmax(140px, 200px) minmax(0, 1fr) 76px 48px;
  grid-template-rows: 44px;
  height: 44px;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-snippet {
  display: inline;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-row-open > .avatar {
  display: none;
}

.app-shell.layout-inbox:not(.has-conversation) .row-copy > small.ticket-channel {
  display: block;
  font-size: 0;
  grid-column: 1;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-channel .channel-routing {
  display: none;
}

@media(max-width: 767px) {
  .ticket-bulk-toolbar,
  .app-shell.layout-inbox:not(.has-conversation) .ticket-bulk-toolbar {
    padding: 6px 8px;
  }

  .bulk-actions {
    flex-basis: 100%;
  }

  .app-shell.layout-inbox:not(.has-conversation) .ticket-row {
    gap: 8px;
    grid-template-columns: 16px minmax(0, 1fr);
    grid-template-rows: 65px;
    padding: 0 8px;
  }

  .app-shell.layout-inbox:not(.has-conversation) .ticket-row-open {
    gap: 4px 8px;
    grid-template-columns: 18px minmax(0, 1fr) 44px;
    grid-template-rows: 20px 20px;
    height: 64px;
  }
}

@media(max-width: 420px) {
  .app-shell,
  .app-shell.layout-inbox:not(.has-conversation),
  .app-shell.layout-inbox.has-conversation,
  .app-shell.layout-inbox.has-conversation.details-hidden,
  .app-shell.layout-chat,
  .app-shell.layout-chat.details-hidden {
    grid-template-columns: 56px minmax(0, 1fr);
  }
}

/* R006 Round 1: Gmail-referenced Inbox message reader. */
.chat-ticket-heading {
  display: none;
}

.inbox-message-toolbar,
.inbox-message-actions,
.email-subject-line,
.email-sender-block,
.email-sender-copy > span,
.message-header,
.message-header-actions {
  align-items: center;
  display: flex;
}

.inbox-message-toolbar {
  gap: 12px;
  min-width: 0;
}

.inbox-message-actions {
  gap: 2px;
}

.email-toolbar-button,
.email-message-action {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--g600);
  display: inline-flex;
  flex: none;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.email-toolbar-button:hover,
.email-message-action:hover,
.email-toolbar-button:focus-visible,
.email-message-action:focus-visible {
  background: var(--g100);
}

.email-toolbar-button .wf-icon,
.email-message-action .wf-icon {
  height: 17px;
  width: 17px;
}

.app-shell.layout-inbox.has-conversation > .conversation {
  background: var(--white);
}

.app-shell.layout-inbox.has-conversation .email-detail-header {
  align-items: center;
  display: grid;
  flex: 0 0 auto;
  gap: 4px 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 40px auto;
  height: auto;
  min-height: 150px;
  padding: 8px 24px 14px;
}

.app-shell.layout-inbox.has-conversation .inbox-message-toolbar {
  grid-column: 1;
  grid-row: 1;
}

.app-shell.layout-inbox.has-conversation .email-detail-header > .header-actions {
  grid-column: 2;
  grid-row: 1;
}

.app-shell.layout-inbox.has-conversation .inbox-email-heading {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0 auto;
  max-width: 980px;
  min-width: 0;
  width: 100%;
}

.email-subject-line {
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.email-subject-line h1 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
}

.email-subject-meta {
  align-items: center;
  display: inline-flex;
  flex: none;
  gap: 5px;
}

.email-subject-meta > span {
  background: var(--g100);
  border-radius: 3px;
  color: var(--g600);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
}

.email-sender-block {
  gap: 12px;
  margin-top: 16px;
  min-width: 0;
}

.email-sender-block .avatar,
.message-avatar {
  border-radius: 50%;
}

.email-sender-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.email-sender-copy > span {
  gap: 6px;
  min-width: 0;
}

.email-sender-copy strong {
  font-size: 13px;
}

.email-sender-copy [data-header-sender] {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-sender-copy small {
  font-size: 11px;
  margin-top: 3px;
}

.app-shell.layout-inbox.has-conversation .timeline {
  background: var(--white);
  padding: 0 24px 20px;
}

.app-shell.layout-inbox.has-conversation .timeline > * {
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
  width: 100%;
}

.app-shell.layout-inbox.has-conversation .day-rule {
  display: none;
}

.app-shell.layout-inbox.has-conversation .message {
  background: var(--white);
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  margin-bottom: 0;
  margin-top: 0;
  max-width: none;
  padding: 18px 0 24px;
}

.message-header {
  gap: 12px;
  min-width: 0;
}

.message-header .message-meta {
  align-items: flex-start;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  min-width: 0;
}

.message-meta > span {
  align-items: baseline;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.message-meta > span > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-meta strong {
  color: var(--text);
  font-size: 13px;
}

.message-meta small {
  font-size: 10px;
}

.message-header-actions {
  flex: none;
  gap: 2px;
}

.message-header-actions .message-timestamp {
  margin: 0 4px 0 0;
  white-space: nowrap;
}

.email-message-action {
  height: 30px;
  width: 30px;
}

.email-message-action .wf-icon {
  height: 15px;
  width: 15px;
}

.app-shell.layout-inbox.has-conversation .message-copy {
  font-size: 13px;
  line-height: 1.6;
  max-width: 800px;
  padding: 4px 0 0 52px;
}

.app-shell.layout-inbox.has-conversation .message-copy p {
  margin: 12px 0 0;
}

.app-shell.layout-inbox.has-conversation .message-copy .attachment {
  max-width: 420px;
}

.app-shell.layout-inbox.has-conversation .note-message {
  background: var(--g50);
  border: 1px dashed var(--g300);
  border-radius: 8px;
  margin-bottom: 14px;
  margin-top: 14px;
  padding: 14px;
}

.app-shell.layout-inbox.has-conversation .note-message .message-copy {
  padding-left: 52px;
}

.app-shell.layout-inbox.has-conversation .system-event {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 14px;
  margin-top: 14px;
}

.app-shell.layout-inbox.has-conversation > .conversation > .composer {
  flex: none;
  margin: 0 auto 18px;
  max-width: 900px;
  width: calc(100% - 48px);
}

.app-shell.layout-inbox.has-conversation > .conversation > .read-only-banner {
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
  width: calc(100% - 48px);
}

.app-shell.layout-chat .inbox-email-heading,
.app-shell.layout-chat .inbox-message-toolbar {
  display: none;
}

.app-shell.layout-chat .chat-ticket-heading {
  display: flex;
}

.app-shell.layout-chat .email-detail-header {
  display: flex;
  height: 82px;
  min-height: 82px;
  padding: 12px 16px;
}

.app-shell.layout-chat .message-header {
  align-items: flex-start;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
}

.app-shell.layout-chat .message-avatar {
  border-radius: 8px;
  height: 30px;
  width: 30px;
}

.app-shell.layout-chat .message-header-actions .email-message-action {
  display: none;
}

.app-shell.layout-chat .message-meta > span > span {
  display: none;
}

.app-shell.layout-chat .message-meta small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.layout-chat .message-header-actions {
  align-items: flex-start;
}

.app-shell.layout-chat .message-header-actions .message-timestamp {
  margin-right: 0;
}

.app-shell.layout-chat .message-copy {
  font-size: 13px;
  line-height: 1.5;
  padding-left: 42px;
}

.app-shell.layout-chat .attachment small {
  display: block;
  float: none;
  margin-top: 3px;
}

@media(max-width: 1199px) {
  .app-shell.layout-inbox.has-conversation > .details-panel {
    height: calc(100dvh - 214px);
    top: 214px;
  }
}

@media(max-width: 767px) {
  .app-shell.layout-inbox.has-conversation .email-detail-header {
    gap: 2px 8px;
    grid-template-rows: 36px auto;
    min-height: 142px;
    padding: 6px 12px 12px;
  }

  .app-shell.layout-inbox.has-conversation .inbox-message-toolbar {
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .inbox-message-actions {
    flex: none;
  }

  .email-toolbar-button {
    height: 32px;
    width: 32px;
  }

  .email-subject-line {
    align-items: flex-start;
  }

  .email-subject-line h1 {
    font-size: 18px;
  }

  .email-subject-meta {
    padding-top: 2px;
  }

  .email-sender-block {
    margin-top: 12px;
  }

  .email-sender-block .avatar,
  .message-avatar {
    height: 34px;
    width: 34px;
  }

  .app-shell.layout-inbox.has-conversation .timeline {
    padding-left: 12px;
    padding-right: 12px;
  }

  .message-header {
    gap: 8px;
  }

  .message-header-actions .email-message-action {
    display: none;
  }

  .app-shell.layout-inbox.has-conversation .message-copy,
  .app-shell.layout-inbox.has-conversation .note-message .message-copy {
    padding-left: 42px;
  }

  .app-shell.layout-inbox.has-conversation > .conversation > .composer,
  .app-shell.layout-inbox.has-conversation > .conversation > .read-only-banner {
    margin-bottom: 8px;
    width: calc(100% - 20px);
  }

  .app-shell.layout-inbox.has-conversation > .details-panel {
    height: calc(100dvh - 206px);
    top: 206px;
  }

  .app-shell.layout-chat .inbox-message-toolbar {
    display: flex;
  }

  .app-shell.layout-chat .inbox-message-actions {
    display: none;
  }

  .app-shell.layout-chat .email-detail-header {
    align-items: center;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    height: 74px;
    min-height: 74px;
  }

  .app-shell.layout-chat .inbox-message-toolbar {
    grid-column: 1;
  }

  .app-shell.layout-chat .chat-ticket-heading {
    grid-column: 2;
  }

  .app-shell.layout-chat .email-detail-header > .header-actions {
    grid-column: 3;
  }
}

@media(max-width: 460px) {
  .email-subject-line {
    display: grid;
    gap: 6px;
  }

  .email-subject-meta {
    justify-self: start;
  }

  .email-sender-copy [data-header-sender] {
    max-width: 130px;
  }

  .message-header-actions .message-timestamp {
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Round 16: channel-aware message controls and composer separators. */
#composer .composer-routing-controls {
  min-width: 0;
}

#publicComposerOptions {
  border-bottom: 1px solid var(--border);
}

#composerFormattingToolbar {
  border-top: 0;
}

#composer.is-channel-details .composer-routing-controls {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr);
}

#composer.is-channel-details .composer-context {
  min-width: 0;
  padding: 8px 8px 8px 13px;
}

#composer.is-channel-details .composer-public-options {
  border: 0;
  display: block;
  min-width: 0;
  padding: 6px 12px 6px 0;
}

#composer.is-channel-details .composer-public-options .inline-field {
  grid-template-columns: auto minmax(0, 1fr);
  margin: 0;
}

@media(max-width: 600px) {
  #composer.is-channel-details .composer-routing-controls {
    grid-template-columns: minmax(0, .65fr) minmax(170px, 1.35fr);
  }

  #composer.is-channel-details .composer-context {
    overflow-wrap: anywhere;
    padding-left: 9px;
    padding-right: 4px;
  }

  #composer.is-channel-details .composer-public-options {
    padding-right: 8px;
  }

  #composer.is-channel-details .composer-public-options .inline-field {
    gap: 4px;
    grid-template-columns: 34px minmax(0, 1fr);
  }
}

@media(prefers-reduced-motion: reduce) {
  .app-shell {
    transition: none;
  }
}

/* Round 4: height-safe navigation, sidebar Compose, and mixed channels. */
.app-shell > .global-sidebar {
  overflow: hidden;
}

.sidebar-compose-button {
  align-items: center;
  background: var(--g600);
  border: 1px solid var(--g600);
  border-radius: 6px;
  color: var(--white);
  display: flex;
  flex: none;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  width: 100%;
}

.sidebar-compose-button:hover {
  background: var(--g700);
}

.sidebar-compose-button:focus-visible {
  outline: 2px solid var(--g700);
  outline-offset: 2px;
}

.sidebar-compose-button .wf-icon {
  height: 16px;
  width: 16px;
}

.sidebar-navigation-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 10px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.sidebar-navigation-scroll > nav,
.sidebar-navigation-scroll .queue-navigation {
  flex: none;
  overflow: visible;
}

.sidebar-navigation-scroll .queue-navigation {
  margin-top: 10px;
}

.ticket-rows {
  flex: 1 1 auto;
  min-height: 0;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-row {
  grid-template-columns: minmax(88px, 108px) minmax(140px, 200px) minmax(0, 1fr) 76px 48px;
}

.app-shell.layout-inbox:not(.has-conversation) .row-copy > small.ticket-channel {
  align-items: center;
  display: inline-flex;
  font-size: 10px;
  gap: 6px;
  min-width: 0;
}

.app-shell.layout-inbox:not(.has-conversation) .ticket-channel .channel-routing {
  display: none;
}

.ticket-channel .channel-marker {
  align-items: center;
  display: inline-flex;
  flex: none;
}

:is(.sidebar-collapsed, .zoom-compact) .sidebar-compose-button {
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  width: 36px;
}

:is(.sidebar-collapsed, .zoom-compact) .sidebar-compose-label {
  display: none;
}

@media(max-width: 767px) {
  .app-shell.layout-inbox:not(.has-conversation) .ticket-row {
    grid-template-columns: 18px minmax(0, 1fr) 44px;
  }

  .app-shell.layout-inbox:not(.has-conversation) .row-copy > small.ticket-channel {
    display: block;
    font-size: 0;
  }

  .app-shell.layout-inbox:not(.has-conversation) .ticket-channel .channel-routing {
    display: none;
  }
}

/* Keep the Round 5 collection structure last in the cascade. */
.app-shell.layout-inbox:not(.has-conversation) .ticket-row {
  align-items: center;
  gap: 8px;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-rows: 44px;
  padding: 0 20px;
}

.app-shell.layout-inbox:not(.has-conversation) .row-copy > small.ticket-channel {
  display: block;
  font-size: 0;
  grid-column: 1;
}

@media(max-width: 767px) {
  .app-shell.layout-inbox:not(.has-conversation) .ticket-row {
    gap: 8px;
    grid-template-columns: 16px minmax(0, 1fr);
    grid-template-rows: 65px;
    padding: 0 8px;
  }
}

/* Round 8: header utilities and tighter Ticket identity rhythm. */
.workspace-topbar {
  position: relative;
  z-index: 90;
}

.workspace-topbar > .sidebar-toggle {
  flex: 0 0 36px;
  height: 36px;
  margin: 0;
  width: 36px;
}

.workspace-topbar-actions {
  gap: 10px;
}

.workspace-user {
  flex: none;
  position: relative;
}

.workspace-user-trigger {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 0;
  text-align: center;
  width: 36px;
}

.workspace-user-trigger .wf-icon {
  height: 18px;
  width: 18px;
}

.app-shell .workspace-user-menu {
  bottom: auto;
  left: auto;
  right: 0;
  top: calc(100% + 8px);
  width: 260px;
}

.workspace-user-menu a {
  align-items: center;
  display: flex;
  gap: 10px;
}

.workspace-user-menu a[hidden] {
  display: none;
}

.workspace-user-menu a .wf-icon {
  flex: none;
  height: 16px;
  width: 16px;
}

.workspace-user-menu .profile-menu-identity small:last-child {
  font-size: 10px;
}

.ticket-requester {
  gap: 10px;
}

@media(min-width: 768px) {
  .app-shell.layout-inbox:not(.has-conversation) .ticket-row-open {
    grid-template-columns: 20px 140px minmax(0, 1fr) 76px 48px;
  }
}

/* Round 9: reduce collapse affordance to its icon and clarify the user button. */
.workspace-topbar > .sidebar-toggle {
  background: transparent;
  border: 0;
  border-radius: 0;
  flex: 0 0 16px;
  height: 16px;
  line-height: 0;
  padding: 0;
  width: 16px;
}

.workspace-user-trigger {
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Round 10: composer mode icons and primary-action contrast. */
.composer-mode-buttons {
  align-items: center;
  border-right: 1px solid var(--border);
  display: flex;
  gap: 4px;
  padding-right: 8px;
}

.composer-mode-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--g600);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.composer-mode-button:hover,
.composer-mode-button:focus-visible {
  background: var(--g100);
  border-color: var(--g300);
}

.composer-mode-button[aria-pressed="true"] {
  background: var(--g700);
  border-color: var(--g700);
  color: var(--white);
}

.composer footer .composer-mode-button .wf-icon {
  color: inherit;
  height: 16px;
  width: 16px;
}

.composer footer .split-submit .primary-button,
.composer footer .split-submit .primary-button span {
  color: var(--white);
}

/* Round 11: resilient selected icons and compact composer disclosures. */
#composer footer .composer-mode-button span,
#composer footer .composer-mode-button svg {
  color: inherit;
}

#composer footer .composer-mode-button[aria-pressed="true"],
#composer footer .composer-mode-button[aria-pressed="true"] span,
#composer footer .composer-mode-button[aria-pressed="true"] svg {
  color: var(--white);
}

.composer-attachment-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--g600);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.composer-attachment-button:hover,
.composer-attachment-button:focus-visible {
  background: var(--g100);
  border-color: var(--g300);
}

#composer footer .composer-attachment-button span,
#composer footer .composer-attachment-button svg {
  color: inherit;
}

.composer-attachment-button .wf-icon {
  height: 16px;
  width: 16px;
}

/* Round 12: compact initial states and bounded reply-editor growth. */
#composerText {
  max-height: clamp(120px, 24dvh, 180px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

.app-shell.details-hidden .details-pane-resizer {
  display: none;
}

/* Round 14: full-height Details and compact composer disclosures. */
.app-shell > .details-panel {
  align-self: stretch;
  height: 100%;
  min-height: 0;
}

.details-panel > .details-scroll {
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  padding-bottom: 16px;
}

.rich-text-toolbar[hidden] {
  display: none;
}

#composerMessageDetailsToggle[aria-expanded="true"],
#composerFormattingToggle[aria-expanded="true"] {
  background: var(--g100);
  border-color: var(--g300);
  color: var(--g700);
}

/* Keep the external Details toggle reachable above the compact overlay. */
@media(max-width: 1199px) {
  .app-shell > .details-panel {
    bottom: auto;
    height: calc(100dvh - 138px);
    top: 138px;
  }
}

@media(max-width: 420px) {
  .workspace-topbar-actions {
    gap: 8px;
  }

  .topbar-search {
    min-width: 0;
  }

  .app-shell .workspace-user-menu {
    width: min(260px, calc(100vw - 76px));
  }
}

/* R006 Round 2: Gmail-referenced on-demand Inbox responses. */
.app-shell.layout-inbox.has-conversation > .conversation {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.app-shell.layout-inbox.has-conversation .email-detail-header {
  position: sticky;
  top: 0;
  z-index: 4;
}

.app-shell.layout-inbox.has-conversation .timeline {
  flex: 0 0 auto;
  overflow: visible;
  padding-bottom: 0;
}

.inbox-response-actions {
  align-items: center;
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px auto 24px;
  max-width: 900px;
  width: calc(100% - 48px);
}

.inbox-response-actions[hidden],
.inbox-response-button[hidden] {
  display: none;
}

.inbox-response-button {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 999px;
  color: var(--g700);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  height: 38px;
  justify-content: center;
  padding: 0 16px;
}

.inbox-response-button:hover,
.inbox-response-button:focus-visible {
  background: var(--g50);
  border-color: var(--g500);
}

.inbox-response-button .wf-icon {
  height: 16px;
  width: 16px;
}

.app-shell.layout-inbox.has-conversation > .conversation > .composer.is-inbox-response-form {
  border-color: var(--g400);
  margin-bottom: 28px;
}

.inbox-composer-header {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 48px;
  padding: 7px 9px 7px 13px;
}

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

.inbox-composer-header > .wf-icon {
  color: var(--g600);
  height: 17px;
  width: 17px;
}

.inbox-composer-heading-copy {
  align-items: baseline;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.inbox-composer-heading-copy strong {
  font-size: 12px;
}

.inbox-composer-heading-copy small {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-forward-field {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: grid;
  font-size: 11px;
  font-weight: 750;
  gap: 8px;
  grid-template-columns: 32px minmax(0, 1fr);
  padding: 8px 12px;
}

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

.composer-forward-field input {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 5px;
  min-width: 0;
  padding: 7px 8px;
  width: 100%;
}

#composer.is-inbox-email-response .composer-context {
  padding-bottom: 7px;
  padding-top: 7px;
}

#composer.is-inbox-email-response .composer-public-options {
  border-top: 1px solid var(--border);
}

.app-shell.layout-chat .inbox-response-actions,
.app-shell.layout-chat .inbox-composer-header {
  display: none;
}

@media(max-width: 767px) {
  .inbox-response-actions {
    margin-bottom: 16px;
    width: calc(100% - 24px);
  }

  .inbox-response-button {
    flex: 1 1 auto;
    min-width: 96px;
    padding-inline: 12px;
  }

  .app-shell.layout-inbox.has-conversation > .conversation > .composer.is-inbox-response-form {
    margin-bottom: 12px;
  }

  .inbox-composer-heading-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  #composer.is-inbox-email-response .composer-public-options {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* R006 Round 4: compact subject-only header and richer Email thread. */
.app-shell.layout-inbox.has-conversation .email-detail-header {
  min-height: 110px;
}

.email-subject-ticket,
.email-subject-separator {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

.email-subject-ticket {
  margin-right: 0;
}

.email-subject-separator {
  color: var(--g500);
  flex: none;
}

.inbox-response-actions {
  margin-top: 20px;
}

.message-facts {
  background: var(--g25);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: grid;
  font-size: 12px;
  grid-template-columns: 82px minmax(0, 1fr);
  line-height: 1.45;
  margin: 15px 0 0;
  max-width: 620px;
  padding: 10px 12px;
}

.message-facts dt,
.message-facts dd {
  margin: 0;
  padding: 4px 0;
}

.message-facts dt {
  color: var(--muted);
  font-weight: 700;
}

.message-facts dd {
  color: var(--text);
}

.message-attachments {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(230px, 1.15fr) minmax(220px, .85fr);
  margin-top: 16px;
  max-width: 680px;
}

.message-file-attachments {
  display: grid;
  gap: 8px;
}

.message-attachment-card {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 7px;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-align: left;
}

.message-attachment-card:hover,
.message-attachment-card:focus-visible {
  background: var(--g50);
  border-color: var(--g500);
}

.message-image-attachment {
  display: grid;
  grid-template-rows: 118px auto;
  padding: 0;
}

.message-attachment-preview {
  color: var(--g600);
  display: block;
  height: 118px;
  width: 100%;
}

.preview-background {
  fill: var(--g50);
}

.preview-road {
  fill: var(--g200);
}

.preview-building {
  fill: var(--g300);
}

.preview-roof,
.preview-truck {
  fill: var(--g500);
}

.preview-door,
.preview-wheel {
  fill: var(--g700);
}

.preview-route {
  fill: none;
  stroke: var(--g700);
  stroke-dasharray: 5 5;
  stroke-linecap: round;
  stroke-width: 3;
}

.attachment-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 9px 10px;
}

.attachment-card-copy strong,
.attachment-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-card-copy strong {
  font-size: 11px;
}

.attachment-card-copy small {
  font-size: 10px;
}

.message-file-attachment {
  align-items: center;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 58px;
  padding: 0 4px 0 12px;
}

.message-file-attachment > .wf-icon {
  color: var(--g600);
  height: 17px;
  width: 17px;
}

.reply-attachments {
  margin-top: 14px;
  max-width: 360px;
}

@media(max-width: 1199px) {
  .app-shell.layout-inbox.has-conversation > .details-panel {
    height: calc(100dvh - 174px);
    top: 174px;
  }
}

@media(max-width: 767px) {
  .app-shell.layout-inbox.has-conversation .email-detail-header {
    min-height: 104px;
  }

  .email-subject-ticket,
  .email-subject-separator {
    font-size: 18px;
  }

  .inbox-response-actions {
    margin-top: 14px;
  }

  .message-facts {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .message-attachments {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell.layout-inbox.has-conversation > .details-panel {
    height: calc(100dvh - 168px);
    top: 168px;
  }
}

.app-shell.layout-chat .message-attachments {
  grid-template-columns: minmax(0, 1fr);
}

/* R006 Round 5: Chat list integrated into the left panel and message menus. */
.sidebar-chat-mount {
  border-top: 1px solid var(--border);
  display: flex;
  flex: 1 1 auto;
  margin: 10px -12px -10px;
  min-height: 0;
  overflow: hidden;
}

.sidebar-chat-mount[hidden],
.sidebar-navigation-scroll[hidden],
.ticket-bulk-toolbar[hidden],
.message-actions-menu[hidden] {
  display: none;
}

.sidebar-chat-mount > .ticket-list {
  border-right: 0;
  display: flex;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.sidebar-chat-mount .ticket-rows {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.sidebar-chat-mount .ticket-row {
  border-left-width: 3px;
  display: block;
  min-height: 108px;
  padding: 12px 12px 12px 10px;
}

.sidebar-chat-mount .ticket-row.selected {
  padding-left: 10px;
}

.sidebar-chat-mount .ticket-row-open {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-width: 0;
  width: 100%;
}

.sidebar-chat-mount .ticket-tag-line {
  margin-top: 2px;
}

.sidebar-chat-mount .empty-list {
  flex: 1 1 auto;
}

.app-shell.layout-chat {
  grid-template-columns:
    var(--sidebar-width)
    minmax(0, 1fr)
    var(--details-width);
}

.app-shell.layout-chat.details-hidden {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 0;
}

.app-shell.layout-chat > .workspace-topbar {
  grid-column: 2 / -1;
}

.app-shell.layout-chat > .conversation {
  display: flex;
  grid-column: 2;
  grid-row: 2;
}

.app-shell.layout-chat > .details-panel {
  grid-column: 3;
  grid-row: 2;
}

.app-shell.layout-chat > .global-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
}

.app-shell.layout-chat.sidebar-collapsed .sidebar-chat-mount {
  display: none;
}

/* R006 Round 10: one collapsed Status/Views rail across Inbox and Chat. */
.app-shell.sidebar-collapsed .queue-navigation {
  display: block;
}

.app-shell.sidebar-collapsed .queue-button {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.app-shell.sidebar-collapsed .queue-button > span > span:last-child,
.app-shell.sidebar-collapsed .queue-button b {
  display: none;
}

.collapsed-nav-tooltip {
  background: var(--g600);
  border: 1px solid var(--g700);
  border-radius: 4px;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  max-width: min(200px, calc(100vw - 80px));
  padding: 6px 8px;
  pointer-events: none;
  position: fixed;
  white-space: nowrap;
  z-index: 250;
}

/* Round 12: compact customer identity in Ticket Details. */
.customer-summary-identity {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 14px;
}

.customer-summary-topline {
  display: contents;
}

.customer-summary-heading {
  min-width: 0;
}

.customer-summary .customer-summary-heading h3 {
  font-size: 18px;
  margin: 0;
}

.customer-summary .customer-summary-heading p {
  margin: 2px 0 0;
}

.customer-summary-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.board-ticket-meta {
  display: none;
}

.app-shell.layout-board .board-ticket-meta {
  align-items: center;
  display: inline-flex;
}

.detail-channel-icon .wf-icon {
  height: 12px;
  width: 12px;
}

.board-detail-actions {
  align-items: center;
  display: none;
  gap: 3px;
  margin-left: auto;
}

.app-shell.layout-board .board-detail-actions {
  display: flex;
}

.app-shell.layout-board .customer-summary-identity {
  align-items: stretch;
  gap: 8px;
  grid-template-columns: 1fr;
}

.app-shell.layout-board .customer-summary-topline {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.app-shell.layout-board #detailAvatar {
  font-size: 14px;
  height: 48px;
  width: 48px;
}

.app-shell.layout-board .customer-summary-heading {
  grid-column: 1 / -1;
}

.board-customer-field {
  display: none;
}

.app-shell.layout-board .board-customer-field {
  display: block;
}

.app-shell.layout-board .customer-detail-list {
  align-items: center;
  grid-template-columns: 20px minmax(0, 1fr);
}

.app-shell.layout-board .customer-detail-list > dt,
.app-shell.layout-board .customer-detail-list > dd {
  align-self: center;
}

.customer-detail-list > dt > span {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.customer-detail-list > dt .wf-icon {
  height: 14px;
  width: 14px;
}

.copy-detail-value {
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: copy;
  font: inherit;
  margin: -3px 0;
  max-width: 100%;
  padding: 3px 0;
  text-align: left;
}

.copy-detail-value:hover,
.copy-detail-value:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.copy-detail-value:disabled {
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}

.ticket-info-section {
  display: none;
}

.app-shell.layout-board .ticket-info-section,
.board-ticket-dialog .ticket-info-section {
  display: block;
}

.ticket-info-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ticket-info-header h3 {
  margin: 0;
}

.ticket-info-header .board-column-action[hidden] {
  display: none;
}

.ticket-info-display[hidden],
.ticket-info-form[hidden] {
  display: none;
}

.ticket-info-display > dl {
  display: grid;
  font-size: 11px;
  gap: 7px 10px;
  grid-template-columns: 78px minmax(0, 1fr);
  margin: 0;
}

.ticket-info-display dt {
  color: var(--muted);
}

.ticket-info-display dd {
  font-weight: 700;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ticket-info-tags {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
  margin-top: 11px;
  min-height: 19px;
  width: 100%;
}

.ticket-info-tag {
  background: var(--g100);
  border: 1px solid var(--g300);
  border-radius: 999px;
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
}

.ticket-info-empty-tags {
  color: var(--muted);
  font-size: 10px;
}

.ticket-info-form {
  display: grid;
  gap: 9px;
}

.ticket-info-form label {
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  margin: 0;
}

.ticket-info-form select {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
  min-height: 34px;
  min-width: 0;
  padding: 5px 7px;
  width: 100%;
}

.ticket-info-form footer {
  display: flex;
  justify-content: flex-end;
}

.detail-inline-cell {
  min-width: 0;
}

.detail-inline-value {
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  margin: -3px 0;
  max-width: 100%;
  padding: 3px 0;
  text-align: left;
}

.detail-inline-value:hover,
.detail-inline-value:focus-visible {
  text-decoration: underline;
}

.detail-inline-tags {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.detail-tag-display,
.board-dialog-tag-display {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.detail-tag-display[hidden],
.board-dialog-tag-display[hidden] {
  display: none;
}

.tag-edit-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.tag-edit-button:hover,
.tag-edit-button:focus-visible {
  background: var(--g100);
  color: var(--text);
}

.tag-edit-button .wf-icon {
  height: 14px;
  width: 14px;
}

.detail-inline-tags span,
.board-dialog-tag-value span {
  background: var(--g100);
  border: 1px solid var(--g300);
  border-radius: 999px;
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
}

.detail-inline-editor {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.detail-inline-editor[hidden] {
  display: none;
}

.detail-inline-editor input,
.detail-inline-editor select {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
  min-height: 30px;
  min-width: 0;
  padding: 5px 7px;
  width: 100%;
}

.detail-inline-editor .compact-button {
  align-self: stretch;
  min-height: 34px;
}

.detail-disclosure {
  padding: 0;
}

.detail-disclosure > summary {
  align-items: center;
  cursor: default;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  list-style: none;
  padding: 15px 17px;
}

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

.app-shell.layout-board .detail-disclosure > summary {
  cursor: pointer;
}

.app-shell.layout-board .detail-disclosure > summary:hover,
.app-shell.layout-board .detail-disclosure > summary:focus-visible {
  background: var(--g50);
}

.app-shell.layout-board .detail-disclosure[open] > summary {
  border-bottom: 1px solid var(--border);
}

.detail-disclosure-title {
  font-size: 13px;
  font-weight: 800;
}

.detail-disclosure-count {
  background: var(--g100);
  border: 1px solid var(--g300);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
}

.detail-disclosure-chevron {
  transition: transform 160ms ease;
}

.detail-disclosure-chevron .wf-icon {
  height: 14px;
  width: 14px;
}

.detail-disclosure[open] .detail-disclosure-chevron {
  transform: rotate(180deg);
}

.app-shell:not(.layout-board) .detail-disclosure-chevron {
  display: none;
}

.detail-disclosure-body {
  padding: 4px 17px 17px;
}

.activity-disclosure {
  display: none;
}

.app-shell.layout-board .activity-disclosure {
  display: block;
}

.ticket-activity-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ticket-activity-list li {
  align-items: start;
  border-bottom: 1px solid var(--border);
  display: grid;
  font-size: 11px;
  gap: 4px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 0;
}

.ticket-activity-list li:last-child {
  border-bottom: 0;
}

.ticket-activity-list time {
  color: var(--muted);
  font-size: 10px;
}

.detail-summary-values {
  color: var(--muted);
  display: grid;
  font-size: 10px;
  gap: 6px;
  grid-column: 1 / -1;
}

.detail-summary-values > span:first-child {
  align-items: center;
  display: flex;
  gap: 5px;
}

.detail-summary-values strong {
  color: var(--text);
  font-size: 11px;
}

.detail-disclosure[open] .detail-summary-values {
  display: none;
}

.detail-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.detail-summary-tags span {
  background: var(--g100);
  border: 1px solid var(--g300);
  border-radius: 999px;
  padding: 2px 6px;
}

.related-ticket-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.related-ticket-summary button {
  background: transparent;
  border: 0;
  color: var(--g600);
  font-size: 10px;
  font-weight: 800;
  padding: 2px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.related-ticket-summary > span {
  color: var(--muted);
  font-size: 10px;
}

.related-ticket-disclosure[open] .related-ticket-summary {
  display: none;
}

.board-thread-disclosure {
  display: none;
}

.app-shell.layout-board .board-thread-disclosure {
  display: block;
}

.app-shell.layout-board .ticket-source-section {
  display: none;
}

.board-thread-body {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.board-thread-messages {
  display: grid;
  gap: 8px;
}

.board-thread-message {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 7px;
  display: grid;
  gap: 9px;
  padding: 10px;
}

.board-thread-message.is-agent {
  background: var(--g50);
}

.board-thread-message > header {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.board-thread-message .avatar {
  height: 28px;
  width: 28px;
}

.board-thread-message header > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.board-thread-message strong,
.board-thread-message small,
.board-thread-message time {
  font-size: 9px;
}

.board-thread-message small,
.board-thread-message time {
  color: var(--muted);
}

.board-thread-message small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-thread-message p {
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
}

.board-quick-reply {
  border: 1px solid var(--g300);
  border-radius: 7px;
  overflow: hidden;
}

.board-quick-reply textarea {
  border: 0;
  color: var(--text);
  display: block;
  font: inherit;
  font-size: 11px;
  min-height: 74px;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

.board-quick-reply footer {
  align-items: center;
  background: var(--g50);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 6px;
}

.board-quick-reply .primary-button {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  min-height: 30px;
}

.board-quick-reply .primary-button .wf-icon {
  height: 14px;
  width: 14px;
}

.wire-dialog.board-ticket-dialog {
  max-width: 900px;
  width: min(900px, calc(100% - 32px));
}

.board-ticket-dialog-shell {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
}

.board-ticket-dialog-shell > header {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 15px 18px;
}

.board-ticket-dialog-shell > header .eyebrow {
  margin: 0 0 3px;
}

.board-ticket-dialog-body {
  display: grid;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
}

.board-ticket-dialog-body > section,
.board-ticket-dialog-body > details {
  border-bottom: 1px solid var(--border);
  padding: 18px;
}

.board-ticket-dialog-body > :last-child {
  border-bottom: 0;
}

.board-dialog-ticket-summary {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
}

.board-dialog-ticket-summary > span .wf-icon {
  height: 18px;
  width: 18px;
}

.board-dialog-ticket-summary > div {
  display: grid;
  gap: 3px;
}

.board-dialog-ticket-summary > div span {
  color: var(--muted);
  font-size: 11px;
}

.board-dialog-ticket-summary dl {
  align-items: center;
  display: grid;
  font-size: 10px;
  gap: 5px 10px;
  grid-template-columns: 72px minmax(180px, 1fr);
  margin: 0;
}

.board-dialog-ticket-summary dt {
  color: var(--muted);
}

.board-dialog-ticket-summary dd {
  font-weight: 700;
  margin: 0;
  min-width: 0;
}

.board-dialog-ticket-person > strong {
  font-size: 16px;
  line-height: 1.25;
}

.board-dialog-ticket-summary > .board-dialog-ticket-person > span {
  font-size: 12px;
  line-height: 1.3;
}

.board-dialog-ticket-info .ticket-info-display > dl {
  grid-template-columns: 84px minmax(0, 1fr);
  max-width: 360px;
}

.board-dialog-ticket-info-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.board-dialog-ticket-info-form .ticket-info-tags-field,
.board-dialog-ticket-info-form footer {
  grid-column: 1 / -1;
}

.board-dialog-inline-row {
  margin-top: 5px;
}

.board-dialog-inline-value {
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 2px 0;
  text-align: left;
}

.board-dialog-inline-value:hover,
.board-dialog-inline-value:focus-visible {
  text-decoration: underline;
}

.board-dialog-tag-value {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.board-dialog-inline-editor {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.board-dialog-inline-editor[hidden] {
  display: none;
}

.board-dialog-inline-editor input,
.board-dialog-inline-editor select {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
  min-height: 30px;
  min-width: 0;
  padding: 5px 7px;
}

.detail-multi-tag-editor,
.board-dialog-multi-tag-editor {
  align-items: start;
}

.detail-multi-tag-editor {
  grid-template-columns: minmax(0, 1fr);
}

.detail-multi-tag-editor > .secondary-button {
  align-self: start;
  justify-self: end;
  width: auto;
}

.tag-editor-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.wf-tags-input {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--g400);
  border-radius: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 42px;
  min-width: 0;
  padding: 4px;
}

.wf-tags-input:focus-within {
  outline: 2px solid var(--g700);
  outline-offset: 2px;
}

.wf-tags-input__items {
  display: contents;
}

.wf-tags-input__tag {
  align-items: center;
  background: var(--g100);
  border: 1px solid var(--g300);
  border-radius: 5px;
  color: var(--text);
  display: inline-flex;
  font-size: 10px;
  gap: 3px;
  min-height: 26px;
  padding-left: 7px;
}

.wf-tags-input__tag button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  display: inline-flex;
  height: 26px;
  justify-content: center;
  padding: 0;
  width: 26px;
}

.wf-tags-input__tag button:hover,
.wf-tags-input__tag button:focus-visible {
  background: var(--g200);
  color: var(--text);
}

.wf-tags-input__tag .wf-icon {
  height: 11px;
  width: 11px;
}

.ticket-info-form .wf-tags-input > input[data-wf-tags-input] {
  background: transparent;
  border: 0;
  flex: 1 1 120px;
  min-height: 26px;
  min-width: 120px;
  outline: 0;
  padding: 3px 4px;
  width: auto;
}

.tag-editor-help {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
}

.board-dialog-thread h3,
.board-dialog-composer h3 {
  font-size: 13px;
  margin: 0 0 10px;
}

.board-dialog-editor {
  background: var(--white);
  border: 0;
  color: var(--text);
  font: inherit;
  max-height: 180px;
  min-height: 120px;
  overflow-y: auto;
  outline: 0;
  padding: 12px;
  width: 100%;
}

.board-dialog-editor:empty::before {
  color: var(--muted);
  content: attr(data-placeholder);
  pointer-events: none;
}

.board-dialog-editor:focus-visible {
  box-shadow: inset 0 0 0 2px var(--text);
}

.board-dialog-reply {
  border: 1px solid var(--g300);
  border-radius: 7px;
  display: block;
  overflow: visible;
}

.board-dialog-reply footer {
  align-items: center;
  background: var(--g50);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 7px;
}

.board-dialog-reply .primary-button {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.board-dialog-reply .primary-button .wf-icon {
  height: 14px;
  width: 14px;
}

.board-dialog-context {
  align-items: center;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  font-size: 11px;
  gap: 10px;
  justify-content: space-between;
  min-height: 34px;
  padding: 7px 10px;
}

.board-dialog-context label {
  align-items: center;
  display: flex;
  flex: 0 1 360px;
  gap: 6px;
}

.board-dialog-context select,
.board-dialog-message-details input,
.board-dialog-message-details select {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
  min-height: 28px;
  min-width: 0;
  padding: 4px 7px;
  width: 100%;
}

.board-dialog-message-details {
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
  padding: 8px 10px;
}

.board-dialog-message-details[hidden],
.board-dialog-formatting[hidden] {
  display: none;
}

.board-dialog-message-details label {
  align-items: center;
  display: grid;
  font-size: 10px;
  font-weight: 800;
  gap: 5px;
  grid-template-columns: auto minmax(0, 1fr);
}

.board-dialog-formatting {
  align-items: center;
  background: var(--g50);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 3px;
  padding: 5px 8px;
}

.board-dialog-formatting button {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: 4px;
  color: var(--text);
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.board-dialog-reply .composer-attachment-actions {
  gap: 3px;
}

.board-dialog-reply .split-submit {
  position: relative;
}

.board-dialog-reply .submit-status-menu {
  bottom: calc(100% + 5px);
  left: auto;
  right: 0;
  top: auto;
}

.board-dialog-disclosure {
  padding: 0 !important;
}

.board-dialog-disclosure > summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  list-style: none;
  padding: 15px 18px;
}

.board-dialog-disclosure > summary::-webkit-details-marker {
  display: none;
}

.board-dialog-disclosure > summary > span:first-child {
  font-size: 13px;
  font-weight: 800;
}

.board-dialog-disclosure > summary > .wf-icon {
  height: 14px;
  transition: transform 160ms ease;
  width: 14px;
}

.board-dialog-disclosure[open] > summary > .wf-icon {
  transform: rotate(180deg);
}

.board-dialog-summary-values {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 10px;
  gap: 6px;
}

.board-dialog-disclosure[open] .board-dialog-summary-values {
  display: none;
}

.board-dialog-related-list,
.board-dialog-disclosure > .ticket-activity-list {
  border-top: 1px solid var(--border);
  padding: 10px 18px 16px;
}

.board-dialog-related-list {
  display: grid;
  gap: 6px;
}

.board-dialog-related-list button {
  align-items: start;
  background: var(--g50);
  border: 1px solid var(--g300);
  border-radius: 5px;
  color: var(--text);
  display: grid;
  font: inherit;
  gap: 2px;
  padding: 8px;
  text-align: left;
}

.board-dialog-related-list button span {
  color: var(--muted);
  font-size: 10px;
}

.customer-summary > dl {
  margin: 0;
}

.message-actions-menu {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(53, 53, 53, .16);
  display: grid;
  gap: 2px;
  min-width: 148px;
  padding: 5px;
  position: fixed;
  z-index: 160;
}

.message-actions-menu button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  min-height: 32px;
  padding: 7px 10px;
  text-align: left;
  width: 100%;
}

.message-actions-menu button:hover,
.message-actions-menu button:focus-visible {
  background: var(--g100);
}

@media(max-width: 1199px) and (min-width: 768px) {
  .app-shell.layout-chat,
  .app-shell.layout-chat.details-hidden {
    --chat-sidebar-width: clamp(300px, 34vw, 350px);
    grid-template-columns: var(--chat-sidebar-width) minmax(0, 1fr);
  }

  .app-shell.layout-chat.zoom-compact > .global-sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-shell.layout-chat.zoom-compact .brand {
    flex-direction: row;
    gap: 10px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .app-shell.layout-chat.zoom-compact .brand > strong {
    display: block;
  }

  .app-shell.layout-chat.zoom-compact .workspace-selectors {
    display: grid;
  }

  .app-shell.layout-chat.zoom-compact .sidebar-compose-button {
    margin-left: 0;
    margin-right: 0;
    padding: 7px 12px;
    width: 100%;
  }

  .app-shell.layout-chat.zoom-compact .sidebar-compose-label {
    display: inline;
  }
}

@media(max-width: 767px) {
  .app-shell.layout-chat,
  .app-shell.layout-chat.details-hidden {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .app-shell.layout-chat > .workspace-topbar {
    grid-column: 1;
    grid-row: 1;
  }

  .app-shell.layout-chat:not(.has-conversation) > .global-sidebar {
    display: flex;
    grid-column: 1;
    grid-row: 2;
    height: auto;
    padding: 12px;
  }

  .app-shell.layout-chat.has-conversation > .global-sidebar {
    display: none;
  }

  .app-shell.layout-chat:not(.has-conversation) > .conversation {
    display: none;
  }

  .app-shell.layout-chat.has-conversation > .conversation {
    display: flex;
    grid-column: 1;
    grid-row: 2;
  }

  .app-shell.layout-chat:not(.has-conversation).zoom-compact .brand {
    flex-direction: row;
    gap: 10px;
  }

  .app-shell.layout-chat:not(.has-conversation).zoom-compact .brand > strong {
    display: block;
  }

  .app-shell.layout-chat:not(.has-conversation).zoom-compact .workspace-selectors {
    display: grid;
  }

  .app-shell.layout-chat:not(.has-conversation).zoom-compact .sidebar-compose-button {
    margin-left: 0;
    margin-right: 0;
    padding: 7px 12px;
    width: 100%;
  }

  .app-shell.layout-chat:not(.has-conversation).zoom-compact .sidebar-compose-label {
    display: inline;
  }

  .sidebar-chat-mount {
    margin-bottom: -12px;
  }
}

/* R006 Round 6: compact messenger-shaped Chat rows. */
.sidebar-chat-mount .ticket-rows {
  padding: 5px 4px 8px;
}

.sidebar-chat-mount .ticket-row.chat-message-row {
  background: transparent;
  border: 0;
  border-radius: 7px;
  display: block;
  margin: 1px 0;
  min-height: 58px;
  padding: 0;
  width: 100%;
}

.sidebar-chat-mount .ticket-row.chat-message-row:hover {
  background: var(--g100);
}

.sidebar-chat-mount .ticket-row.chat-message-row.selected,
.sidebar-chat-mount .ticket-row.chat-message-row.selected:hover {
  background: var(--g200);
  padding: 0;
}

.sidebar-chat-mount .chat-message-row-open {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 58px;
  padding: 7px 9px;
  position: relative;
}

.sidebar-chat-mount .chat-message-row-open:focus-visible {
  border-radius: 7px;
  outline-offset: -2px;
}

.sidebar-chat-mount .chat-message-avatar {
  border-radius: 50%;
  font-size: 10px;
  height: 36px;
  width: 36px;
}

.chat-message-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.chat-message-top,
.chat-message-identity,
.chat-row-preview {
  align-items: center;
  display: flex;
  min-width: 0;
}

.chat-message-top {
  gap: 8px;
  justify-content: space-between;
}

.chat-message-identity {
  flex: 1 1 auto;
  gap: 6px;
  overflow: hidden;
}

.chat-message-identity .ticket-number {
  font-size: 11px;
}

.chat-message-identity > strong {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-channel-marker {
  color: var(--muted);
  display: inline-flex;
  flex: none;
}

.chat-channel-marker .wf-icon {
  height: 13px;
  width: 13px;
}

.chat-message-top > time {
  color: var(--muted);
  flex: none;
  font-size: 10px;
  white-space: nowrap;
}

.chat-row-preview {
  color: var(--muted);
  font-size: 12px;
  gap: 4px;
  line-height: 1.25;
  padding-right: 13px;
  white-space: nowrap;
}

.chat-row-preview > strong {
  flex: none;
  font-weight: 500;
}

.chat-row-preview > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message-row.is-unread .chat-message-identity > strong,
.chat-message-row.is-unread .chat-row-preview > strong,
.chat-message-row.is-unread .chat-row-preview > span,
.chat-message-row.is-unread .chat-message-top > time {
  color: var(--text);
  font-weight: 800;
}

.chat-unread-dot {
  background: var(--g600);
  border-radius: 50%;
  bottom: 15px;
  height: 7px;
  position: absolute;
  right: 9px;
  width: 7px;
}

/* R006 Round 7: Chat emoji picker and compact routing metadata. */
.app-shell.layout-chat .chat-ticket-routing {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 5px;
  min-width: 0;
}

.chat-header-channel-icon {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  flex: none;
}

.chat-header-channel-icon .wf-icon {
  height: 13px;
  width: 13px;
}

.app-shell.layout-chat .message-header {
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  row-gap: 0;
}

.app-shell.layout-chat .message-avatar {
  grid-row: 1 / 3;
}

.app-shell.layout-chat .message-meta {
  grid-column: 2;
  grid-row: 1;
}

.app-shell.layout-chat .message-meta small {
  display: none;
}

.app-shell.layout-chat .message-header-actions {
  align-items: center;
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-start;
  min-height: 14px;
}

.app-shell.layout-chat .message-header-actions .message-timestamp {
  color: var(--muted);
  display: block;
  font-size: 10px;
  line-height: 1.2;
  margin: 0;
}

#composer {
  position: relative;
}

.emoji-picker {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 8px;
  bottom: 52px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  left: 8px;
  max-height: min(390px, 58dvh);
  overflow: hidden;
  position: absolute;
  width: min(360px, calc(100% - 16px));
  z-index: 50;
}

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

.emoji-picker > header {
  padding: 9px 9px 7px;
}

.emoji-search {
  align-items: center;
  background: var(--g50);
  border: 1px solid var(--g300);
  border-radius: 6px;
  display: flex;
  gap: 7px;
  min-height: 34px;
  padding: 0 9px;
}

.emoji-search .wf-icon {
  color: var(--muted);
  flex: none;
  height: 15px;
  width: 15px;
}

.emoji-search input {
  background: transparent;
  border: 0;
  font-size: 12px;
  min-width: 0;
  outline: 0;
  padding: 0;
  width: 100%;
}

.emoji-category-tabs {
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 2px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0 8px 7px;
}

.emoji-category-tabs button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  flex: none;
  font-size: 10px;
  min-height: 26px;
  padding: 0 7px;
}

.emoji-category-tabs button:hover,
.emoji-category-tabs button:focus-visible,
.emoji-category-tabs button[aria-selected="true"] {
  background: var(--g100);
  border-color: var(--g300);
  color: var(--text);
}

.emoji-results {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 4px 9px 10px;
  scrollbar-gutter: stable;
}

.emoji-group h3 {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .06em;
  margin: 7px 2px 5px;
  text-transform: uppercase;
}

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

.emoji-grid button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  display: inline-flex;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 20px;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 100%;
}

.emoji-grid button:hover,
.emoji-grid button:focus-visible {
  background: var(--g100);
  border-color: var(--g300);
}

.emoji-empty {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  padding: 24px 12px 28px;
  text-align: center;
}

.emoji-empty[hidden] {
  display: none;
}

@media(max-width: 767px) {
  .app-shell.layout-chat .composer {
    overflow: visible;
  }

  .emoji-picker {
    bottom: 102px;
    max-height: min(360px, 55dvh);
  }

  .emoji-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

/* R006 Round 8: shared header Compose and Chat-only combined filtering. */
.topbar-compose-button {
  align-items: center;
  background: var(--g600);
  border: 1px solid var(--g600);
  border-radius: 6px;
  color: var(--white);
  display: inline-flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.topbar-compose-button:hover {
  background: var(--g700);
}

.topbar-compose-button:focus-visible {
  outline: 2px solid var(--g700);
  outline-offset: 2px;
}

.topbar-compose-button .wf-icon {
  height: 16px;
  width: 16px;
}

.chat-filter-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.chat-filter-field[hidden],
.chat-filter-menu[hidden] {
  display: none;
}

.chat-filter-label {
  font-size: 11px;
  font-weight: 800;
}

.chat-filter-select {
  min-width: 0;
  position: relative;
}

.chat-filter-trigger {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 6px;
  color: var(--text);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  grid-template-columns: 16px minmax(0, 1fr) 14px;
  height: 38px;
  padding: 0 10px;
  text-align: left;
  width: 100%;
}

.chat-filter-trigger:hover,
.chat-filter-trigger:focus-visible,
.chat-filter-trigger[aria-expanded="true"] {
  border-color: var(--g500);
}

.chat-filter-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(90, 90, 90, .12);
  outline: 0;
}

.chat-filter-trigger-icon,
.chat-filter-chevron {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.chat-filter-trigger-icon .wf-icon {
  height: 16px;
  width: 16px;
}

.chat-filter-chevron .wf-icon {
  height: 14px;
  width: 14px;
}

.chat-filter-trigger[aria-expanded="true"] .chat-filter-chevron {
  transform: rotate(180deg);
}

.chat-filter-menu {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(53, 53, 53, .16);
  display: grid;
  left: 0;
  max-height: min(480px, calc(100dvh - 285px));
  overflow-y: auto;
  padding: 5px;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 150;
}

.chat-filter-menu-heading {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  margin: 5px 7px 3px;
  text-transform: uppercase;
}

.chat-filter-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--text);
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  min-height: 32px;
  padding: 6px 7px;
  text-align: left;
  width: 100%;
}

.chat-filter-menu button > span {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.chat-filter-menu button b {
  background: var(--g100);
  border-radius: 999px;
  font-size: 10px;
  min-width: 25px;
  padding: 2px 6px;
  text-align: center;
}

.chat-filter-menu button:hover,
.chat-filter-menu button:focus-visible,
.chat-filter-menu button[aria-selected="true"] {
  background: var(--g100);
}

.chat-filter-menu button[aria-selected="true"] {
  font-weight: 800;
}

.chat-filter-menu .wf-icon {
  height: 15px;
  width: 15px;
}

.chat-header-recipient {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  min-width: 0;
}

.chat-header-recipient > .wf-icon {
  flex: none;
  height: 13px;
  width: 13px;
}

.chat-header-recipient #chatHeaderRecipient {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media(max-width: 420px) {
  .workspace-topbar-actions {
    gap: 6px;
  }

  .workspace-topbar > .sidebar-toggle,
  .topbar-compose-button,
  .workspace-user-trigger {
    flex-basis: 34px;
    height: 34px;
    width: 34px;
  }
}

/* R007 Round 1: Board presentation and configurable workflow columns. */
.app-shell.layout-board {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--details-width);
}

.app-shell.layout-board.details-hidden {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 0;
}

.app-shell.layout-board > .global-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
}

.app-shell.layout-board > .workspace-topbar {
  grid-column: 2 / -1;
  grid-row: 1;
}

.app-shell.layout-board > .ticket-list,
.app-shell.layout-board > .conversation {
  display: none;
}

.app-shell.layout-board > .board-workspace {
  display: flex;
  grid-column: 2;
  grid-row: 2;
}

.app-shell.layout-board > .details-panel {
  border-left: 1px solid var(--border);
  grid-column: 3;
  grid-row: 2;
}

.board-workspace {
  background: var(--g50);
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.board-workspace[hidden] {
  display: none !important;
}

.app-shell.layout-board > .board-settings-page {
  background: var(--white);
  display: grid;
  grid-column: 2 / -1;
  grid-row: 2;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.board-settings-page[hidden] {
  display: none !important;
}

.board-settings-page > form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.board-settings-page-header {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  min-height: 72px;
  padding: 12px 24px;
}

.board-settings-page-header .eyebrow,
.board-settings-page-header h1 {
  margin: 0;
}

.board-settings-page-header .eyebrow {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 3px;
}

.board-settings-page-header h1 {
  font-size: 20px;
  line-height: 1.2;
}

.board-settings-page-body {
  align-content: start;
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1040px;
  overflow-y: auto;
  padding: 24px;
  scrollbar-gutter: stable;
  width: 100%;
}

.board-settings-page-primary {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, .75fr) minmax(320px, 1.25fr);
}

.board-settings-page-footer {
  align-items: center;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  min-height: 64px;
  padding: 10px 24px;
}

.board-columns {
  align-items: flex-start;
  display: flex;
  flex: 1 1 auto;
  gap: 12px;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding: 14px 16px 20px;
  scrollbar-gutter: stable;
}

.board-column {
  background: var(--g100);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex: 0 0 292px;
  flex-direction: column;
  max-height: 100%;
  min-height: 150px;
  overflow: hidden;
}

.board-column.is-drag-target {
  border-color: var(--g600);
  box-shadow: inset 0 0 0 1px var(--g600);
}

.board-column-header {
  background: var(--g100);
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 11px 11px 9px;
}

.board-column-title {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
}

.board-column-title h2 {
  font-size: 13px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-column-count,
.board-fixed-badge,
.board-column-meta span {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  white-space: nowrap;
}

.board-column-description {
  color: var(--muted);
  font-size: 10px;
  grid-column: 1 / -1;
  line-height: 1.35;
  margin: 0;
}

.board-column-meta {
  display: flex;
  gap: 5px;
  grid-column: 1 / -1;
}

.board-column-actions {
  align-items: center;
  display: flex;
  gap: 2px;
}

.board-column-action {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--g600);
  display: inline-flex;
  height: 26px;
  justify-content: center;
  padding: 0;
  width: 26px;
}

.board-column-action:hover,
.board-column-action:focus-visible {
  background: var(--white);
  border-color: var(--g300);
}

.board-column-action .wf-icon {
  height: 14px;
  width: 14px;
}

.board-card-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 84px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  scrollbar-width: thin;
}

.board-empty-column {
  border: 1px dashed var(--g300);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  margin: 0;
  padding: 22px 10px;
  text-align: center;
}

.board-card {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 7px;
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.03);
  color: var(--text);
  cursor: grab;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.board-card:active {
  cursor: grabbing;
}

.board-card.is-selected {
  border-color: var(--g700);
  box-shadow: inset 3px 0 0 var(--g700);
}

.board-card.is-dragging {
  opacity: 0.55;
}

.board-card-open {
  background: transparent;
  border: 0;
  color: inherit;
  display: grid;
  gap: 7px;
  padding: 0;
  text-align: left;
  width: 100%;
}

.board-card-top,
.board-card-person,
.board-card-footer {
  align-items: center;
  display: flex;
}

.board-card-top,
.board-card-footer {
  justify-content: space-between;
}

.board-card-person {
  gap: 6px;
  min-width: 0;
}

.board-card-person strong,
.board-card-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-card-person strong {
  font-size: 12px;
}

.board-card .ticket-number,
.board-card time,
.board-card-assignee {
  color: var(--muted);
  font-size: 10px;
}

.board-card .channel-marker .wf-icon {
  height: 13px;
  width: 13px;
}

.board-card-subject {
  font-size: 12px;
  line-height: 1.35;
}

.board-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.board-card-badges span,
.board-card-checklist-progress {
  border: 1px solid var(--g300);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  padding: 2px 6px;
}

.board-add-column {
  align-items: center;
  background: transparent;
  border: 1px dashed var(--g500);
  border-radius: 8px;
  color: var(--g600);
  display: flex;
  flex: 0 0 250px;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-height: 78px;
}

.board-add-column:hover,
.board-add-column:focus-visible {
  background: var(--white);
  border-color: var(--g700);
}

.board-dialog {
  width: min(620px, calc(100% - 32px));
}

.board-dialog form > header > div .eyebrow {
  margin: 0 0 3px;
}

.board-dialog .dialog-body {
  gap: 18px;
}

.dialog-field {
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
}

.dialog-field input,
.dialog-field select,
.dialog-field textarea,
.board-settings-item input,
.board-settings-item select {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
  min-height: 36px;
  padding: 7px 9px;
  width: 100%;
}

.dialog-field textarea {
  min-height: 72px;
  resize: vertical;
}

.board-settings-section {
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}

.board-settings-section > header {
  align-items: center;
  background: var(--g50);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 10px 11px;
}

.board-settings-section h3,
.board-settings-section p {
  margin: 0;
}

.board-settings-section h3 {
  font-size: 12px;
}

.board-settings-section p {
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}

.board-settings-list {
  display: grid;
}

.board-settings-empty {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
  padding: 14px 11px;
}

.board-settings-item {
  align-items: center;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px 10px;
}

.board-settings-item:first-child {
  border-top: 0;
}

.board-settings-item-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.board-settings-item-copy strong {
  font-size: 11px;
}

.board-settings-item-copy small {
  color: var(--muted);
  font-size: 9px;
}

.board-settings-actions {
  display: flex;
  gap: 3px;
}

.board-settings-actions button {
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 4px;
  font-size: 10px;
  min-height: 28px;
  padding: 4px 7px;
}

.board-settings-actions .board-settings-icon-action {
  align-items: center;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  padding: 4px;
  width: 28px;
}

.board-settings-icon-action .wf-icon {
  height: 14px;
  width: 14px;
}

#boardAutomationDialog {
  max-width: 1120px;
  width: min(1120px, calc(100% - 32px));
}

#boardAutomationDialog form {
  max-height: calc(100dvh - 32px);
}

.board-automation-builder-body {
  background: var(--g50);
  gap: 16px;
  padding: 16px;
}

.board-automation-identity {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .3fr);
  padding: 14px;
}

.board-automation-builder-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
}

.board-automation-steps {
  display: grid;
  gap: 12px;
}

.board-automation-step,
.board-automation-preview {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.board-automation-step > header {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.board-automation-step > header h3,
.board-automation-step > header p,
.board-automation-preview h3,
.board-automation-preview p {
  margin: 0;
}

.board-automation-step > header h3,
.board-automation-preview h3 {
  font-size: 14px;
  line-height: 1.25;
}

.board-automation-step > header p,
.board-automation-preview > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  margin-top: 2px;
}

.board-automation-step-number {
  align-items: center;
  background: var(--g800);
  border-radius: 999px;
  color: var(--white);
  display: inline-flex;
  flex: 0 0 24px;
  font-size: 10px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.board-automation-match {
  max-width: 220px;
}

.board-automation-condition-list,
.board-automation-action-list {
  display: grid;
  gap: 8px;
}

.board-automation-condition-row {
  align-items: end;
  background: var(--g50);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, .75fr) minmax(110px, .65fr) minmax(130px, 1fr) auto;
  padding: 10px;
}

.board-automation-action-row {
  align-items: end;
  background: var(--g50);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  padding: 10px;
}

.board-automation-action-order {
  align-items: center;
  align-self: center;
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 9px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.board-automation-row-action,
.board-automation-row-actions button {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--g300);
  border-radius: 5px;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.board-automation-row-actions {
  display: flex;
  gap: 4px;
}

.board-automation-row-action .wf-icon,
.board-automation-row-actions .wf-icon {
  height: 14px;
  width: 14px;
}

.board-automation-add-row,
.board-automation-preview > button {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
}

.board-automation-add-row {
  width: 100%;
}

.board-automation-add-row .wf-icon,
.board-automation-preview > button .wf-icon {
  height: 14px;
  width: 14px;
}

.board-automation-empty {
  color: var(--muted);
  font-size: 10px;
  margin: 0;
}

.board-automation-timing-fields,
.board-automation-timing-offset {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.board-automation-timing-offset[hidden] {
  display: none;
}

.board-automation-check {
  align-items: flex-start;
  background: var(--g50);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  gap: 9px;
  padding: 10px;
}

#boardAutomationDialog .dialog-body label.board-automation-check {
  align-items: start;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
}

#boardAutomationDialog .board-automation-check > input[type="checkbox"] {
  align-self: start;
  height: 14px;
  justify-self: start;
  margin: 2px 0 0;
  width: 14px;
}

.board-automation-check span,
.board-automation-check strong,
.board-automation-check small {
  display: block;
}

.board-automation-check strong {
  font-size: 11px;
}

.board-automation-check small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
}

.board-automation-preview {
  position: sticky;
  top: 0;
}

.board-automation-preview .eyebrow {
  color: var(--muted);
  font-size: 10px;
  margin: 0;
}

.board-automation-preview-sample {
  background: var(--g50);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  padding: 10px;
}

.board-automation-preview-sample span,
.board-automation-preview-sample small {
  color: var(--muted);
  font-size: 9px;
}

.board-automation-preview-sample strong {
  font-size: 11px;
}

.board-automation-preview ol {
  color: var(--muted);
  display: grid;
  font-size: 10px;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.board-automation-preview > button {
  width: 100%;
}

.board-automation-preview-status {
  min-height: 15px;
}

@media(max-width: 899px) {
  .board-automation-builder-layout {
    grid-template-columns: 1fr;
  }

  .board-automation-preview {
    position: static;
  }
}

@media(max-width: 620px) {
  .board-automation-identity,
  .board-automation-condition-row,
  .board-automation-action-row,
  .board-automation-timing-fields,
  .board-automation-timing-offset {
    grid-template-columns: 1fr;
  }

  .board-automation-action-order {
    display: none;
  }

  .board-automation-row-action,
  .board-automation-row-actions {
    justify-self: end;
  }
}

.danger-text-button {
  background: transparent;
  border: 0;
  color: var(--g700);
  font-size: 11px;
  font-weight: 800;
  padding: 7px 0;
}

.dialog-footer-spacer {
  flex: 1;
}

.board-confirm-dialog {
  max-width: 460px;
}

@media(max-width: 1199px) {
  .app-shell.layout-board,
  .app-shell.layout-board.details-hidden {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .app-shell.layout-board > .workspace-topbar {
    grid-column: 2;
  }

  .app-shell.layout-board > .board-workspace {
    grid-column: 2;
  }

  .app-shell.layout-board > .details-panel {
    bottom: 0;
    grid-column: auto;
    height: calc(100dvh - 64px);
    top: 64px;
  }
}

@media(max-width: 767px) {
  .app-shell.layout-board,
  .app-shell.layout-board.details-hidden {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .app-shell.layout-board > .workspace-topbar {
    grid-column: 2;
    grid-row: 1;
  }

  .app-shell.layout-board > .board-workspace {
    grid-column: 2;
    grid-row: 2;
  }

  .app-shell.layout-board > .board-settings-page {
    grid-column: 2;
    grid-row: 2;
  }

  .board-settings-page-header,
  .board-settings-page-footer {
    padding-inline: 12px;
  }

  .board-settings-page-body {
    padding: 14px 12px;
  }

  .board-settings-page-primary {
    grid-template-columns: 1fr;
  }

  .board-columns {
    padding: 10px;
  }

  .board-column {
    flex-basis: min(286px, calc(100vw - 94px));
  }

  .board-dialog form > footer {
    flex-wrap: wrap;
  }

  .board-dialog-ticket-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .board-dialog-ticket-info-form {
    grid-template-columns: 1fr;
  }

  .board-dialog-ticket-info-form .ticket-info-tags-field,
  .board-dialog-ticket-info-form footer {
    grid-column: auto;
  }

  .board-dialog-routing {
    grid-template-columns: 1fr;
  }

  .board-dialog-routing label:last-child {
    grid-column: auto;
  }

  .board-ticket-dialog-shell > header {
    align-items: flex-start;
    gap: 10px;
  }

  .board-ticket-dialog-shell > header h2 {
    font-size: 15px;
    line-height: 1.3;
  }
}
