:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --ink: #172033;
  --muted: #667085;
  --soft: #98a2b3;
  --line: #dce3ec;
  --line-strong: #c8d2df;
  --accent: #1d6fd6;
  --accent-strong: #0d56b8;
  --accent-soft: #e8f1ff;
  --success: #11845b;
  --warning: #a15c07;
  --danger: #c03333;
  --shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
  --radius: 8px;
  --pill-radius: 999px;
  --text-xs: 10px;
  --text-sm: 11px;
  --text-md: 12px;
  --text-label: 9px;
  --leading-tight: 1.2;
  --leading-meta: 1.35;
  --control-xs: 28px;
  --control-sm: 32px;
  --control-md: 36px;
  --control-lg: 40px;
  --sidebar: 186px;
  --queue: 288px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.auth-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(29, 111, 214, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(23, 32, 51, 0.06), transparent 28%),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(29, 111, 214, 0.34);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.app-shell.app-shell-admin {
  grid-template-columns: 1fr;
}

.main,
.workspace,
.queue-panel,
.conversation-panel {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  height: 100vh;
  overflow: auto;
  padding: 8px 7px 10px;
  border-right: 1px solid var(--line);
  background: #f7f9fc;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.brand-button {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid rgba(220, 227, 236, 0.7);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  color: inherit;
  text-align: left;
  box-shadow: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 14px;
  line-height: 1.2;
}

.brand span {
  display: none;
}

.channel-nav {
  display: grid;
  gap: 3px;
}

.sidebar-section {
  display: grid;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-section-header-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-section-header strong {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-section-header span {
  display: none;
}

.sidebar-section-toggle {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  white-space: nowrap;
}

.channel-button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-height: 34px;
  width: 100%;
  padding: 4px;
  border: 1px solid rgba(229, 234, 241, 0.84);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.channel-button:hover,
.channel-button.is-active {
  border-color: rgba(29, 111, 214, 0.12);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

.channel-button.is-ready {
  background: rgba(255, 255, 255, 0.5);
}

.channel-button.is-attention {
  border-color: rgba(217, 119, 6, 0.1);
  background: rgba(255, 250, 242, 0.48);
}

.channel-button.is-muted {
  opacity: 0.8;
  background: rgba(248, 250, 252, 0.28);
}

.channel-button.is-muted.is-compact {
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 34px;
  padding: 4px 5px;
  gap: 5px;
  background: rgba(248, 250, 252, 0.5);
}

.channel-button.is-muted .channel-title {
  color: #475467;
}

.channel-button.is-muted .channel-icon {
  box-shadow: none;
  filter: saturate(0.88);
}

.channel-button.is-muted.is-compact .channel-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.channel-button.is-muted.is-compact .channel-icon svg {
  width: 12px;
  height: 12px;
}

.channel-button.is-muted.is-compact .channel-copy {
  gap: 2px;
}

.channel-button.is-muted.is-compact .channel-title {
  font-size: 11px;
  font-weight: 700;
}

.channel-button.is-muted.is-compact .channel-secondary-chip {
  min-height: 16px;
  padding: 0 5px;
  font-size: 9px;
}

.channel-button.is-muted.is-compact .channel-title-row {
  gap: 4px;
}

.channel-button.is-active {
  border-color: rgba(29, 111, 214, 0.16);
  background: rgba(241, 246, 255, 0.74);
}

.channel-button-overview {
  border-color: rgba(204, 214, 228, 0.58);
  background: rgba(255, 255, 255, 0.58);
}

.channel-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(232, 241, 255, 0.64);
  color: var(--accent);
  box-shadow: none;
}

.channel-icon svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.channel-title {
  display: block;
  min-width: 0;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
}

.channel-copy {
  display: grid;
  min-width: 0;
  gap: 0;
}

.channel-title-row,
.channel-meta {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.channel-title-row {
  justify-content: space-between;
}

.channel-meta {
  flex-wrap: wrap;
  row-gap: 2px;
}

.channel-secondary-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 14px;
  width: fit-content;
  max-width: 100%;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: #475467;
  font-size: 7px;
  font-weight: 700;
  line-height: var(--leading-tight);
  white-space: nowrap;
}

.channel-secondary-chip.online {
  background: rgba(17, 132, 91, 0.1);
  color: #166534;
}

.channel-secondary-chip.configured {
  background: rgba(29, 111, 214, 0.1);
  color: #1d4ed8;
}

.channel-secondary-chip.demo {
  background: rgba(161, 92, 7, 0.1);
  color: #b45309;
}

.channel-secondary-chip.error {
  background: rgba(192, 51, 51, 0.12);
  color: #b91c1c;
}

.channel-secondary-chip.disabled {
  background: rgba(148, 163, 184, 0.14);
  color: #475467;
}

.channel-count-cluster {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.channel-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 16px;
  padding: 0 1px 0 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475467;
  font-size: 9px;
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.channel-total-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.06);
  color: #475467;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  flex: 0 0 auto;
}

.channel-waiting-note {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--soft);
  flex: 0 0 auto;
}

.status-dot.online {
  background: var(--success);
}

.status-dot.configured {
  background: var(--accent);
}

.status-dot.demo {
  background: var(--warning);
}

.status-dot.error {
  background: var(--danger);
}

.status-dot.disabled {
  background: var(--soft);
}

.channel-status-inline.online {
  color: #166534;
}

.channel-status-inline.configured {
  color: #1d4ed8;
}

.channel-status-inline.demo {
  color: #b45309;
}

.channel-status-inline.error {
  color: #b91c1c;
}

.channel-status-inline.disabled {
  color: #667085;
}

.sync-card {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.05);
}

.sync-card-header {
  display: grid;
  gap: 4px;
}

.sync-card h2 {
  margin: 0;
  font-size: 14px;
}

.sync-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, #f7f9fc 0%, #f3f6fb 100%);
}

.admin-pages-shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 76px);
  padding: 14px 16px 16px;
  overflow: auto;
}

.section-loading {
  position: relative;
}

.section-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 251, 0.52);
  pointer-events: none;
}

.section-loading::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(29, 111, 214, 0.18);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
  padding: 10px 16px 11px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.985) 0%, rgba(248, 250, 253, 0.98) 100%);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.topbar-copy {
  display: grid;
  gap: 2px;
  flex: 1 1 240px;
  min-width: 0;
  padding: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.02;
}

.topbar p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  max-width: 38ch;
}

.topbar-actions,
.detail-actions {
  gap: 10px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.topbar-status-cluster {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: min(44vw, 420px);
}

.topbar-page-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 2px;
  border: 1px solid rgba(220, 227, 236, 0.84);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.topbar-page-switcher[hidden] {
  display: none !important;
}

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

.topbar-menu {
  position: relative;
}

.topbar-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 15;
  display: grid;
  gap: 8px;
  width: min(280px, calc(100vw - 24px));
  padding: 11px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.topbar-menu-pages,
.topbar-menu-actions {
  display: grid;
  gap: 7px;
}

.topbar-menu-pages {
  padding-top: 0;
}

.topbar-menu-pages .toolbar-button {
  width: 100%;
  justify-content: flex-start;
}

.topbar-menu-actions .primary-button,
.topbar-menu-actions .ghost-button {
  width: 100%;
  justify-content: flex-start;
}

.detail-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  grid-column: 1 / 2;
  grid-row: 2;
  gap: 4px;
  width: 100%;
  padding: 0;
  border-top: 0;
  background: transparent;
}

.detail-toolbar-management-panel {
  position: relative;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(232, 237, 243, 0.88);
  border-radius: 999px;
  background: rgba(250, 251, 253, 0.84);
  box-shadow: none;
}

.detail-toolbar-management-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 24px;
  padding: 0 6px 0 8px;
  cursor: pointer;
  list-style: none;
}

.detail-toolbar-management-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  flex-wrap: wrap;
  max-width: min(100%, 320px);
}

.detail-toolbar-management-panel summary::-webkit-details-marker {
  display: none;
}

.detail-toolbar-management-panel summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 700;
}

.detail-toolbar-management-panel[open] summary::after {
  content: "-";
}

.detail-toolbar-management-panel[open] summary {
  position: relative;
  z-index: 2;
}

.selection-context-banner {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 6px 9px;
  border: 1px solid rgba(29, 111, 214, 0.16);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(243, 248, 255, 0.96), rgba(248, 251, 255, 0.96));
}

.selection-context-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.selection-context-copy strong {
  color: var(--accent);
  font-size: 11px;
  line-height: 1.35;
}

.selection-context-copy p {
  margin: 0;
  color: #516071;
  font-size: 11px;
  line-height: 1.4;
}

.detail-toolbar-status-strip {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.detail-toolbar-summary-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 1 auto;
  min-width: 0;
  padding: 0 5px 0 7px;
  min-height: 22px;
  border: 1px solid rgba(233, 237, 243, 0.9);
  border-radius: 999px;
  background: rgba(249, 251, 253, 0.72);
}

.detail-toolbar-summary-group[hidden] {
  display: none !important;
}

.detail-toolbar-controls {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(220, 227, 236, 0.96);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.detail-toolbar-management-panel[open] .detail-toolbar-controls {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 15;
  width: min(420px, calc(100vw - 640px));
}

.detail-toolbar-label {
  display: none;
}

.detail-toolbar-summary {
  display: flex;
  align-items: center;
  min-height: 0;
  flex-wrap: wrap;
  color: var(--ink);
  font-size: 8px;
  font-weight: 800;
  line-height: var(--leading-meta);
}

.detail-toolbar-inline-text {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  color: var(--ink);
  font-size: 8px;
  font-weight: 800;
  line-height: var(--leading-meta);
}

.detail-toolbar-inline-text-muted {
  color: var(--muted);
}

.detail-toolbar-actions,
.detail-toolbar-fields {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}

.detail-toolbar-fields .detail-select-field,
.detail-toolbar-fields select {
  width: auto;
  min-width: 0;
}

.detail-toolbar-actions-owner {
  flex: 1 1 auto;
}

.detail-toolbar-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  justify-content: stretch;
}

.detail-toolbar-actions .ghost-button {
  min-height: var(--control-xs);
  padding: 0 8px;
  font-size: 10px;
  background: rgba(248, 250, 252, 0.98);
}

.detail-toolbar-actions .ghost-button:disabled {
  opacity: 0.5;
}

.detail-toolbar-management-panel .disclosure-summary-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.detail-toolbar-management-panel .disclosure-summary-copy strong {
  color: var(--ink);
  font-size: 9px;
  line-height: 1.2;
}

.detail-toolbar-management-panel .disclosure-summary-copy small {
  display: none;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.25;
}

.detail-toolbar-reminder-menu {
  position: relative;
}

.detail-toolbar-reminder-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-xs);
  padding: 0 9px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 700;
}

.detail-toolbar-reminder-menu summary::-webkit-details-marker {
  display: none;
}

.detail-toolbar-reminder-menu summary::after {
  content: "+";
  margin-left: 8px;
  color: var(--muted);
}

.detail-toolbar-reminder-menu[open] summary::after {
  content: "-";
}

.detail-toolbar-actions-reminder {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 4;
  display: none;
  min-width: max-content;
  padding: 10px;
  border: 1px solid rgba(220, 227, 236, 0.96);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-toolbar-reminder-menu[open] .detail-toolbar-actions-reminder {
  display: flex;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  max-width: 100%;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.96);
  color: #344054;
  font-size: var(--text-sm);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refresh-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 700;
}

.refresh-pill[data-tone="success"] {
  background: #eef8f2;
  color: var(--success);
}

.refresh-pill[data-tone="progress"] {
  background: #eef6ff;
  color: var(--accent);
}

.refresh-pill[data-tone="warning"] {
  background: #fff7eb;
  color: var(--warning);
}

.refresh-pill[data-tone="error"] {
  background: #fff1f1;
  color: var(--danger);
}

.topbar-status-cluster .user-pill,
.topbar-status-cluster .refresh-pill {
  min-width: 0;
  max-width: 100%;
}

.sync-card {
  display: none !important;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-md);
  padding: 0 13px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease, color 140ms ease;
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
  transform: none;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.primary-button:hover {
  background: var(--accent-strong);
  box-shadow: 0 4px 12px rgba(29, 111, 214, 0.14);
}

.primary-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.18), 0 6px 16px rgba(29, 111, 214, 0.16);
}

.ghost-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
}

.ghost-button:hover {
  border-color: var(--line-strong);
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.04);
}

.ghost-button:focus-visible {
  border-color: rgba(29, 111, 214, 0.45);
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.12);
}

.ghost-button.is-active {
  border-color: rgba(29, 111, 214, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 3px 8px rgba(29, 111, 214, 0.06);
}

.compact-disclosure summary:focus-visible,
.thread-secondary-panel summary:focus-visible,
.detail-toolbar-reminder-menu summary:focus-visible,
.message-actions-menu > summary:focus-visible,
.user-row-tools summary:focus-visible,
.history-secondary-disclosure summary:focus-visible {
  outline: none;
  border-color: rgba(29, 111, 214, 0.45);
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.12);
}

.topbar-page-switcher .ghost-button,
.topbar-quick-actions .primary-button,
.owner-buttons .ghost-button {
  min-width: 0;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.button-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.toolbar-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  min-height: var(--control-md);
  padding: 0 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
}

.toolbar-icon-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 12px;
}

.topbar-menu-button-label {
  display: none;
}

.toolbar-button-quiet {
  background: transparent;
  color: var(--muted);
}

.toolbar-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-page-switcher .toolbar-button,
.topbar-menu .toolbar-icon-button {
  background: rgba(255, 255, 255, 0.86);
}

.app-shell[data-page="inbox"] .topbar {
  min-height: 52px;
  padding-block: 8px;
}

.app-shell[data-page="inbox"] .topbar-copy {
  gap: 0;
}

.app-shell[data-page="inbox"] .topbar h1 {
  font-size: 19px;
}

.app-shell[data-page="inbox"] .topbar p {
  display: none;
}

.app-shell[data-page="inbox"] .topbar-menu .toolbar-icon-button {
  min-width: 36px;
}

.topbar-page-switcher .toolbar-button:hover,
.topbar-page-switcher .toolbar-button.is-active,
.topbar-menu .toolbar-icon-button:hover,
.topbar-menu .toolbar-icon-button[aria-expanded="true"] {
  border-color: rgba(29, 111, 214, 0.24);
  background: linear-gradient(180deg, rgba(245, 249, 255, 1) 0%, rgba(237, 244, 255, 1) 100%);
  box-shadow: 0 5px 12px rgba(29, 111, 214, 0.07);
}

.ghost-button.warning-button {
  border-color: rgba(199, 110, 0, 0.35);
  color: #9a5a00;
  background: rgba(255, 191, 36, 0.1);
}

.workspace {
  display: grid;
  grid-template-columns: var(--queue) minmax(0, 1fr);
  min-height: 0;
  height: calc(100vh - 76px);
  overflow: hidden;
  gap: 6px;
  padding: 8px;
  background: transparent;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.workspace-mobile-nav {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.workspace-mobile-nav .ghost-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
  min-width: 0;
}

.workspace.workspace-compact {
  display: block;
  overflow: hidden;
}

.workspace.workspace-compact .workspace-mobile-nav {
  display: flex;
}

.workspace.workspace-compact.workspace-compact-queue .conversation-panel,
.workspace.workspace-compact.workspace-compact-detail .queue-panel {
  display: none;
}

.queue-panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-right: 0;
  background: transparent;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.panel-header-queue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 2px 6px;
  border-bottom: 1px solid rgba(230, 235, 242, 0.72);
}

.panel-header-queue-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.queue-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel-header h2 {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
}

.panel-header span,
.panel-header small {
  display: block;
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
}

.panel-header-queue-copy small {
  display: inline;
  margin: 0;
  font-size: 10px;
  line-height: 1.25;
}

.panel-header-queue-copy #queueCount {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
}

.queue-header-actions .ghost-button {
  min-height: 32px;
  padding-inline: 11px;
}

.queue-toolbar {
  display: grid;
  gap: 5px;
}

.queue-tools-panel {
  display: grid;
  gap: 0;
  order: 1;
  position: relative;
  padding: 2px 0 0;
  background: transparent;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: rgba(29, 111, 214, 0.5);
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.12);
}

select {
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-size: 14px;
}

.queue-search-panel,
.queue-filters-panel {
  display: grid;
  gap: 3px;
  padding: 0 2px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.queue-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.queue-section-header strong {
  font-size: var(--text-md);
  line-height: 1.25;
}

.queue-section-header span {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.queue-section-header.compact {
  margin-bottom: 0;
}

.queue-section-header.compact span {
  max-width: 420px;
  line-height: 1.45;
}

.queue-search-header {
  display: none;
}

.queue-search-header-copy {
  display: flex;
  align-items: center;
  min-width: 0;
}

.queue-search-header-copy strong {
  font-size: 12px;
}

.queue-search-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.queue-search-header-meta {
  display: block;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.queue-tools-collapse-button {
  flex: 0 0 auto;
  min-height: var(--control-xs);
  padding: 0 10px;
  white-space: nowrap;
}

.queue-search-panel.is-collapsed {
  gap: 0;
}

.queue-search-panel.is-collapsed .queue-toolbar,
.queue-search-panel.is-collapsed .queue-filters-panel {
  display: none;
}

.queue-primary-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.queue-primary-filters-panel {
  gap: 6px;
  padding: 4px 0 0;
  border-radius: 0;
  border-top: 0;
  background: transparent;
}

.queue-primary-filters-panel[data-state="idle"]:not([open]) > summary .disclosure-summary-copy {
  gap: 0;
}

.queue-primary-filters-panel[data-state="idle"]:not([open]) {
  display: flex;
  justify-content: flex-end;
}

.queue-primary-filters-panel[data-state="idle"]:not([open]) > summary {
  width: auto;
  min-height: 18px;
  padding: 0 2px;
}

.queue-primary-filters-panel[data-state="idle"]:not([open]) > summary .disclosure-summary-copy strong {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}

.queue-primary-filters-panel[data-state="idle"]:not([open]) > summary .disclosure-summary-copy small {
  display: none;
}

.queue-primary-filters-panel:not([open]) {
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.queue-primary-filters-panel:not([open]) > summary {
  min-height: 20px;
  padding: 0;
}

.queue-primary-filters-panel:not([open]) .disclosure-summary-copy {
  gap: 1px;
}

.queue-primary-filters-panel:not([open]) .disclosure-summary-copy strong {
  font-size: 11px;
}

.queue-primary-filters-panel:not([open]) .disclosure-summary-copy small {
  font-size: 10px;
}

.queue-primary-filters-panel > summary {
  min-height: 22px;
}

.queue-primary-filters-panel[open] > summary .disclosure-summary-copy strong {
  font-size: 11px;
}

@media (max-width: 1360px) {
  .search-shortcut-hint {
    display: none;
  }

  .queue-search-panel .search-box input {
    padding-right: 42px;
  }

  .search-clear-button {
    right: 10px;
  }
}

.queue-primary-filters-panel > .compact-disclosure-body {
  gap: 8px;
}

.queue-filters-groups {
  display: grid;
  gap: 12px;
}

.queue-filter-group {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(220, 227, 236, 0.82);
}

.queue-filter-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.queue-filter-group-header {
  display: grid;
  gap: 2px;
}

.queue-filter-group-header strong {
  font-size: 12px;
}

.queue-filter-group-header span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.queue-filter-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.queue-filter-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.queue-filter-field-primary {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.queue-filter-field-primary span {
  color: var(--muted-strong);
}

.queue-filter-field select {
  width: 100%;
}

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

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

.queue-summary-panel {
  gap: 6px;
  padding: 7px;
  border-radius: 12px;
  background: rgba(247, 250, 253, 0.72);
}

.queue-summary-panel.is-secondary {
  gap: 3px;
  padding: 2px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.queue-summary-panel.is-secondary:not([open]) > summary {
  min-height: 18px;
  padding: 0;
  align-items: baseline;
}

.queue-summary-panel.is-secondary:not([open]) .disclosure-summary-copy {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
}

.queue-summary-panel.is-secondary:not([open]) .disclosure-summary-copy strong {
  font-size: 10px;
  white-space: nowrap;
}

.queue-summary-panel.is-secondary:not([open]) .disclosure-summary-copy small {
  font-size: 9px;
  line-height: 1.2;
}

.queue-summary-panel.is-secondary[open] {
  padding-top: 3px;
  border-top: 1px solid rgba(230, 235, 242, 0.62);
}

.queue-summary-panel > summary {
  min-height: 24px;
}

.queue-summary-panel > .compact-disclosure-body {
  gap: 8px;
}

.queue-summary-panel .queue-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.queue-summary-panel.is-secondary .queue-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.queue-summary-breakdown {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.queue-summary-breakdown-copy {
  display: grid;
  gap: 2px;
}

.queue-summary-breakdown-copy strong {
  font-size: 12px;
}

.queue-summary-breakdown-copy span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.queue-summary-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.queue-summary-breakdown-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
  text-align: left;
}

.queue-summary-breakdown-button span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.queue-summary-breakdown-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(29, 111, 214, 0.08);
  color: var(--accent);
  font-size: 10px;
  line-height: 1;
}

.queue-summary-breakdown-button.is-active {
  border-color: rgba(29, 111, 214, 0.45);
  background: var(--accent-soft);
}

.queue-summary-breakdown-grid-temporal {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.queue-summary-breakdown-stat {
  display: grid;
  gap: 4px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.queue-summary-breakdown-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.queue-summary-breakdown-stat strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.queue-summary-breakdown-stat small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.queue-summary-breakdown-stat[data-tone="hot"] {
  border-color: rgba(192, 51, 51, 0.22);
  background: #fff5f5;
}

.queue-summary-breakdown-stat[data-tone="hot"] strong,
.queue-summary-breakdown-stat[data-tone="hot"] small {
  color: #b42318;
}

.queue-summary-breakdown-stat[data-tone="warm"] {
  border-color: rgba(161, 92, 7, 0.22);
  background: #fff8ef;
}

.queue-summary-breakdown-stat[data-tone="warm"] strong,
.queue-summary-breakdown-stat[data-tone="warm"] small {
  color: #9a5a06;
}

.queue-summary-breakdown-stat[data-tone="cold"] {
  border-color: rgba(29, 111, 214, 0.18);
  background: #f5f9ff;
}

.queue-summary-breakdown-stat[data-tone="cold"] strong,
.queue-summary-breakdown-stat[data-tone="cold"] small {
  color: var(--accent);
}

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

.queue-summary-channel-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
  text-align: left;
}

.queue-summary-channel-button span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.queue-summary-channel-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(29, 111, 214, 0.08);
  color: var(--accent);
  font-size: 10px;
  line-height: 1;
}

.queue-summary-channel-button.is-active {
  border-color: rgba(29, 111, 214, 0.45);
  background: var(--accent-soft);
}

.queue-focus-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.queue-summary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  width: 100%;
  min-height: var(--control-md);
  padding: 0 10px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.queue-summary-button span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

.queue-summary-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(29, 111, 214, 0.08);
  color: var(--accent);
  font-size: 10px;
  line-height: 1;
}

.queue-summary-button.is-active {
  border-color: rgba(29, 111, 214, 0.45);
  background: var(--accent-soft);
}

.queue-summary-button:hover,
.queue-workload-button:hover {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

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

.queue-workload-panel {
  display: grid;
  gap: 10px;
}

.queue-workload-button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  color: inherit;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.queue-workload-button.is-active {
  border-color: rgba(29, 111, 214, 0.45);
  background: var(--accent-soft);
}

.queue-workload-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.queue-workload-button strong {
  font-size: 18px;
  line-height: 1;
}

.queue-workload-button small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.queue-workload-compact .queue-workload-button {
  gap: 2px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fbfcff;
}

.queue-workload-compact .queue-workload-button strong {
  font-size: 15px;
}

.queue-workload-compact .queue-workload-button small {
  font-size: 10px;
}

.active-queue-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-active-filters-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(29, 111, 214, 0.1);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.queue-active-filters-clear {
  min-height: var(--control-xs);
  padding: 0 9px;
  font-size: 11px;
}

.queue-active-filters-panel,
.bulk-actions {
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.bulk-actions {
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.bulk-actions-card {
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 0;
  background: transparent;
}

.bulk-actions-card:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.bulk-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-actions-meta {
  justify-content: space-between;
}

.bulk-actions-card-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bulk-actions-card-copy strong {
  font-size: 12px;
}

.bulk-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.bulk-actions-controls,
.bulk-actions-button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-actions select,
.bulk-actions input {
  height: 34px;
}

.queue-views-panel {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: none;
}

.queue-views-panel.is-secondary {
  gap: 3px;
  padding-top: 1px;
}

.queue-views-panel.is-secondary .queue-views-header {
  gap: 6px;
  padding: 0;
  align-items: baseline;
  flex-wrap: nowrap;
}

.queue-views-panel.is-secondary .queue-views-header-copy {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.queue-views-panel.is-secondary .queue-views-header strong {
  font-size: 10px;
  white-space: nowrap;
}

.queue-views-panel.is-secondary .queue-views-header span {
  font-size: 9px;
  line-height: 1.2;
}

.queue-summary-panel.is-secondary > summary,
.queue-views-panel.is-secondary #toggleQueueViewsButton {
  min-height: 28px;
}

.queue-views-panel.is-secondary #toggleQueueViewsButton {
  padding-inline: 9px;
  border-radius: 10px;
  font-size: 9px;
  box-shadow: none;
}

.queue-views-panel.is-secondary #toggleQueueViewsButton:hover {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.queue-views-panel.is-secondary .queue-views-body {
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(230, 235, 242, 0.62);
}

.queue-advanced-tools {
  order: 4;
  margin-top: 2px;
  border: 0;
  border-top: 1px solid rgba(220, 227, 236, 0.82);
  border-radius: 0;
  background: transparent;
}

.queue-advanced-tools summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px 0;
}

.queue-advanced-tools summary span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.queue-advanced-tools summary strong {
  font-size: 12px;
}

.queue-advanced-tools summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.queue-advanced-tools-body {
  gap: 10px;
  padding: 8px 0 2px;
  border-top: 0;
}

.bulk-actions .queue-section-header.compact {
  padding-top: 2px;
}

.workspace.queue-focus-mode .queue-panel {
  gap: 6px;
}

.workspace.queue-focus-mode {
  grid-template-columns: 248px minmax(0, 1fr);
}

.workspace.queue-focus-mode .queue-tools-panel {
  gap: 4px;
}

.workspace.queue-focus-mode .queue-search-panel {
  gap: 4px;
  padding: 2px 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.workspace.queue-focus-mode .queue-search-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.workspace.queue-focus-mode .queue-search-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.workspace.queue-focus-mode .queue-search-row .ghost-button {
  width: 100%;
}

.workspace.queue-focus-mode .queue-search-panel .search-box input {
  padding-right: 42px;
}

.workspace.queue-focus-mode .queue-search-header {
  padding-bottom: 0;
  border-bottom: 0;
}

.workspace.queue-focus-mode .queue-search-header-meta,
.workspace.queue-focus-mode .queue-toolbar-status-line {
  display: none;
}

.workspace.queue-focus-mode .queue-toolbar-utility-row {
  min-height: 0;
  gap: 4px;
}

.workspace.queue-focus-mode .queue-toolbar-recovery-actions {
  width: 100%;
  justify-content: flex-start;
}

.workspace.queue-focus-mode .queue-search-panel > .queue-section-header.compact,
.workspace.queue-focus-mode .queue-active-filters-panel .queue-section-header.compact {
  display: none;
}

.workspace.queue-focus-mode .queue-primary-filters-panel,
.workspace.queue-focus-mode .queue-advanced-tools {
  display: none;
}

.workspace.queue-focus-mode .queue-active-filters-panel {
  gap: 4px;
}

.workspace.queue-focus-mode .conversation-list-panel {
  padding-top: 0;
  border-top: 0;
}

.workspace.queue-focus-mode .conversation-list-header {
  display: none;
}

.workspace.queue-focus-mode .conversation-list {
  gap: 4px;
  padding-top: 0;
}

.workspace.queue-focus-mode .conversation-item {
  padding: 6px;
  border-radius: 8px;
}

.workspace.queue-focus-mode .conversation-item-main,
.workspace.queue-focus-mode .conversation-item-main-button,
.workspace.queue-focus-mode .item-top-main,
.workspace.queue-focus-mode .item-support-row {
  gap: 4px;
}

.workspace.queue-focus-mode .item-name {
  font-size: 12px;
}

.workspace.queue-focus-mode .item-support-row-footer,
.workspace.queue-focus-mode .item-quick-actions,
.workspace.queue-focus-mode .item-summary {
  display: none !important;
}

.workspace.queue-focus-mode .item-channel-badge {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.workspace.queue-focus-mode .item-channel-badge svg {
  width: 10px;
  height: 10px;
}

.workspace.queue-focus-mode .item-footer-meta,
.workspace.queue-focus-mode .item-support-pill,
.workspace.queue-focus-mode .item-queue-action {
  min-height: 16px;
  padding-inline: 5px;
  font-size: 8px;
}

.workspace.queue-focus-mode .item-time,
.workspace.queue-focus-mode .channel-waiting-note {
  font-size: 8px;
}

.queue-views-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 2px;
}

.queue-views-header-copy {
  display: grid;
  gap: 2px;
}

.queue-views-header strong {
  font-size: 13px;
}

.queue-views-header span {
  color: var(--muted);
  font-size: 12px;
}

.queue-views-body {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.queue-view-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.queue-view-form input,
.queue-view-form select {
  height: 34px;
}

.queue-views-list {
  display: grid;
  gap: 8px;
}

.queue-view-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.queue-view-card.is-active {
  border-color: rgba(29, 111, 214, 0.4);
  background: #f8fbff;
}

.queue-view-main {
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.queue-view-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.queue-view-top strong {
  font-size: 13px;
}

.queue-view-summary,
.queue-view-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.queue-view-delete {
  min-width: 74px;
}

.queue-view-preset-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(29, 111, 214, 0.16);
  border-radius: 8px;
  background: #f5f9ff;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.empty-inline-state {
  padding: 8px 2px;
  color: var(--muted);
  font-size: 12px;
}

.active-queue-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.active-queue-filter-chip strong {
  color: var(--muted);
  font-size: 12px;
}

.channel-alert-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(254, 242, 242, 0.84);
  color: var(--danger);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

#typeFilter {
  width: 100%;
}

.conversation-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-top: 3px;
  padding-right: 2px;
  padding-bottom: 8px;
  align-content: start;
}

.conversation-list-panel,
.queue-search-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.queue-search-panel {
  gap: 5px;
  padding: 1px 0 5px;
  border-bottom: 1px solid rgba(230, 235, 242, 0.72);
}

.queue-search-panel.is-secondary {
  gap: 3px;
  padding-bottom: 4px;
}

.conversation-list-panel {
  order: 2;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 3px 1px 0;
  border: 0;
  border-top: 0;
  border-radius: 0;
  background: transparent;
}

.conversation-list-panel[data-queue-state="empty"] {
  gap: 4px;
  padding-bottom: 4px;
  background: transparent;
}

.conversation-list-panel[data-queue-state="empty"] .conversation-list {
  align-content: stretch;
  padding-bottom: 0;
}

.conversation-list-panel[data-queue-state="sparse"] .conversation-list {
  gap: 8px;
}

.conversation-list-header {
  display: none;
}

.conversation-list-header-copy {
  display: none;
}

.conversation-list-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: var(--leading-tight);
  white-space: nowrap;
}

.conversation-list-count.is-zero {
  opacity: 0.6;
}

.conversation-item {
  position: relative;
  display: grid;
  gap: 0;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(223, 229, 237, 0.88);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: inherit;
  text-align: left;
  box-shadow: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.conversation-item::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: transparent;
}

.conversation-item:hover,
.conversation-item.is-active {
  border-color: rgba(29, 111, 214, 0.42);
  box-shadow: 0 3px 10px rgba(29, 111, 214, 0.05);
}

.conversation-item.is-active {
  background: rgba(252, 253, 255, 0.98);
  box-shadow: 0 2px 8px rgba(29, 111, 214, 0.04);
}

.conversation-item.is-selected {
  border-color: rgba(196, 206, 220, 0.92);
  background: rgba(251, 252, 255, 0.98);
}

.conversation-item.is-active.is-selected {
  border-color: rgba(29, 111, 214, 0.38);
  background: rgba(251, 253, 255, 0.99);
}

.conversation-item.is-stable {
  border-color: rgba(228, 233, 239, 0.94);
  background: rgba(251, 252, 253, 0.9);
}

.conversation-item.has-outbound-error {
  border-color: rgba(214, 72, 72, 0.34);
  background: rgba(255, 250, 250, 0.98);
  box-shadow: 0 3px 10px rgba(214, 72, 72, 0.05);
}

.conversation-item.has-outbound-pending {
  border-color: rgba(184, 123, 21, 0.3);
  background: rgba(255, 252, 246, 0.98);
}

.conversation-item.has-outbound-error::before {
  width: 4px;
  background: rgba(214, 72, 72, 0.84);
}

.conversation-item.has-outbound-pending::before {
  width: 4px;
  background: rgba(184, 123, 21, 0.84);
}

.conversation-item.has-outbound-error:hover,
.conversation-item.has-outbound-error.is-active {
  border-color: rgba(214, 72, 72, 0.5);
  box-shadow: 0 6px 16px rgba(214, 72, 72, 0.08);
}

.conversation-item.has-outbound-pending:hover,
.conversation-item.has-outbound-pending.is-active {
  border-color: rgba(184, 123, 21, 0.48);
  box-shadow: 0 5px 14px rgba(184, 123, 21, 0.08);
}

.conversation-item.is-stable:hover,
.conversation-item.is-stable.is-active {
  border-color: rgba(29, 111, 214, 0.38);
  background: rgba(255, 255, 255, 0.96);
}

.conversation-item.needs-reply::before {
  background: rgba(161, 92, 7, 0.8);
}

.conversation-item.is-high::before {
  background: rgba(29, 111, 214, 0.75);
}

.conversation-item.is-urgent::before {
  background: rgba(192, 51, 51, 0.82);
}

.conversation-item-main {
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.conversation-item-main-button {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  min-width: 0;
}

.item-top,
.item-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.item-top-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.item-title-block {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

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

.item-context-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.item-channel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 999px;
}

.item-channel-badge svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.item-selection {
  display: inline-flex;
  align-items: center;
}

.selection-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: transparent;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 120ms ease, border-color 120ms ease, background 120ms ease;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.selection-toggle.is-selected {
  border-color: rgba(29, 111, 214, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
  opacity: 1;
}

.conversation-item:hover .selection-toggle,
.conversation-item.is-active .selection-toggle {
  opacity: 1;
}

.selection-toggle:hover {
  border-color: rgba(29, 111, 214, 0.28);
  background: #f8fbff;
}

.selection-toggle:focus-visible {
  opacity: 1;
}

.item-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
  line-height: 1.2;
}

.item-summary {
  display: none;
}

.item-aging {
  color: var(--warning);
}

.item-support-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}

.item-support-row-footer,
.item-support-row-secondary {
  gap: 4px;
  margin-top: 0;
}

.item-support-row-secondary {
  padding-top: 1px;
}

.conversation-item.is-condensed .item-meta-row-primary {
  gap: 3px;
}

.conversation-item.is-condensed .chip,
.conversation-item.is-condensed .subtle-chip {
  min-height: 18px;
  padding: 0 6px;
  font-size: 9px;
  font-weight: 700;
}

.conversation-item.is-condensed .item-name {
  font-size: 12px;
  font-weight: 760;
}

.conversation-item.is-condensed .item-time {
  font-size: 8px;
  color: #98a2b3;
}

.conversation-item.is-condensed .item-preview {
  color: #667085;
}

.conversation-item.is-new {
  border-color: rgba(29, 111, 214, 0.22);
  background: linear-gradient(180deg, rgba(245, 249, 255, 0.9) 0%, rgba(255, 255, 255, 0.98) 72%);
}

.conversation-item.is-new::before {
  background: linear-gradient(180deg, #1d6fd6 0%, #5a9cff 100%);
  opacity: 1;
}

.conversation-item.is-new .item-preview {
  color: #1f3f6d;
}

.conversation-item.is-new .item-time {
  color: #1d6fd6;
}

.conversation-item.is-condensed .item-support-row-secondary {
  padding-top: 0;
  gap: 3px;
}

.conversation-item.is-condensed .item-footer-row {
  margin-top: 1px;
  padding-top: 3px;
  gap: 3px;
}

.conversation-item.is-condensed .item-queue-action {
  min-height: 16px;
  padding: 0 5px;
}

.conversation-item.is-condensed .item-queue-action strong {
  font-size: 7px;
}

.conversation-item.is-condensed .item-preview {
  -webkit-line-clamp: 1;
  min-height: calc(9px * 1.35);
}

.conversation-item.is-condensed .item-footer-main {
  gap: 3px;
}

.conversation-item.is-condensed .item-footer-main .item-queue-action {
  max-width: 100%;
}

.item-quick-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex-wrap: wrap;
  max-height: 0;
  margin-top: 0;
  margin-left: auto;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, max-height 140ms ease, margin-top 140ms ease;
}

.conversation-item.is-active .item-quick-actions,
.conversation-item:hover .item-quick-actions {
  max-height: 26px;
  margin-top: 1px;
  opacity: 1;
  pointer-events: auto;
}

.item-quick-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(216, 223, 233, 0.92);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.item-quick-action-button-primary {
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.conversation-item.is-active .item-quick-action-button-primary,
.conversation-item:hover .item-quick-action-button-primary {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(216, 223, 233, 0.92);
  box-shadow: none;
}

.item-quick-action-button-secondary {
  background: rgba(248, 250, 252, 0.96);
  color: var(--muted);
}

.item-quick-action-button:hover:not(:disabled) {
  border-color: rgba(29, 111, 214, 0.22);
  background: #f8fbff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.item-quick-action-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.item-quick-action-button-accent {
  border-color: rgba(29, 111, 214, 0.18);
  background: #f5f9ff;
  color: var(--accent);
}

.item-quick-action-button-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: #fff8ef;
  color: #9a5a09;
}

.item-quick-action-button-neutral {
  color: var(--ink);
}

.item-quick-action-button-secondary.item-quick-action-button-neutral {
  border-color: rgba(220, 227, 236, 0.92);
  background: rgba(248, 250, 252, 0.96);
  color: #667085;
}

.item-support-pill {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.94);
  color: var(--muted);
  font-size: var(--text-label);
  font-weight: 700;
  line-height: var(--leading-tight);
}

.item-footer-meta {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  min-width: 0;
  max-width: 100%;
  padding: 0 6px;
  border-radius: 999px;
  font-size: var(--text-label);
  font-weight: 700;
  line-height: var(--leading-tight);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-footer-owner {
  background: rgba(248, 250, 252, 0.96);
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-footer-aging {
  background: #fff8ef;
  color: var(--warning);
}

.item-delivery-note {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  min-width: 0;
  padding: 0 6px;
  border-radius: 999px;
  font-size: var(--text-label);
  font-weight: 800;
  line-height: var(--leading-tight);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-delivery-note-error {
  background: #fff1f1;
  color: var(--danger);
}

.conversation-item.is-active .item-delivery-note,
.conversation-item:hover .item-delivery-note {
  background: rgba(255, 255, 255, 0.8);
}

.item-delivery-note-pending {
  background: #fff6e8;
  color: var(--warning);
}

.item-delivery-note-success {
  background: #edf9f2;
  color: #0f7b54;
}

.item-delivery-note-warning {
  background: #fff6e8;
  color: #9a5a06;
}

.item-delivery-note-neutral {
  background: #f4f6fa;
  color: #607086;
}

.item-time {
  flex: 0 0 auto;
  color: var(--soft);
  font-size: 9px;
  font-weight: 600;
  line-height: var(--leading-tight);
}

.item-queue-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
  min-width: 0;
  max-width: 100%;
  padding: 0 6px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 999px;
  background: rgba(249, 251, 253, 0.84);
}

.conversation-item.is-active .item-queue-action,
.conversation-item:hover .item-queue-action {
  background: rgba(255, 255, 255, 0.8);
}

.item-queue-action strong {
  min-width: 0;
  max-width: 100%;
  font-size: 8px;
  line-height: var(--leading-tight);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-queue-action span {
  color: inherit;
  min-width: 0;
  max-width: 100%;
  font-size: 7px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.78;
}

.item-queue-action.is-compact {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}

.item-queue-action.is-compact strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-queue-action-accent {
  border-color: rgba(29, 111, 214, 0.18);
  background: #f5f9ff;
}

.item-queue-action-accent strong,
.item-queue-action-accent span {
  color: var(--accent);
}

.item-queue-action-success {
  border-color: rgba(17, 132, 91, 0.18);
  background: #f3fbf7;
}

.item-queue-action-success strong {
  color: var(--success);
}

.item-queue-action-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: #fff8ef;
}

.item-queue-action-warning strong,
.item-queue-action-warning span {
  color: #9a5a09;
}

.item-queue-action-error {
  border-color: rgba(192, 51, 51, 0.18);
  background: #fff5f5;
}

.item-queue-action-error strong,
.item-queue-action-error span {
  color: #b42318;
}

.item-queue-action-neutral strong {
  color: var(--ink);
}

.item-preview {
  margin: 0;
  color: #344054;
  font-size: 9px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  min-height: calc(9px * 1.35);
}

.conversation-item.is-stable .item-meta-row-primary {
  gap: 4px;
}

.conversation-item.is-stable .item-event-row {
  display: none;
}

.conversation-item.is-active .item-preview,
.conversation-item:hover .item-preview {
  -webkit-line-clamp: 2;
  min-height: calc(9px * 1.35 * 2);
}

.item-meta-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.item-event-row {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  flex-wrap: wrap;
}

.item-event-pill {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  min-width: 0;
  max-width: 100%;
  padding: 0 5px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.94);
  color: #475467;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-event-pill-accent {
  border-color: rgba(29, 111, 214, 0.18);
  background: #f5f9ff;
  color: var(--accent);
}

.item-event-pill-success {
  border-color: rgba(17, 132, 91, 0.18);
  background: #f3fbf7;
  color: var(--success);
}

.item-event-pill-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: #fff8ef;
  color: #9a5a09;
}

.item-event-pill-error {
  border-color: rgba(192, 51, 51, 0.18);
  background: #fff5f5;
  color: #b42318;
}

.item-event-pill-neutral {
  border-color: rgba(220, 227, 236, 0.88);
  background: rgba(248, 250, 252, 0.94);
  color: #475467;
}

.item-meta-row-primary {
  margin-top: 0;
  gap: 4px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.item-meta-row-secondary {
  margin-top: 0;
  gap: 4px;
}

.conversation-item.has-outbound-error .item-preview {
  color: #7a1f1f;
}

.conversation-item.has-outbound-pending .item-preview {
  color: #7f4b00;
}

.conversation-item.has-outbound-error .item-time,
.conversation-item.has-outbound-error .item-footer-meta {
  color: #a63b3b;
}

.conversation-item.has-outbound-pending .item-time,
.conversation-item.has-outbound-pending .item-footer-meta {
  color: #9a650b;
}

.conversation-item.is-stable .item-time,
.conversation-item.is-stable .item-inline-facts,
.conversation-item.is-stable .item-footer-meta {
  color: #8a94a6;
}

.conversation-item.is-stable .item-preview {
  color: #667085;
  -webkit-line-clamp: 2;
  min-height: 0;
}

.conversation-item.is-stable .item-preview strong {
  display: none;
}

.conversation-item.is-stable:hover .item-preview,
.conversation-item.is-stable.is-active .item-preview {
  color: #344054;
}

.conversation-item.is-stable .item-queue-action {
  border-style: dashed;
  background: rgba(248, 250, 252, 0.76);
}

.conversation-item.is-stable .item-queue-action strong,
.conversation-item.is-stable .item-queue-action span {
  color: #667085;
}

.item-attachments {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.item-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  margin-top: 0;
  padding-top: 4px;
  border-top: 0;
}

.conversation-item.is-stable .item-footer-row {
  margin-top: 0;
  padding-top: 3px;
}

.item-footer-main {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.item-footer-row .item-support-row {
  min-width: 0;
}

.item-footer-row .item-quick-actions {
  margin-left: 0;
}

.conversation-item.has-outbound-error .item-footer-row,
.conversation-item.has-outbound-pending .item-footer-row {
  border-top-color: rgba(226, 232, 240, 0.82);
}

.item-footer-meta {
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-footer-more {
  border: 1px dashed rgba(220, 227, 236, 0.96);
  background: rgba(248, 250, 252, 0.78);
  color: var(--muted);
}

.item-sync-meta {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

.queue-reset-button {
  min-width: 0;
}

.queue-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.queue-search-row .search-box {
  position: relative;
  min-width: 0;
}

.queue-search-actions {
  display: flex;
  align-items: stretch;
  gap: 4px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.queue-search-panel.is-secondary .queue-search-actions {
  gap: 3px;
}

.queue-search-panel .search-box input {
  height: 30px;
  padding-right: 42px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 11px;
}

.queue-search-panel.is-secondary .search-box input {
  height: 28px;
  padding-inline: 9px;
  padding-right: 34px;
  font-size: 11px;
}

.search-clear-button {
  position: absolute;
  top: 50%;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  padding: 0;
}

.search-clear-button:hover {
  background: rgba(148, 163, 184, 0.22);
  color: var(--ink);
  box-shadow: none;
}

.search-clear-button:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.24);
  outline-offset: 2px;
  background: rgba(148, 163, 184, 0.22);
  color: var(--ink);
}

.search-shortcut-hint {
  position: absolute;
  top: 50%;
  right: 10px;
  display: none;
  align-items: center;
  gap: 4px;
  transform: translateY(-50%);
  color: var(--soft);
  font-size: 9px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
}

.search-shortcut-hint span {
  color: var(--muted);
}

.queue-search-row .ghost-button {
  min-width: 0;
  min-height: 30px;
  padding: 0 8px;
  font-size: 8px;
  white-space: nowrap;
}

.queue-search-panel.is-secondary .queue-search-row .ghost-button {
  min-height: 28px;
  padding-inline: 6px;
  font-size: 8px;
}

.queue-toolbar-utility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: wrap;
  min-height: 0;
  padding-top: 0;
}

.queue-search-panel.is-secondary .queue-toolbar-utility-row {
  gap: 3px;
}

.queue-toolbar-status-line {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 220px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.15;
}

.queue-search-panel.is-secondary .queue-toolbar-status-line {
  font-size: 6px;
}

.queue-toolbar-status-line[hidden] {
  display: none;
}

.queue-toolbar-utility-row.is-actions-only {
  justify-content: flex-end;
}

.queue-toolbar-recovery-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.queue-search-panel.is-secondary .queue-toolbar-recovery-actions {
  gap: 3px;
}

.queue-toolbar-recovery-actions .ghost-button {
  min-height: 22px;
  padding: 0 7px;
  font-size: 8px;
  white-space: nowrap;
}

.queue-search-panel.is-secondary .queue-toolbar-recovery-actions .ghost-button {
  min-height: 21px;
  padding-inline: 6px;
  font-size: 8px;
}

.queue-toolbar-meta {
  display: flex;
  align-items: center;
  min-height: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

#queueToolbarMeta {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 100%;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.64);
  color: var(--muted);
  font-size: 7px;
  font-weight: 600;
  line-height: 1.2;
}

.queue-reset-button.is-muted {
  opacity: 0.55;
  box-shadow: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: var(--pill-radius);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  line-height: var(--leading-tight);
}

.chip.closed {
  background: #eef2f7;
  color: #475467;
}

.chip.error {
  background: #fff1f1;
  color: var(--danger);
}

.chip.open {
  background: #fff6e8;
  color: var(--warning);
}

.chip.new {
  background: #edf4ff;
  color: #1d4ed8;
}

.chip.pending {
  background: #f5f7fb;
  color: #475467;
}

.chip.waiting_customer {
  background: #f3f6fb;
  color: #50627a;
}

.chip.neutral {
  background: #eef2f7;
  color: #475467;
}

.subtle-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: var(--pill-radius);
  background: #f7f9fc;
  color: #667085;
  font-size: 8px;
  font-weight: 700;
  line-height: var(--leading-tight);
  white-space: nowrap;
}

.subtle-chip-success {
  background: rgba(18, 183, 106, 0.12);
  color: #067647;
}

.subtle-chip-pending {
  background: rgba(29, 111, 214, 0.1);
  color: #1659b7;
}

.subtle-chip-warning {
  background: #fff6e8;
  color: var(--warning);
}

.subtle-chip-alert.open {
  background: #fff6e8;
  color: var(--warning);
}

.subtle-chip-alert.error {
  background: #fff1f1;
  color: var(--danger);
}

.conversation-panel {
  display: flex;
  min-width: 0;
  overflow: hidden;
  margin-top: 4px;
  border: 1px solid rgba(226, 232, 240, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.03);
}

.empty-state {
  display: grid;
  align-content: center;
  justify-items: center;
  height: 100%;
  width: 100%;
  gap: 16px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.empty-state-thread-picker {
  align-content: start;
  justify-items: start;
  gap: 12px;
  padding: 28px 30px 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(250, 252, 255, 0.98) 100%);
  text-align: left;
}

.empty-state-thread-picker .empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(29, 111, 214, 0.1);
}

.empty-state-thread-picker h2 {
  margin: 0;
}

.empty-state-thread-picker p {
  max-width: 560px;
  font-size: 13px;
  line-height: 1.45;
}

.empty-state-thread-picker .empty-dashboard-list {
  width: min(100%, 760px);
}

.empty-state-thread-picker .empty-state-actions {
  justify-content: flex-start;
}

.empty-state h2 {
  margin: 14px 0 6px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.empty-state p {
  margin: 0;
  max-width: 680px;
  line-height: 1.48;
}

.empty-state.compact {
  gap: 12px;
  min-height: 220px;
  padding: 24px 18px;
  border: 1px dashed rgba(220, 227, 236, 0.96);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(251, 252, 254, 0.9) 0%, rgba(245, 248, 252, 0.72) 100%);
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--accent), #6ca8ef) border-box;
  border: 2px solid transparent;
}

.empty-dashboard-list {
  display: grid;
  width: min(100%, 600px);
  gap: 12px;
}

.empty-dashboard-shell {
  display: grid;
  gap: 14px;
}

.empty-dashboard-shell-welcome {
  gap: 12px;
}

.empty-dashboard-priority-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-color: rgba(29, 111, 214, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, #f6faff 0%, #ffffff 100%);
  box-shadow: 0 12px 28px rgba(29, 111, 214, 0.06);
}

.empty-dashboard-priority-card-welcome {
  border-color: rgba(29, 111, 214, 0.14);
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  box-shadow: 0 10px 24px rgba(29, 111, 214, 0.05);
}

.empty-dashboard-priority-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.empty-dashboard-priority-copy span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.empty-dashboard-priority-copy strong {
  font-size: 22px;
  line-height: 1.08;
}

.empty-dashboard-priority-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.empty-dashboard-priority-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-dashboard-suggestions {
  display: grid;
  gap: 11px;
  width: 100%;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  text-align: left;
}

.empty-dashboard-suggestions-muted {
  background: rgba(249, 251, 254, 0.92);
}

.empty-dashboard-focus-grid {
  gap: 12px;
}

.empty-dashboard-metric-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.empty-dashboard-metric-strip-empty {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.empty-dashboard-metric-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.empty-dashboard-metric-card:hover:not(:disabled) {
  border-color: rgba(29, 111, 214, 0.35);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.empty-dashboard-metric-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.empty-dashboard-metric-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.empty-dashboard-metric-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.empty-dashboard-metric-card em {
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.empty-dashboard-metric-card:disabled {
  opacity: 0.72;
  cursor: default;
}

.empty-dashboard-metric-card.error {
  border-color: rgba(192, 51, 51, 0.2);
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
}

.empty-dashboard-metric-card.error strong,
.empty-dashboard-metric-card.error em {
  color: var(--danger);
}

.empty-dashboard-metric-card.warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
}

.empty-dashboard-metric-card.warning strong,
.empty-dashboard-metric-card.warning em {
  color: var(--warning);
}

.empty-dashboard-metric-card.info {
  border-color: rgba(29, 111, 214, 0.18);
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.empty-dashboard-metric-card.info strong,
.empty-dashboard-metric-card.info em {
  color: var(--accent);
}

.empty-dashboard-focus-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.empty-dashboard-focus-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.empty-dashboard-focus-card:hover:not(:disabled) {
  border-color: rgba(29, 111, 214, 0.35);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.empty-dashboard-focus-card:focus-visible,
.empty-dashboard-suggestion:focus-visible {
  outline: none;
  border-color: rgba(29, 111, 214, 0.42);
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.12);
}

.empty-dashboard-focus-card:disabled {
  opacity: 0.72;
  cursor: default;
}

.empty-dashboard-focus-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.empty-dashboard-focus-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.empty-dashboard-focus-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.empty-dashboard-focus-card em {
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.empty-dashboard-focus-card.error {
  border-color: rgba(192, 51, 51, 0.2);
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
}

.empty-dashboard-focus-card.error strong,
.empty-dashboard-focus-card.error em {
  color: var(--danger);
}

.empty-dashboard-focus-card.warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
}

.empty-dashboard-focus-card.warning strong,
.empty-dashboard-focus-card.warning em {
  color: var(--warning);
}

.empty-dashboard-focus-card.info {
  border-color: rgba(29, 111, 214, 0.18);
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.empty-dashboard-focus-card.info strong,
.empty-dashboard-focus-card.info em {
  color: var(--accent);
}

.empty-dashboard-actions-card {
  gap: 12px;
}

.empty-dashboard-suggestion-list {
  display: grid;
  gap: 8px;
}

.empty-dashboard-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.empty-dashboard-suggestion:hover {
  border-color: rgba(29, 111, 214, 0.35);
  background: #f8fbff;
  transform: translateY(-1px);
}

.empty-dashboard-suggestion-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.empty-dashboard-suggestion-main strong {
  font-size: 13px;
}

.empty-dashboard-suggestion-main span,
.empty-dashboard-suggestion-meta {
  color: var(--muted);
  font-size: 11px;
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.empty-state-actions .ghost-button,
.empty-state-actions .primary-button {
  min-width: 0;
}

.empty-state-thread-picker .empty-state-actions {
  justify-content: flex-start;
}

.app-shell[data-boot-state="loading"] .topbar-actions,
.app-shell[data-boot-state="loading"] .queue-panel,
.app-shell[data-boot-state="loading"] .conversation-panel {
  opacity: 0.42;
}

.app-shell[data-boot-state="loading"] .queue-panel,
.app-shell[data-boot-state="loading"] .conversation-panel {
  pointer-events: none;
}

@media (max-width: 720px) {
  .empty-dashboard-priority-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .empty-dashboard-priority-actions {
    justify-content: stretch;
  }

  .empty-dashboard-priority-actions .ghost-button,
  .empty-dashboard-priority-actions .primary-button {
    width: 100%;
  }

  .empty-dashboard-metric-strip,
  .empty-dashboard-metric-strip-empty {
    grid-template-columns: 1fr;
  }
}

.empty-state-actions-inline {
  justify-content: flex-start;
  padding-top: 2px;
}

.empty-dashboard-actions-only {
  padding: 4px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.empty-dashboard-actions-only .empty-state-actions-inline {
  padding-top: 0;
}

.queue-empty-state {
  min-height: 180px;
}

.queue-empty-state-minimal {
  align-content: start;
  justify-items: stretch;
  gap: 12px;
  min-height: 0;
  padding: 18px 14px;
  border-style: solid;
  border-color: rgba(230, 235, 242, 0.92);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(251, 252, 254, 0.94) 0%, rgba(247, 249, 252, 0.9) 100%);
  text-align: left;
}

.queue-empty-state-copy {
  display: grid;
  gap: 5px;
}

.queue-empty-state-minimal h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.queue-empty-state-minimal p {
  max-width: none;
  font-size: 12px;
  line-height: 1.45;
}

.queue-empty-state-actions {
  justify-content: flex-start;
  gap: 8px;
}

.queue-empty-state-actions .ghost-button,
.queue-empty-state-actions .primary-button {
  min-height: 34px;
}

.queue-empty-inline {
  display: grid;
  gap: 10px;
  padding: 8px 2px 2px;
  align-content: start;
}

.queue-empty-inline-copy {
  display: grid;
  gap: 4px;
}

.queue-empty-inline-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

.queue-empty-inline-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.queue-empty-inline-actions {
  gap: 7px;
}

.queue-empty-inline-actions .ghost-button,
.queue-empty-inline-actions .primary-button {
  min-height: 32px;
  padding-inline: 12px;
}

.conversation-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  flex: 1 1 auto;
  height: 100%;
  width: 100%;
  min-width: 0;
  background: transparent;
}

.conversation-detail[data-thread-state="calm"] .conversation-header,
.conversation-detail[data-thread-state="calm"] .thread-panel-header {
  background: rgba(255, 255, 255, 0.96);
}

.conversation-detail[data-thread-state="calm"] .thread-panel-utility-strip {
  background: rgba(252, 253, 255, 0.72);
}

.conversation-detail[data-thread-state="active"] .conversation-header,
.conversation-detail[data-thread-state="active"] .thread-panel-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 251, 255, 0.98) 100%);
}

.conversation-detail[data-thread-state="active"] .thread-panel-utility-strip {
  background: rgba(245, 249, 255, 0.9);
  border-bottom-color: rgba(220, 229, 240, 0.98);
}

.conversation-detail[data-thread-state="critical"] .conversation-header,
.conversation-detail[data-thread-state="critical"] .thread-panel-header {
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.99) 0%, rgba(255, 248, 244, 0.98) 100%);
}

.conversation-detail[data-thread-state="critical"] .thread-panel-utility-strip {
  background: rgba(255, 247, 240, 0.9);
  border-bottom-color: rgba(243, 214, 199, 0.98);
}

.conversation-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 2px;
  padding: 4px 8px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.conversation-header-main {
  display: grid;
  grid-column: 1 / -1;
  gap: 1px;
  flex: 1 1 320px;
  min-width: 0;
  max-width: none;
}

.conversation-kicker {
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.conversation-header h2 {
  margin: 0;
  font-size: 13px;
  line-height: 1.08;
}

.conversation-header-facts {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.conversation-header p {
  margin: 0;
  color: #667085;
  display: block;
  font-size: 8px;
  line-height: 1.25;
}

.detail-meta-group {
  display: grid;
  gap: 8px;
}

.thread-quick-actions-copy,
.thread-quick-actions-inline-header {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.thread-quick-actions-copy strong,
.thread-quick-actions-inline-header strong {
  font-size: 12px;
  line-height: 1.25;
}

.thread-quick-actions-copy span,
.thread-quick-actions-copy small,
.thread-quick-actions-inline-header span {
  display: none;
}

.thread-quick-actions-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(223, 229, 237, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  opacity: 1;
}

.thread-delivery-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid rgba(223, 229, 237, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.thread-delivery-inline[data-tone="pending"] {
  border-color: rgba(29, 111, 214, 0.16);
  background: rgba(239, 246, 255, 0.92);
}

.thread-delivery-inline[data-tone="warning"] {
  border-color: rgba(161, 92, 7, 0.14);
  background: rgba(255, 248, 239, 0.9);
}

.thread-delivery-inline[data-tone="success"] {
  border-color: rgba(18, 183, 106, 0.14);
  background: rgba(240, 253, 244, 0.92);
}

.thread-delivery-inline-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.thread-delivery-inline-copy strong {
  min-width: 0;
  font-size: 9px;
  line-height: 1.15;
  color: #344054;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-delivery-inline-copy span {
  min-width: 0;
  font-size: 8px;
  line-height: 1.25;
  color: #667085;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(280px, 46vw);
}

.thread-delivery-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

@media (max-width: 1180px) {
  .thread-delivery-inline {
    gap: 4px;
    padding: 3px 5px;
  }

  .thread-delivery-inline-copy span {
    display: none;
  }
}

@media (max-width: 768px) {
  .thread-panel-utility-strip {
    align-items: stretch;
    flex-wrap: wrap;
    overflow: visible;
    padding: 4px 8px 6px;
  }

  .thread-header-meta,
  .thread-delivery-inline,
  .thread-quick-actions-inline,
  .thread-jumpbar {
    width: 100%;
    min-width: 0;
  }

  .thread-header-meta {
    gap: 4px;
    flex-wrap: wrap;
  }

  .thread-delivery-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 6px 8px;
  }

  .thread-delivery-inline-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .thread-quick-actions-inline {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .thread-panel-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .thread-panel-heading {
    gap: 0;
  }

  .thread-panel-inline-controls {
    display: flex;
    width: fit-content;
    justify-self: end;
  }

  .thread-header-meta .thread-message-view-switch,
  .thread-header-meta .thread-message-view-switch-compact {
    display: none;
  }

  .thread-message-view-switch-compact {
    width: auto;
  }

  .thread-message-view-button-compact {
    min-height: 20px;
    min-width: 58px;
    padding-inline: 8px;
    font-size: 8px;
  }

  .thread-panel-inline-controls .thread-message-view-switch-compact {
    margin-left: auto;
  }

  .thread-delivery-inline {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .thread-delivery-inline-copy span {
    display: none;
  }

  .thread-delivery-inline-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .thread-header-meta {
    gap: 3px;
  }

  .thread-delivery-inline-actions .thread-quick-action-button {
    min-height: 22px;
    padding-inline: 7px;
  }

  .thread-delivery-inline-actions .thread-quick-action-button span {
    display: none;
  }
}

.thread-quick-actions-list {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.thread-quick-actions-inline-header {
  display: inline-grid;
  gap: 1px;
  min-width: 0;
}

.thread-quick-actions-inline-header strong {
  color: var(--ink);
  font-size: 9px;
  line-height: 1.15;
}

.thread-quick-actions-inline-header span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.2;
}

.thread-quick-action-button {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 22px;
  min-width: 0;
  max-width: 100%;
  padding: 0 7px;
  border-radius: 999px;
  text-align: left;
  border-color: rgba(223, 229, 237, 0.92);
  background: rgba(255, 255, 255, 0.82);
}

.thread-quick-action-button strong,
.thread-quick-action-button span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-quick-action-button strong {
  font-size: 8px;
  line-height: 1;
}

.thread-quick-action-button span {
  display: none;
}

.thread-quick-action-button-accent {
  border-color: rgba(29, 111, 214, 0.14);
  background: rgba(245, 249, 255, 0.72);
}

.thread-quick-action-button-accent strong {
  color: var(--accent);
}

.thread-quick-action-button-warning {
  border-color: rgba(161, 92, 7, 0.14);
  background: rgba(255, 248, 239, 0.74);
}

.thread-quick-action-button-warning strong {
  color: #9a5a09;
}

.thread-quick-action-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.thread-quick-action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

@media (max-width: 1120px) {
  .thread-quick-actions-panel {
    grid-template-columns: 1fr;
  }

  .thread-quick-actions-list {
    gap: 4px;
  }
}

@media (max-width: 680px) {
  .thread-quick-actions-list {
    gap: 4px;
  }
}

.detail-select-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1 1 140px;
}

.detail-select-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  background: transparent;
}

.thread {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-right: 0;
  background: transparent;
  overflow: hidden;
}

.thread-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 4px;
  padding: 2px 8px 1px;
  border-bottom: 1px solid rgba(230, 235, 242, 0.92);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.compact-back-button {
  display: none;
  min-height: var(--control-sm);
  padding-inline: 9px;
  white-space: nowrap;
}

.thread-panel-heading {
  display: grid;
  gap: 0;
  min-width: 0;
}

.thread-panel-heading strong {
  font-size: 11px;
  line-height: 1.2;
  text-transform: none;
}

.thread-panel-heading span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.82;
}

.thread-panel-inline-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  width: fit-content;
  flex: 0 1 auto;
  transform: none;
}
.thread-panel-inline-controls[hidden] {
  display: none !important;
}

.thread-panel-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
}

.thread-panel-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  flex: 0 1 auto;
  flex-wrap: nowrap;
}

.thread-refresh-button {
  min-height: 20px;
  padding-inline: 4px;
  border-radius: 999px;
  font-size: 8px;
  white-space: nowrap;
  width: fit-content;
  flex-shrink: 0;
}

.conversation-detail[data-thread-state="critical"] .thread-refresh-button {
  border-color: rgba(192, 51, 51, 0.16);
  background: rgba(255, 255, 255, 0.92);
}

.thread-panel-utility-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 3px;
  padding: 1px 8px 2px;
  border-bottom: 1px solid rgba(236, 240, 245, 0.96);
  background: rgba(252, 253, 255, 0.92);
}

.thread-header-meta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.thread-panel-utility-strip .chip,
.thread-panel-utility-strip .subtle-chip {
  min-height: 18px;
  padding-inline: 6px;
  font-size: 8px;
}

.thread-delivery-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.thread-delivery-inline-copy {
  display: inline-grid;
  gap: 0;
  min-width: 0;
}

.thread-delivery-inline-copy strong {
  font-size: 8px;
  line-height: 1.1;
}

.thread-delivery-inline-copy span {
  font-size: 7px;
  line-height: 1.15;
}

.thread-delivery-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.thread-delivery-inline-actions .thread-quick-action-button {
  min-height: 20px;
  padding-inline: 6px;
}

.thread-delivery-inline-actions .thread-quick-action-button strong {
  font-size: 7px;
}

.thread-quick-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.thread-message-view-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  gap: 2px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
}

.thread-message-view-switch-compact {
  padding-right: 3px;
}

.thread-message-view-hint {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(29, 111, 214, 0.08);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.thread-message-view-button {
  min-height: 22px;
  min-width: 0;
  max-width: 100%;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-message-view-button-compact {
  min-width: 64px;
  justify-content: center;
  padding-inline: 10px;
}

.thread-message-view-button:hover {
  color: var(--ink);
}

.thread-message-view-button.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.thread-sync-notice {
  display: block;
  margin-bottom: 1px;
  padding: 3px 6px;
  border: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: 8px;
  background: rgba(252, 253, 255, 0.82);
  color: #9a5a09;
}

.thread-sync-notice-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.thread-sync-notice-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 240px;
}

.thread-sync-notice-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  flex-wrap: wrap;
}

.thread-sync-notice strong {
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.thread-sync-notice-pill {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 4px;
  border-radius: var(--pill-radius);
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
}

.thread-sync-notice-pill-button {
  border: 1px solid rgba(22, 89, 183, 0.16);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.thread-sync-notice-pill-button:hover,
.thread-sync-notice-pill-button:focus-visible {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(22, 89, 183, 0.34);
  transform: translateY(-1px);
  outline: none;
}

.thread-sync-notice span {
  color: inherit;
  font-size: 9px;
  line-height: 1.35;
  opacity: 0.78;
}

.thread-sync-notice-description {
  color: inherit;
  font-size: 9px;
  line-height: 1.35;
  opacity: 0.66;
}

.thread-sync-notice-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.thread-sync-notice-action {
  min-height: 24px;
  padding: 0 7px;
  border-color: rgba(220, 227, 236, 0.82);
  background: rgba(255, 255, 255, 0.96);
  color: inherit;
  font-size: 9px;
  font-weight: 800;
  flex-shrink: 0;
}

.thread-sync-notice-action-secondary {
  background: rgba(255, 255, 255, 0.46);
}

.thread-sync-notice-pending .thread-sync-notice-action {
  border-color: rgba(29, 111, 214, 0.2);
}

.thread-sync-notice-error .thread-sync-notice-action {
  border-color: rgba(192, 51, 51, 0.22);
}

.thread-sync-notice-error {
  border-color: rgba(248, 113, 113, 0.18);
  background: rgba(255, 248, 248, 0.84);
  color: var(--danger);
}

.thread-sync-notice-pending {
  border-color: rgba(191, 219, 254, 0.62);
  background: rgba(248, 251, 255, 0.74);
  color: var(--accent);
}

.thread-sync-notice-warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.84);
  color: #9a5a09;
}

.thread-sync-notice.is-heavy {
  padding-block: 4px;
  border-style: dashed;
  background: rgba(249, 252, 255, 0.62);
}

.thread-sync-notice.is-collapsible {
  padding: 0;
  overflow: hidden;
}

.thread-sync-notice-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px;
  cursor: pointer;
  list-style: none;
}

.thread-sync-notice-summary::-webkit-details-marker {
  display: none;
}

.thread-sync-notice-summary-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.thread-sync-notice-summary-copy strong {
  color: inherit;
  font-size: 9px;
  line-height: 1.15;
  text-transform: uppercase;
}

.thread-sync-notice-summary-copy small {
  color: inherit;
  font-size: 8px;
  line-height: 1.25;
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-sync-notice-summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(216, 223, 233, 0.92);
  color: inherit;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.thread-sync-notice-body {
  display: none;
  padding: 0 8px 8px;
}

.thread-sync-notice[open].is-collapsible .thread-sync-notice-body {
  display: block;
}

.thread-sync-notice.is-heavy .thread-sync-notice-bar {
  align-items: center;
}

.thread-sync-notice.is-heavy .thread-sync-notice-main {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.thread-sync-notice.is-heavy .thread-sync-notice-head {
  gap: 4px;
}

.thread-sync-notice.is-heavy .thread-sync-notice-description {
  display: none;
}

.thread-sync-notice.is-heavy .thread-sync-notice-pill {
  background: rgba(255, 255, 255, 0.88);
}

.thread-jumpbar {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0;
  background: transparent;
}

.thread-jumpbar-inline {
  display: inline-grid;
  gap: 4px;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.thread-jumpbar-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(216, 223, 233, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.thread-jumpbar-summary::-webkit-details-marker {
  display: none;
}

.thread-jumpbar-summary strong {
  color: var(--ink);
  font-size: 7px;
}

.thread-jumpbar-inline[open] .thread-jumpbar-summary {
  border-color: rgba(29, 111, 214, 0.28);
  background: #f8fbff;
  color: var(--accent);
}

.thread-jumpbar-actions {
  display: none;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  padding: 1px 0 0;
}

.thread-jumpbar-inline[open] .thread-jumpbar-actions {
  display: inline-flex;
}

.thread-jumpbar-button {
  min-height: 19px;
  padding: 0 6px;
  border: 1px solid rgba(216, 223, 233, 0.96);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 6px;
  font-weight: 700;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.thread-jumpbar-button:hover {
  border-color: rgba(29, 111, 214, 0.3);
  background: #f8fbff;
}

.thread-jumpbar-button-info {
  color: var(--accent);
}

.thread-jumpbar-button-success {
  color: var(--success);
}

.thread-jumpbar-button-warning {
  color: var(--warning);
}

.messages {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 10px 10px calc(var(--thread-composer-offset, 18px) + 6px);
  scroll-padding: 20px 0 20px;
  background: linear-gradient(180deg, rgba(251, 252, 254, 1) 0%, rgba(246, 248, 252, 1) 100%);
}

.circle-ops-cluster {
  display: grid;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(228, 235, 243, 0.88);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(251, 252, 255, 0.98) 0%, rgba(247, 249, 253, 0.98) 100%);
}

.circle-ops-cluster .thread-sync-notice {
  margin-bottom: 0;
  border-color: rgba(234, 239, 245, 0.8);
  background: rgba(255, 255, 255, 0.82);
}

.circle-ops-cluster .thread-sync-notice-summary {
  min-height: 24px;
  padding: 0 5px;
  gap: 5px;
}

.circle-ops-cluster .thread-sync-notice-summary-copy strong {
  font-size: 8px;
}

.circle-ops-cluster .thread-sync-notice-summary-copy small {
  font-size: 7px;
}

.circle-ops-cluster .thread-sync-notice-summary-pill {
  min-height: 14px;
  padding: 0 4px;
  font-size: 7px;
}

.circle-ops-cluster .circle-pending-run {
  gap: 2px;
}

.circle-ops-cluster .circle-pending-lead {
  width: 100%;
  padding: 4px 6px;
  border-color: rgba(191, 219, 254, 0.54);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.98) 0%, rgba(241, 247, 255, 0.94) 100%);
}

.circle-ops-cluster .circle-pending-run-disclosure {
  margin-top: 0;
  border-color: rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.9);
}

.circle-ops-cluster .circle-pending-run-disclosure summary {
  min-height: 20px;
  padding: 0 6px;
}

.circle-ops-cluster .circle-pending-run-disclosure .disclosure-summary-copy strong {
  font-size: 9px;
}

.circle-ops-cluster .circle-pending-run-disclosure .disclosure-summary-copy small {
  font-size: 7px;
}

.thread-message-empty-state {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px dashed rgba(216, 223, 233, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
}

.thread-message-empty-state strong {
  color: var(--ink);
  font-size: 11px;
}

.thread-message-empty-state span {
  font-size: 10px;
  line-height: 1.4;
}

.message-thread-group {
  display: grid;
  gap: 6px;
}

.message-thread-group.has-replies {
  gap: 7px;
}

.circle-pending-run {
  gap: 5px;
}

.circle-pending-lead {
  display: grid;
  gap: 4px;
  width: min(100%, 480px);
  padding: 8px 10px;
  border: 1px solid rgba(29, 111, 214, 0.12);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0%, rgba(242, 247, 255, 0.92) 100%);
  color: #194185;
}

.circle-pending-lead.is-compact {
  gap: 0;
  width: 100%;
}

.circle-pending-lead-inline {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: nowrap;
}

.circle-pending-lead.is-compact .circle-pending-lead-inline strong {
  flex: 0 0 auto;
  color: #153e75;
  font-size: 7px;
  line-height: 1.15;
}

.circle-pending-lead-preview {
  min-width: 0;
  flex: 1 1 auto;
  color: rgba(21, 62, 117, 0.82);
  font-size: 7px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.circle-pending-lead-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: wrap;
}

.circle-pending-lead-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.circle-pending-lead-meta strong {
  color: #153e75;
  font-size: 8px;
  line-height: 1.2;
}

.circle-pending-lead-badge {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(29, 111, 214, 0.12);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.circle-pending-lead.is-compact .circle-pending-lead-badge {
  min-height: 14px;
  padding: 0 4px;
  font-size: 6px;
}

.circle-pending-lead-head small {
  color: rgba(25, 65, 133, 0.72);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.2;
}

.circle-pending-lead.is-compact small {
  flex: 0 0 auto;
  color: rgba(25, 65, 133, 0.72);
  font-size: 6px;
  line-height: 1.1;
}

.circle-pending-lead-copy {
  display: block;
}

.circle-pending-lead-copy span {
  color: rgba(21, 62, 117, 0.82);
  font-size: 8px;
  line-height: 1.3;
}

.circle-pending-run-disclosure {
  margin-top: 1px;
  margin-left: 0;
  width: min(100%, 272px);
  border-color: rgba(226, 232, 240, 0.88);
  background: rgba(250, 251, 253, 0.94);
  box-shadow: none;
}

.circle-pending-run-disclosure .compact-disclosure-body {
  gap: 5px;
}

.circle-pending-run-disclosure summary {
  min-height: 22px;
  padding: 0 7px;
}

.circle-pending-run-disclosure .disclosure-summary-copy strong {
  font-size: 9px;
}

.circle-pending-run-disclosure .disclosure-summary-copy small {
  font-size: 7px;
}

.circle-outbound-run {
  gap: 5px;
}

.circle-outbound-run-disclosure {
  margin-left: auto;
  width: min(100%, 248px);
  border-color: rgba(120, 132, 158, 0.16);
  background: rgba(248, 250, 252, 0.92);
}

.circle-outbound-run-disclosure .compact-disclosure-body {
  gap: 5px;
}

.circle-outbound-run-disclosure summary {
  min-height: 22px;
  padding: 0 7px;
}

.circle-outbound-run-disclosure .disclosure-summary-copy strong {
  font-size: 9px;
}

.circle-outbound-run-disclosure .disclosure-summary-copy small {
  font-size: 7px;
}

.message-thread-disclosure {
  display: grid;
  gap: 5px;
  margin-left: clamp(10px, 1.5vw, 18px);
  width: min(100%, 372px);
}

.lazy-thread-disclosure-body:empty {
  display: none;
}

.lazy-thread-disclosure-placeholder {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px dashed rgba(29, 111, 214, 0.12);
  border-radius: 10px;
  background: rgba(249, 251, 255, 0.74);
}

.lazy-thread-disclosure-placeholder strong {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-900);
}

.lazy-thread-disclosure-placeholder span {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.35;
}

.lazy-thread-disclosure-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 10px;
  flex-wrap: wrap;
}

.lazy-thread-disclosure-controls span {
  font-size: 12px;
  color: var(--muted);
}

.message-thread-disclosure summary {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: flex-start;
  cursor: pointer;
  list-style: none;
  position: relative;
}

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

.message-thread-disclosure summary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -10px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.48);
  transform: translateY(-50%);
}

.message-thread-disclosure summary > span {
  display: grid;
  align-items: center;
  min-height: 0;
  gap: 4px;
  padding: 7px 9px;
  border: 1px solid rgba(220, 227, 236, 0.94);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.92);
  color: #344054;
  font-size: 9px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.025);
}

.message-thread-disclosure[open] summary span {
  border-color: rgba(186, 199, 213, 0.94);
  background: rgba(255, 255, 255, 0.98);
}

.message-thread-summary-pill {
  display: grid;
  gap: 3px;
  width: min(100%, 304px);
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.message-thread-summary-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
}

.message-thread-summary-main strong {
  font-size: 9px;
  line-height: 1.2;
}

.message-thread-summary-main small {
  color: inherit;
  opacity: 0.62;
  font-size: 8px;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.message-thread-summary-kpis {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.message-thread-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 14px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(220, 227, 236, 0.92);
  color: #667085;
  font-size: 7px;
  font-weight: 700;
  line-height: 1.1;
}

.message-thread-summary-preview {
  color: #667085;
  font-size: 8px;
  font-weight: 500;
  line-height: 1.25;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.82;
}

.message-thread-replies {
  display: grid;
  gap: 7px;
  margin-left: 10px;
  padding: 8px 0 0 12px;
  border-left: 2px solid rgba(220, 227, 236, 0.9);
  border-radius: 0;
  background: transparent;
  max-width: min(100%, 412px);
}

.message-thread-replies .message {
  max-width: min(412px, 100%);
}

.message-thread-replies .message.is-thread-reply {
  align-self: flex-end;
}

.message-thread-replies .message.is-thread-reply .message-meta-row {
  justify-content: flex-end;
}

.message-thread-replies .message.is-thread-reply .message-meta {
  text-align: right;
}

.message-thread-group-orphans {
  padding-top: 4px;
}

.message-history-archive {
  display: grid;
  gap: 5px;
  margin: 0 0 2px;
}

.message-history-archive summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  cursor: pointer;
  list-style: none;
}

.message-history-archive summary::-webkit-details-marker {
  display: none;
}

.message-history-archive-copy {
  display: grid;
  gap: 2px;
  width: min(100%, 246px);
  padding: 6px 8px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 10px;
  background: rgba(249, 251, 253, 0.88);
}

.message-history-archive-copy strong {
  color: #344054;
  font-size: 9px;
  line-height: 1.2;
}

.message-history-archive-copy small {
  color: #667085;
  font-size: 7px;
  line-height: 1.3;
}

.message-history-archive-body {
  display: grid;
  gap: 8px;
  padding-left: 6px;
  border-left: 2px solid rgba(220, 227, 236, 0.72);
}

.message-thread-orphans-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 5px;
}

.message {
  display: grid;
  gap: 5px;
  max-width: min(760px, 80%);
  scroll-margin-block: 112px;
}

.message-frame {
  display: grid;
  gap: 6px;
}

.message.is-jump-target .message-bubble {
  border-color: rgba(29, 111, 214, 0.34);
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.12), 0 12px 24px rgba(29, 111, 214, 0.08);
}

.message-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(1px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.message-actions-menu {
  position: relative;
}

.message-actions-menu > summary {
  list-style: none;
}

.message-actions-menu > summary::-webkit-details-marker {
  display: none;
}

.message-action-menu-button {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
}

.message-action-menu-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.message-action-menu-dots span {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.message-actions-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  display: grid;
  gap: 4px;
  min-width: 132px;
  padding: 6px;
  border: 1px solid rgba(220, 227, 236, 0.96);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.message-actions-menu-panel .message-action-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 26px;
  padding: 0 9px;
  font-size: 9px;
}

.message.outbound {
  align-self: flex-end;
}

.message.inbound {
  align-self: flex-start;
}

.message-bubble {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.58;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
}

.message.outbound.is-pending .message-bubble {
  border-color: rgba(29, 111, 214, 0.28);
  box-shadow: 0 10px 22px rgba(29, 111, 214, 0.08);
}

.message.outbound.is-success .message-bubble {
  border-color: rgba(18, 183, 106, 0.22);
}

.message.outbound.is-error .message-bubble {
  border-color: rgba(217, 45, 32, 0.28);
  box-shadow: 0 10px 22px rgba(217, 45, 32, 0.08);
}

.message-delivery-state {
  display: grid;
  gap: 4px;
  margin-bottom: 7px;
  padding: 6px 7px 7px;
  border: 1px solid rgba(220, 227, 236, 0.6);
  border-radius: 10px;
  font-size: 8px;
  line-height: 1.28;
  max-width: 232px;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.message-delivery-state.is-compact {
  gap: 3px;
  margin-bottom: 5px;
  padding: 4px 5px;
  max-width: 188px;
}

.message-delivery-state::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: currentColor;
  opacity: 0.22;
}

.message-delivery-state-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.message-delivery-state strong {
  font-size: 8px;
  line-height: 1.2;
}

.message-delivery-state.is-compact strong {
  font-size: 7px;
}

.message-delivery-state-delivered {
  gap: 0;
  padding: 5px 7px;
}

.message-delivery-state-code {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  font-size: 7px;
  font-weight: 700;
}

.message-delivery-state.is-compact .message-delivery-state-code {
  min-height: 14px;
  padding: 0 4px;
  font-size: 6px;
  background: rgba(255, 255, 255, 0.84);
}

.message-delivery-state span {
  color: inherit;
  opacity: 0.76;
}

.message-delivery-helper {
  display: block;
  color: inherit;
  font-size: 7px;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0.62;
}

.message-delivery-state-pending {
  border-color: rgba(29, 111, 214, 0.14);
  background: rgba(29, 111, 214, 0.05);
  color: #1659b7;
}

.message-delivery-state-sending {
  border-color: rgba(100, 116, 139, 0.16);
  background: rgba(248, 250, 252, 0.92);
  color: #475467;
}

.message-delivery-state-queued {
  border-color: rgba(180, 83, 9, 0.2);
  background: rgba(255, 247, 237, 0.94);
  color: #b45309;
}

.message-delivery-state-syncing {
  border-color: rgba(29, 111, 214, 0.18);
  background: rgba(239, 246, 255, 0.96);
  color: #1659b7;
}

.message-delivery-state-success {
  border-color: rgba(18, 183, 106, 0.16);
  background: rgba(18, 183, 106, 0.06);
  color: #067647;
}

.message-delivery-state-error {
  border-color: rgba(217, 45, 32, 0.16);
  background: rgba(217, 45, 32, 0.06);
  color: #b42318;
}

.message-delivery-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 1px;
}

.message-delivery-state.is-compact .message-delivery-progress {
  gap: 3px;
  margin-top: 0;
}

.message-delivery-progress.is-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
}

.message-delivery-progress-step {
  display: grid;
  gap: 3px;
  justify-items: start;
}

.message-delivery-state.is-compact .message-delivery-progress-step {
  gap: 0;
}

.message-delivery-progress-dot {
  position: relative;
  display: inline-flex;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.message-delivery-state.is-compact .message-delivery-progress-dot {
  height: 4px;
}

.message-delivery-progress-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0;
}

.message-delivery-progress-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0.64;
}

.message-delivery-progress-step.is-done .message-delivery-progress-dot::before,
.message-delivery-progress-step.is-current .message-delivery-progress-dot::before {
  opacity: 1;
}

.message-delivery-progress-step.is-done .message-delivery-progress-dot::before {
  opacity: 0.82;
}

.message-delivery-progress-step.is-upcoming .message-delivery-progress-label {
  opacity: 0.5;
}

.message-delivery-progress-step.is-current .message-delivery-progress-label,
.message-delivery-progress-step.is-done .message-delivery-progress-label {
  opacity: 1;
}

.message-delivery-state-success .message-delivery-progress-dot {
  background: rgba(18, 183, 106, 0.18);
}

.message-delivery-state-sending .message-delivery-progress-dot {
  background: rgba(100, 116, 139, 0.18);
}

.message-delivery-state-queued .message-delivery-progress-dot {
  background: rgba(180, 83, 9, 0.18);
}

.message-delivery-state-syncing .message-delivery-progress-dot {
  background: rgba(29, 111, 214, 0.16);
}

.message-delivery-state-pending .message-delivery-progress-dot {
  background: rgba(29, 111, 214, 0.16);
}

.message-delivery-state-error .message-delivery-progress-dot {
  background: rgba(217, 45, 32, 0.16);
}

.message-reply-reference {
  display: grid;
  gap: 2px;
  margin-bottom: 6px;
  padding: 5px 8px;
  border-left: 2px solid rgba(29, 111, 214, 0.32);
  border-radius: 8px;
  background: rgba(29, 111, 214, 0.04);
}

.message-reply-reference strong {
  font-size: 9px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.message-reply-reference span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
}

.message.inbound .message-bubble {
  border-color: rgba(224, 230, 238, 0.94);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(251, 252, 253, 1) 100%);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.025);
}

.message-attachments {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.message-delivery-trace {
  display: grid;
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.message-delivery-trace summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  color: #667085;
}

.message-delivery-trace summary::-webkit-details-marker {
  display: none;
}

.message-delivery-trace summary span {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

.message-delivery-trace summary small {
  color: inherit;
  opacity: 0.7;
  font-size: 8px;
  line-height: 1.2;
  text-align: right;
}

.message-delivery-trace:not([open]) .message-delivery-trace-steps {
  display: none;
}

.message-delivery-trace-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.message-delivery-trace-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(220, 227, 236, 0.82);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #667085;
}

.message-delivery-trace-step.is-done {
  border-color: rgba(18, 183, 106, 0.16);
  background: rgba(18, 183, 106, 0.07);
  color: #067647;
}

.message-delivery-trace-step.is-current {
  border-color: rgba(29, 111, 214, 0.18);
  background: rgba(239, 246, 255, 0.95);
  color: #1659b7;
}

.message-delivery-trace-step.is-upcoming {
  background: rgba(248, 250, 252, 0.86);
  color: #98a2b3;
}

.message-delivery-trace-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.82;
}

.message-delivery-trace-step.is-current .message-delivery-trace-dot {
  animation: messageDeliveryPulse 1.4s ease-in-out infinite;
}

.message-delivery-trace-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.message-delivery-trace-copy strong {
  font-size: 9px;
  line-height: 1.2;
}

.message-delivery-trace-copy small {
  color: inherit;
  opacity: 0.72;
  font-size: 8px;
  line-height: 1.25;
}

.message-attachment {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  text-decoration: none;
}

.message-attachment-header {
  display: grid;
  gap: 2px;
}

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

.message-attachment span {
  color: var(--muted);
  font-size: 10px;
}

.message-attachment-media {
  display: block;
  width: min(100%, 360px);
  max-height: 280px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.04);
  object-fit: cover;
}

.message-attachment-audio {
  width: min(100%, 360px);
}

.message-attachment-link {
  width: fit-content;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.message-attachment-link:hover {
  text-decoration: underline;
}

.message.outbound .message-bubble {
  border-color: rgba(29, 111, 214, 0.28);
  background: linear-gradient(180deg, #f5f9ff 0%, #edf4ff 100%);
  border-radius: 16px 16px 10px 16px;
  box-shadow: 0 10px 22px rgba(29, 111, 214, 0.06);
}

.message-meta {
  margin-top: 0;
  display: grid;
  gap: 2px;
  color: #7b8794;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0;
}

.message-meta-primary {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.message-meta-secondary {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.message-role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(220, 227, 236, 0.82);
  background: rgba(248, 250, 252, 0.92);
  color: #667085;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.message-role-badge-inbound {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.95);
  color: #475467;
}

.message-role-badge-outbound {
  border-color: rgba(29, 111, 214, 0.2);
  background: rgba(239, 246, 255, 0.96);
  color: #1659b7;
}

.message-role-badge-reply {
  border-color: rgba(168, 85, 247, 0.16);
  background: rgba(250, 245, 255, 0.95);
  color: #7c3aed;
}

.message-meta-author {
  color: #344054;
  font-size: 11px;
  font-weight: 800;
  line-height: var(--leading-meta);
}

.message-meta-delivery {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(220, 227, 236, 0.74);
  background: rgba(255, 255, 255, 0.92);
  color: #475467;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
}

.message-meta-delivery-dot {
  display: inline-flex;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.message-meta-delivery-sending .message-meta-delivery-dot,
.message-meta-delivery-queued .message-meta-delivery-dot,
.message-meta-delivery-syncing .message-meta-delivery-dot {
  animation: messageDeliveryPulse 1.4s ease-in-out infinite;
}

.message-meta-delivery-pending {
  background: rgba(29, 111, 214, 0.1);
  color: #1659b7;
}

.message-meta-delivery-success {
  background: rgba(18, 183, 106, 0.12);
  color: #067647;
}

.message-meta-delivery-error {
  background: rgba(217, 45, 32, 0.12);
  color: #b42318;
}

.message-meta-time {
  color: #7b8794;
  font-size: 9px;
  font-weight: 600;
  line-height: var(--leading-tight);
  opacity: 0.8;
}

.message.outbound .message-meta {
  text-align: right;
}

.message.outbound .message-meta-primary,
.message.outbound .message-meta-secondary {
  justify-content: flex-end;
}

.message.inbound .message-meta-primary {
  justify-content: flex-start;
}

.message.is-thread-reply {
  max-width: min(500px, 100%);
}

.message.is-thread-reply .message-frame {
  gap: 3px;
}

.message.is-thread-reply .message-bubble {
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(251, 247, 255, 0.92) 0%, rgba(247, 243, 255, 0.94) 100%);
  border-color: rgba(168, 85, 247, 0.12);
  box-shadow: none;
}

.message.is-thread-reply .message-content {
  font-size: 10px;
  line-height: 1.42;
}

.message.is-thread-reply .message-meta-author {
  font-size: 9px;
}

.message.is-thread-reply .message-meta-time,
.message.is-thread-reply .message-role-badge {
  font-size: 8px;
}

.message-delivery-progress-step.is-current .message-delivery-progress-dot::before {
  animation: messageDeliveryPulse 1.4s ease-in-out infinite;
}

@keyframes messageDeliveryPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.94);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.message-action-button {
  min-height: 24px;
  padding: 0 7px;
  font-size: 9px;
  flex-shrink: 0;
  border-color: rgba(220, 227, 236, 0.76);
  background: rgba(255, 255, 255, 0.92);
}

.message-action-delete {
  border-color: rgba(192, 51, 51, 0.16);
  color: #b42318;
}

.message-action-retry {
  border-color: rgba(29, 111, 214, 0.18);
  color: #1659b7;
}

.message:hover .message-actions,
.message:focus-within .message-actions {
  opacity: 1;
  transform: translateY(0);
}

.message-content {
  font-size: 11px;
  line-height: 1.5;
  color: #1f2937;
  overflow-wrap: anywhere;
}

.message-thread-replies .message-action-button {
  display: none;
}

.message-thread-replies .message-actions-menu {
  display: none;
}

.composer {
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  align-content: start;
  height: fit-content;
  min-height: 0;
  max-height: min(164px, 21vh);
  overflow: auto;
  padding: 4px;
  border: 1px solid rgba(223, 229, 237, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.04);
}

.composer.is-clean {
  gap: 3px;
}

.composer.is-minimal {
  gap: 2px;
  padding: 3px;
  border-color: rgba(233, 237, 243, 0.86);
  border-radius: 10px;
  box-shadow: none;
}

.composer.is-ultra-minimal {
  gap: 1px;
  padding: 1px;
  border-color: rgba(237, 241, 246, 0.92);
  background: rgba(255, 255, 255, 0.985);
}

.composer-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.composer-grid {
  display: grid;
  gap: 6px;
}

.composer.is-clean .composer-grid {
  gap: 2px;
}

.composer-signal-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.composer.is-clean .composer-signal-strip {
  gap: 4px;
}

.composer-reply-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px;
  padding: 3px 5px;
  border: 1px solid rgba(29, 111, 214, 0.14);
  border-radius: 9px;
  background: linear-gradient(180deg, #f7faff 0%, #f2f7ff 100%);
}

.composer.is-clean .composer-reply-target {
  display: none;
}

.composer-reply-target-copy {
  display: grid;
  gap: 2px;
}

.composer-reply-target-copy strong {
  font-size: 9px;
}

.composer-reply-target-copy span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.composer-reply-target-clear {
  min-height: 22px;
  white-space: nowrap;
}

.composer-section {
  display: grid;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(227, 233, 240, 0.82);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}

.composer.is-clean .composer-main-section {
  padding: 1px;
  border-color: rgba(220, 227, 236, 0.72);
  background: #ffffff;
}

.composer.is-minimal .composer-main-section {
  padding: 1px;
  border-color: rgba(220, 227, 236, 0.72);
  border-radius: 10px;
}

.composer.is-minimal .composer-topbar {
  gap: 3px;
  padding-bottom: 0;
}

.composer.is-ultra-minimal .composer-topbar {
  display: none;
}

.composer.is-minimal .composer-tools select,
.composer.is-minimal .composer-toggle-button {
  min-height: 24px;
  height: 24px;
  font-size: 9px;
}

.composer.is-minimal textarea {
  min-height: 34px;
  padding: 4px 7px;
}

.composer.is-ultra-minimal textarea {
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 10px;
}

.composer.is-minimal .composer-footer {
  gap: 4px;
  padding-top: 3px;
  border-top-color: rgba(242, 245, 249, 0.82);
}

.composer.is-ultra-minimal .composer-footer {
  grid-template-columns: auto;
  justify-content: end;
  gap: 3px;
  padding-top: 2px;
}

.composer.is-minimal .composer-footer-copy {
  display: none;
}

.composer.is-ultra-minimal .composer-footer-copy {
  display: none;
}

.composer.is-minimal .composer-submit-actions {
  width: 100%;
  justify-content: space-between;
}

.composer.is-ultra-minimal .composer-submit-actions {
  width: auto;
  justify-content: flex-end;
}

.composer.is-minimal .composer-submit-actions .ghost-button,
.composer.is-minimal .composer-submit-actions .primary-button {
  min-height: 28px;
  font-size: 10px;
}

.composer.is-ultra-minimal .composer-submit-actions .ghost-button {
  display: none;
}

.composer.is-ultra-minimal .composer-submit-actions .primary-button {
  min-height: 30px;
  min-width: 112px;
  font-size: 10px;
}

.composer[data-thread-state="active"] {
  border-color: rgba(214, 226, 240, 0.94);
  background: rgba(255, 255, 255, 0.995);
}

.composer[data-thread-state="critical"] {
  border-color: rgba(242, 213, 197, 0.96);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(255, 251, 248, 0.99) 100%);
  box-shadow: 0 -10px 26px rgba(176, 74, 22, 0.05);
}

.composer[data-thread-state="critical"] .composer-main-section {
  border-color: rgba(228, 196, 177, 0.9);
  background: rgba(255, 255, 255, 0.98);
}

.composer[data-thread-state="critical"] .primary-button {
  box-shadow: inset 0 0 0 1px rgba(176, 74, 22, 0.12);
}

.composer.is-minimal #discardReplyDraftButton:not([hidden]) {
  display: none;
}

.composer label {
  font-size: 8px;
  font-weight: 800;
}

.composer-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 0;
}

.composer-tools select {
  min-width: 0;
  height: 28px;
  font-size: 9px;
  border-radius: 7px;
}

.composer-toggle-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 9px;
  border-radius: 7px;
}

.composer-toggle-button.is-active {
  border-color: rgba(29, 111, 214, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
}

.composer textarea {
  width: 100%;
  min-height: 38px;
  resize: vertical;
  padding: 5px 7px;
  font-size: 11px;
  line-height: 1.3;
  background: #ffffff;
  border-radius: 8px;
  border-color: rgba(226, 232, 240, 0.84);
}

.composer.is-clean textarea {
  min-height: 34px;
}

.composer.is-awaiting-provider .composer-main-section {
  border-color: rgba(161, 92, 7, 0.24);
  background: linear-gradient(180deg, #fffdf8 0%, #fff8ef 100%);
}

.composer.is-awaiting-provider .composer-main-section textarea {
  background: rgba(255, 255, 255, 0.95);
}

.composer.is-awaiting-provider .composer-submit-actions .primary-button {
  box-shadow: inset 0 0 0 1px rgba(161, 92, 7, 0.18);
}

#replyAttachmentsInput {
  min-height: 32px;
}

.composer-attachments-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.composer-attachments-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 18px;
  max-width: 100%;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.composer-attachments-meta span[data-tone="success"] {
  border-color: rgba(17, 132, 91, 0.22);
  background: #f1fbf6;
  color: var(--success);
}

.composer-attachments-meta span[data-tone="error"] {
  border-color: rgba(192, 51, 51, 0.22);
  background: #fff4f4;
  color: var(--danger);
}

.composer-attachments-preview {
  display: grid;
  gap: 3px;
}

.composer-footer-copy {
  display: grid;
  gap: 0;
  align-content: start;
  min-width: 0;
}

.composer-footer-copy-primary {
  min-height: 0;
}

.composer-footer-label {
  display: none;
}

.composer-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px;
  padding-top: 2px;
  border-top: 0;
}

.composer.is-ultra-minimal .composer-footer {
  padding-top: 0;
}

.composer:not(.has-footer-status) .composer-footer {
  grid-template-columns: auto;
  justify-content: end;
}

.composer:not(.has-footer-status) .composer-footer-copy {
  display: none;
}

.composer-status-bar {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 3px;
  flex-wrap: wrap;
  min-width: 0;
}

.composer-status-bar-primary {
  align-items: flex-start;
}

.composer-status-bar-footer {
  align-items: flex-start;
}

.composer-status-bar span:not([hidden]) {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  max-width: 100%;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--text-label);
  font-weight: 700;
  line-height: var(--leading-tight);
}

.composer-status-primary:not([hidden]) {
  min-height: 18px;
  padding: 0 5px;
  font-size: 8px;
  box-shadow: none;
  width: fit-content;
  max-width: 100%;
}

.composer-secondary-panel {
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  min-width: min(100%, 172px);
}

.composer-secondary-panel[hidden] {
  display: none !important;
}

.composer.is-clean .composer-secondary-panel {
  display: none;
}

.composer-secondary-panel > summary {
  min-height: 20px;
  padding: 3px 6px;
}

.composer.is-clean .composer-secondary-panel > summary {
  padding: 6px 8px;
}

.composer-secondary-panel > .compact-disclosure-body {
  padding-top: 0;
}

.composer-secondary-body {
  display: grid;
  gap: 3px;
}

.composer-status-bar-secondary span:not([hidden]) {
  min-height: 18px;
  font-size: 8px;
}

.composer-status-bar span[data-tone="info"] {
  border-color: rgba(29, 111, 214, 0.22);
  background: #f3f8ff;
  color: var(--accent);
}

.composer-status-bar span[data-tone="success"] {
  border-color: rgba(17, 132, 91, 0.22);
  background: #f1fbf6;
  color: var(--success);
}

.composer-status-bar span[data-tone="warning"] {
  border-color: rgba(161, 92, 7, 0.22);
  background: #fff8ef;
  color: var(--warning);
}

.composer-status-bar span[data-tone="progress"] {
  border-color: rgba(71, 84, 103, 0.2);
  background: #f5f7fb;
  color: #475467;
}

.composer-status-bar span[data-tone="error"] {
  border-color: rgba(192, 51, 51, 0.22);
  background: #fff4f4;
  color: var(--danger);
}

#connectorHint {
  width: auto;
  max-width: 100%;
  justify-content: flex-start;
  border-style: solid;
  white-space: normal;
  line-height: 1.3;
  min-height: 0;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 7px;
}

#connectorHint[data-compact="true"] {
  border-style: solid;
  border-color: rgba(220, 227, 236, 0.88);
  background: rgba(249, 251, 253, 0.92);
  color: #667085;
  padding: 3px 6px;
}

#connectorHint[data-tone="success"] {
  border-color: rgba(17, 132, 91, 0.2);
  background: #f4fbf7;
  color: var(--success);
}

#connectorHint[data-tone="warning"] {
  border-color: rgba(161, 92, 7, 0.2);
  background: #fff8ef;
  color: var(--warning);
}

#connectorHint[data-tone="progress"],
#connectorHint[data-tone="info"] {
  border-color: rgba(29, 111, 214, 0.18);
  background: #f5f9ff;
  color: var(--accent);
}

#connectorHint[data-tone="error"] {
  border-color: rgba(192, 51, 51, 0.2);
  background: #fff5f5;
  color: var(--danger);
}

.composer-delivery-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid rgba(230, 235, 242, 0.88);
  border-radius: 10px;
  background: #fcfdff;
}

.composer-delivery-panel[data-tone="warning"] {
  border-color: rgba(161, 92, 7, 0.22);
  background: #fffaf2;
}

.composer-delivery-panel[data-tone="warning"] .composer-delivery-copy strong {
  color: #8a4b05;
}

.composer-delivery-panel[data-tone="progress"] {
  border-color: rgba(29, 111, 214, 0.18);
  background: #f5f9ff;
}

.composer-delivery-panel[data-tone="success"] {
  border-color: rgba(17, 132, 91, 0.2);
  background: #f4fbf7;
}

.composer-delivery-panel[data-tone="error"] {
  border-color: rgba(192, 51, 51, 0.2);
  background: #fff6f6;
}

.composer-delivery-panel[data-variant="compact"] {
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 10px;
}

.composer-delivery-panel[data-variant="compact"] .composer-delivery-copy {
  gap: 2px;
}

.composer-delivery-panel[data-variant="compact"] .composer-delivery-copy strong {
  font-size: 9px;
}

.composer-delivery-panel[data-variant="compact"] .composer-delivery-copy span {
  display: none;
}

.composer-delivery-panel[data-variant="compact"] .composer-delivery-copy small {
  font-size: 9px;
}

.composer-delivery-panel[data-variant="compact"] .composer-delivery-actions {
  flex-shrink: 0;
}

.composer-delivery-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.composer-delivery-copy strong {
  font-size: 9px;
  color: var(--text);
}

.composer-delivery-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.composer-delivery-signal {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(230, 235, 242, 0.92);
  background: rgba(244, 247, 251, 0.9);
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
}

.composer-delivery-signal[data-tone="success"] {
  border-color: rgba(17, 132, 91, 0.2);
  background: #edf9f2;
  color: #0f7b54;
}

.composer-delivery-signal[data-tone="warning"] {
  border-color: rgba(161, 92, 7, 0.22);
  background: #fff6e8;
  color: #9a5a06;
}

.composer-delivery-signal[data-tone="neutral"] {
  border-color: rgba(132, 146, 166, 0.22);
  background: #f4f6fa;
  color: #607086;
}

.composer-delivery-copy span,
.composer-delivery-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.composer-delivery-copy small {
  font-size: 8px;
}

.composer-delivery-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.composer-delivery-action {
  min-height: 24px;
  padding-inline: 8px;
  font-size: 9px;
  white-space: nowrap;
}

.composer-submit-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: end;
}

.composer-submit-actions .ghost-button,
.composer-submit-actions .primary-button {
  min-height: 24px;
  padding-inline: 6px;
  font-size: 9px;
  border-radius: 8px;
}

.composer.is-ultra-minimal .composer-submit-actions .primary-button {
  min-height: 24px;
  min-width: 88px;
  padding-inline: 8px;
  font-size: 9px;
}

.composer.is-ultra-minimal .composer-main-section {
  padding: 0;
  border-color: rgba(229, 235, 242, 0.64);
  border-radius: 8px;
}

.profile-section-card {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-section-card-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-section-card-copy h3 {
  margin: 0;
}

.profile-section-card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.profile-panel h3,
.profile-section-card h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--ink);
}

.profile-section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-section-card-meta {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: var(--leading-tight);
}

.thread-secondary-panel {
  position: relative;
  z-index: 18;
  display: block;
  width: 100%;
  height: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
}

.thread-secondary-panel summary {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 0 4px 0 6px;
  width: 100%;
  min-width: 0;
  cursor: pointer;
  list-style: none;
  border: 1px solid rgba(220, 227, 236, 0.82);
  border-radius: 999px;
  background: rgba(252, 253, 255, 0.92);
  box-shadow: none;
  white-space: nowrap;
}

.thread-secondary-panel .disclosure-summary-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.thread-secondary-panel summary strong {
  font-size: 7px;
  white-space: nowrap;
}

.thread-secondary-panel summary::-webkit-details-marker {
  display: none;
}

.thread-secondary-panel summary::after {
  content: "+";
  justify-self: end;
  color: var(--muted);
}

.thread-secondary-panel[open] summary::after {
  content: "-";
}

.thread-secondary-panel summary small {
  display: none;
}

.thread-secondary-summary-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.thread-secondary-panel[open] {
  position: fixed;
  top: 86px;
  right: 16px;
  bottom: 16px;
  width: min(380px, calc(100vw - 248px));
  height: calc(100vh - 102px);
  max-height: calc(100vh - 102px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  padding: 9px 9px 10px;
  overflow: hidden;
  border: 1px solid rgba(220, 227, 236, 0.96);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.thread-secondary-panel[open] summary {
  position: sticky;
  top: 0;
  z-index: 1;
  width: 100%;
  margin: 0 0 6px;
  background: rgba(255, 255, 255, 0.985);
}

.thread-secondary-shell {
  display: grid;
  gap: 5px;
  padding-top: 0;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.thread-secondary-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.thread-secondary-tab {
  min-height: 26px;
  padding: 0 6px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 8px;
  background: rgba(249, 251, 253, 0.88);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.thread-secondary-tab.is-active {
  border-color: rgba(29, 111, 214, 0.24);
  background: linear-gradient(180deg, #f5f9ff 0%, #edf4ff 100%);
  color: var(--accent);
}

.thread-secondary-panels,
.thread-secondary-view {
  display: grid;
  gap: 5px;
}

.thread-secondary-view:not(.is-active) {
  display: none;
}

@media (max-width: 1120px) {
  .thread-secondary-panel[open] {
    top: 76px;
    right: 12px;
    bottom: 12px;
    width: min(420px, calc(100vw - 24px));
    height: calc(100vh - 88px);
    max-height: calc(100vh - 88px);
  }
}

.thread-tertiary-disclosure {
  background: #fcfdff;
}

.thread-tertiary-disclosure,
.thread-secondary-panels .profile-section-card {
  min-height: 0;
}

.profile-card,
.timeline,
.technical-log {
  display: grid;
  gap: 6px;
}

.profile-summary-card,
.profile-subsection {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(220, 227, 236, 0.86);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
}

.profile-subsection-disclosure {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.profile-subsection-disclosure > summary {
  padding: 7px 8px;
}

.profile-subsection-disclosure > summary .disclosure-summary-copy {
  gap: 1px;
}

.profile-subsection-disclosure > summary .disclosure-summary-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.profile-subsection-disclosure > .compact-disclosure-body {
  display: grid;
  gap: 7px;
  padding-top: 0;
}

.profile-summary-head {
  display: grid;
  gap: 2px;
}

.profile-summary-head strong {
  font-size: 12px;
  color: var(--ink);
}

.profile-summary-head span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.profile-subsection-header strong {
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  line-height: var(--leading-tight);
}

.profile-subsection-stack {
  display: grid;
  gap: 6px;
}

.profile-chip-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.profile-facts-grid {
  display: grid;
  gap: 5px;
}

.profile-facts-grid-primary {
  gap: 3px;
}

.profile-facts-grid-secondary .profile-row span {
  color: #667085;
}

.profile-empty-copy {
  color: var(--muted);
  font-size: 10px;
}

.profile-subsection-compact {
  gap: 5px;
  padding-top: 6px;
}

.internal-note-form,
.internal-tag-form,
.internal-notes-list {
  display: grid;
  gap: 7px;
}

.internal-tags-list {
  display: grid;
  gap: 5px;
}

.internal-tag-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.internal-tag-form select {
  width: 100%;
}

.internal-tag-form .ghost-button,
.internal-note-form-footer .ghost-button {
  min-height: 28px;
  padding-inline: 9px;
  font-size: 10px;
}

.internal-note-form textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.internal-note-form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.internal-note-form-footer span {
  color: var(--muted);
  font-size: 11px;
}

.internal-note-composer-panel {
  border-color: rgba(220, 227, 236, 0.82);
  background: rgba(249, 251, 254, 0.48);
}

.internal-note-composer-panel > summary {
  padding: 7px 9px;
}

.internal-note-composer-panel > .compact-disclosure-body {
  padding-top: 0;
}

.activity-section-disclosure {
  border-color: rgba(220, 227, 236, 0.82);
  background: rgba(249, 251, 254, 0.48);
}

.activity-section-disclosure > summary {
  padding: 7px 9px;
}

.activity-section-disclosure .disclosure-summary-copy {
  gap: 1px;
}

.activity-section-disclosure .disclosure-summary-copy small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.activity-section-disclosure > .compact-disclosure-body {
  padding-top: 0;
}

.internal-note-card {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid rgba(220, 227, 236, 0.86);
  border-radius: 10px;
  background: #ffffff;
}

.internal-note-card p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.internal-note-card span {
  color: var(--muted);
  font-size: 11px;
}

.internal-tag-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(220, 227, 236, 0.86);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.tag-remove-button {
  min-height: var(--control-xs);
  padding: 0 9px;
  font-size: 11px;
}

@media (max-width: 680px) {
  .profile-section-card-header {
    align-items: flex-start;
  }

  .profile-row {
    grid-template-columns: minmax(76px, 92px) minmax(0, 1fr);
    gap: 6px;
    padding: 5px 0;
  }

  .profile-row strong {
    font-size: 9px;
  }

  .profile-row span {
    font-size: 10px;
    line-height: 1.3;
  }

  .internal-tag-form {
    grid-template-columns: 1fr;
  }

  .internal-note-form-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .internal-note-form-footer .ghost-button {
    width: 100%;
  }

  .internal-tag-chip-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .tag-remove-button {
    width: 100%;
  }
}

.inline-empty {
  height: auto;
  min-height: 0;
  padding: 14px;
}

.timeline-row,
.log-row {
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 12px;
}

.profile-row,
.timeline-row strong,
.log-row strong {
  display: grid;
}

.profile-row {
  grid-template-columns: minmax(88px, 108px) minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

.profile-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile-row strong,
.timeline-row strong,
.log-row strong {
  display: block;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.25;
}

.profile-row span,
.timeline-row span,
.log-row span {
  color: var(--muted);
  line-height: 1.35;
}

.profile-row span {
  color: #344054;
}

.profile-facts-grid-primary .profile-row {
  gap: 6px;
  padding: 5px 0;
}

.profile-facts-grid-primary .profile-row strong {
  color: #667085;
  font-size: 9px;
}

.profile-facts-grid-primary .profile-row span {
  color: #172033;
  font-weight: 600;
}

.timeline-row small,
.log-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.history-row-card {
  border-left-width: 3px;
}

.history-row-card-neutral {
  border-left-color: rgba(148, 163, 184, 0.45);
}

.history-row-card-success {
  border-left-color: rgba(17, 132, 91, 0.42);
  background: linear-gradient(180deg, #ffffff 0%, #f7fcf9 100%);
}

.history-row-card-warning {
  border-left-color: rgba(161, 92, 7, 0.42);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
}

.history-row-card-progress {
  border-left-color: rgba(29, 111, 214, 0.36);
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.history-row-card-error {
  border-left-color: rgba(192, 51, 51, 0.42);
  background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
}

.history-row-meta {
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.history-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.history-row-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.history-row-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.history-row-badge-success {
  border-color: rgba(17, 132, 91, 0.22);
  color: var(--success);
}

.history-row-badge-warning {
  border-color: rgba(161, 92, 7, 0.22);
  color: var(--warning);
}

.history-row-badge-progress {
  border-color: rgba(29, 111, 214, 0.22);
  color: var(--accent);
}

.history-row-badge-error {
  border-color: rgba(192, 51, 51, 0.22);
  color: var(--danger);
}

.history-row-channel {
  color: var(--soft) !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-row-detail {
  color: #475467;
  font-size: 11px;
  line-height: 1.38;
}

.history-row-code {
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Consolas, monospace;
  color: #516071;
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.history-stack {
  display: grid;
  gap: 6px;
}

.history-secondary-disclosure {
  display: grid;
  gap: 6px;
  padding: 7px 9px;
  border: 1px dashed rgba(148, 163, 184, 0.36);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.72);
}

.history-secondary-disclosure summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

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

.history-secondary-summary-copy {
  display: grid;
  gap: 2px;
}

.history-secondary-summary-copy strong {
  font-size: 11px;
  color: var(--ink);
}

.history-secondary-summary-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

@media (max-width: 680px) {
  .timeline-row,
  .log-row {
    gap: 3px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .history-row-top {
    gap: 8px;
  }

  .history-row-title-wrap {
    gap: 6px;
  }

  .timeline-row strong,
  .log-row strong {
    font-size: 9px;
    line-height: 1.2;
  }

  .history-row-meta,
  .history-row-channel {
    font-size: 9px;
  }

  .history-row-badge {
    min-height: 16px;
    padding: 0 5px;
    font-size: 8px;
  }

  .history-row-detail,
  .history-row-code,
  .timeline-row small,
  .log-row small {
    font-size: 10px;
    line-height: 1.35;
  }

  .history-secondary-disclosure {
    gap: 5px;
    padding: 6px 8px;
    border-radius: 8px;
  }

  .history-secondary-summary-copy {
    gap: 1px;
  }

  .history-secondary-summary-copy strong {
    font-size: 10px;
  }

  .history-secondary-summary-copy small {
    font-size: 9px;
  }

  .history-secondary-list,
  .history-stack {
    gap: 5px;
  }
}

.history-secondary-disclosure summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-weight: 800;
}

.history-secondary-disclosure[open] summary::after {
  content: "-";
}

.history-secondary-list {
  display: grid;
  gap: 6px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.45;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast[data-tone="success"] {
  background: #133d2f;
}

.toast[data-tone="warning"] {
  background: #6f4708;
}

.toast[data-tone="error"] {
  background: #7a1f1f;
}

.toast[data-tone="progress"] {
  background: #243247;
}

.toast[data-tone="info"] {
  background: var(--ink);
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.app-boot-state {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 24px;
  background: transparent;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.app-boot-state[data-state="ready"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-boot-card {
  display: grid;
  gap: 10px;
  width: min(100%, 360px);
  padding: 14px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.1);
  backdrop-filter: blur(10px);
}

.app-boot-state[data-state="loading"] .app-boot-card {
  border-color: rgba(29, 111, 214, 0.18);
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 10px;
  width: min(100%, 320px);
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.08);
}

.app-boot-state[data-state="loading"] {
  padding-top: 14px;
}

.app-boot-state[data-state="error"] .app-boot-card {
  width: min(100%, 460px);
  padding: 26px;
  border-color: rgba(192, 51, 51, 0.18);
  background: linear-gradient(180deg, #fff9f9 0%, rgba(255, 255, 255, 0.99) 100%);
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.12);
}

.app-boot-state[data-state="error"] {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(29, 111, 214, 0.08), transparent 32%),
    radial-gradient(circle at bottom right, rgba(23, 32, 51, 0.05), transparent 28%),
    rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.app-boot-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(29, 111, 214, 0.14);
  border-top-color: rgba(29, 111, 214, 0.88);
  border-radius: 999px;
  animation: app-boot-spin 900ms linear infinite;
}

.app-boot-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  width: fit-content;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(29, 111, 214, 0.08);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.app-boot-state[data-state="loading"] .app-boot-kicker {
  grid-column: 1 / -1;
  min-height: 18px;
  padding: 0 6px;
  font-size: 8px;
}

.app-boot-copy {
  display: grid;
  gap: 4px;
}

.app-boot-state[data-state="loading"] .app-boot-copy {
  gap: 2px;
}

.app-boot-copy strong {
  font-size: 16px;
  line-height: 1.2;
}

.app-boot-state[data-state="loading"] .app-boot-copy strong {
  font-size: 12px;
}

.app-boot-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.app-boot-state[data-state="loading"] .app-boot-copy p {
  font-size: 10px;
  line-height: 1.35;
}

.app-boot-progress {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(29, 111, 214, 0.08);
}

.app-boot-state[data-state="loading"] .app-boot-progress,
.app-boot-state[data-state="loading"] .app-boot-actions {
  grid-column: 1 / -1;
}

.app-boot-state[data-state="loading"] .app-boot-progress {
  height: 4px;
}

.app-boot-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(29, 111, 214, 0.28) 0%, rgba(29, 111, 214, 0.88) 100%);
  animation: app-boot-progress-slide 1100ms ease-in-out infinite;
}

.app-boot-actions {
  display: flex;
  justify-content: flex-start;
}

.app-boot-state[data-state="error"] .app-boot-spinner {
  display: none;
}

.app-boot-state[data-state="error"] .app-boot-progress {
  display: none;
}

@keyframes app-boot-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes app-boot-progress-slide {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(290%);
  }
}

@media (max-width: 640px) {
  .app-boot-state {
    justify-content: stretch;
    align-items: flex-start;
    padding: 10px 10px 0;
  }

  .app-boot-state[data-state="loading"] {
    padding-top: 10px;
  }

  .app-boot-card {
    width: 100%;
    max-width: none;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
  }

  .app-boot-spinner {
    width: 22px;
    height: 22px;
  }

  .app-boot-copy {
    gap: 2px;
  }

  .app-boot-copy strong {
    font-size: 13px;
    line-height: 1.25;
  }

  .app-boot-copy p {
    font-size: 11px;
    line-height: 1.4;
  }

  .app-boot-progress {
    height: 4px;
  }
}

.auth-shell {
  width: min(100% - 32px, 980px);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 64px rgba(16, 24, 40, 0.1);
}

.auth-panel-intro,
.auth-panel-form {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding: 30px;
}

.auth-panel-intro {
  align-content: space-between;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.auth-panel-form {
  align-content: start;
  border-left: 1px solid rgba(220, 227, 236, 0.9);
  background: rgba(255, 255, 255, 0.98);
}

.auth-brand {
  padding-bottom: 0;
  border-bottom: 0;
}

.auth-copy {
  display: grid;
  gap: 10px;
}

.auth-panel h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.02;
}

.auth-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-highlights {
  display: grid;
  gap: 12px;
}

.auth-highlight-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.auth-highlight-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-highlight-card strong {
  font-size: 16px;
  line-height: 1.2;
}

.auth-highlight-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-form-header {
  display: grid;
  gap: 6px;
}

.auth-form-header strong {
  font-size: 18px;
  line-height: 1.2;
}

.auth-form-header span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  height: 46px;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 500;
}

.login-form .primary-button {
  width: 100%;
  min-height: 46px;
}

.auth-error {
  min-height: 20px;
  color: var(--danger) !important;
  font-size: 13px;
  font-weight: 700;
}

.auth-note {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  font-size: 13px;
}

.auth-note-soft {
  gap: 2px;
  background: rgba(248, 250, 252, 0.92);
}

.auth-note span {
  color: var(--muted);
}

.auth-security {
  display: grid;
  gap: 4px;
  padding-top: 2px;
}

.auth-security span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 32, 51, 0.36);
  backdrop-filter: blur(8px);
}

.modal-backdrop.page-view {
  position: static;
  inset: auto;
  z-index: auto;
  display: block;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  height: 100%;
  overflow: auto;
}

.modal-panel {
  display: grid;
  gap: 18px;
  width: min(100%, 760px);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, #fbfcff 0, #ffffff 120px);
  box-shadow: var(--shadow);
}

.modal-backdrop.page-view .modal-panel {
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.modal-section-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.modal-section-card,
.setup-summary-card,
.setup-card,
.channel-settings-card,
.audit-row,
.outbox-row,
.health-row,
.template-row,
.user-row,
.queue-view-card,
.admin-page-tab,
.channel-settings-nav-item {
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, transform 140ms ease;
}

.modal-section-grid {
  display: grid;
  gap: 14px;
}

.modal-section-grid-dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-header-inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-section-heading,
.monitor-section-header,
.channel-detail-section-header {
  display: grid;
  gap: 3px;
}

.section-header-inline strong,
.admin-section-heading strong,
.monitor-section-header strong,
.channel-detail-section-header strong {
  font-size: 13px;
}

.section-header-inline span,
.admin-section-heading span,
.monitor-section-header span,
.channel-detail-section-header span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: -22px;
  z-index: 4;
  margin: -22px -22px 0;
  padding: 22px 22px 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.modal-backdrop.page-view .modal-header {
  top: 0;
  margin: 0 0 14px;
  padding: 0 0 14px;
  background: transparent;
  backdrop-filter: none;
}

.modal-backdrop.page-view .modal-section-card,
.modal-backdrop.page-view .setup-card,
.modal-backdrop.page-view .setup-summary-card,
.modal-backdrop.page-view .channel-settings-card,
.modal-backdrop.page-view .audit-row,
.modal-backdrop.page-view .outbox-row,
.modal-backdrop.page-view .health-row,
.modal-backdrop.page-view .template-row {
  box-shadow: none;
}

.modal-header-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
}

.modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.user-form,
.password-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 132px minmax(0, 1.1fr) auto;
  align-items: end;
  gap: 10px;
}

.password-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.user-form label,
.password-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.user-form input,
.user-form select,
.password-form input {
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  font-size: 13px;
}

.user-form .auth-error,
.password-form .auth-error {
  grid-column: 1 / -1;
  margin: 0;
}

.users-list {
  display: grid;
  gap: 12px;
}

.team-management-panel {
  display: grid;
  gap: 14px;
}

.team-management-grid {
  display: grid;
  gap: 12px;
}

.team-form-card {
  gap: 12px;
  padding: 14px;
  background: #fcfdff;
}

.channels-modal-panel {
  width: min(100%, 980px);
}

.audit-modal-panel {
  width: min(100%, 900px);
}

.outbox-modal-panel {
  width: min(100%, 960px);
}

.health-modal-panel {
  width: min(100%, 980px);
}

.setup-modal-panel {
  width: min(100%, 1040px);
}

.templates-modal-panel {
  width: min(100%, 900px);
}

.channels-settings-list {
  display: grid;
  gap: 14px;
}

.admin-page-sidebar {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  padding: 12px 11px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 10px;
  background: rgba(252, 253, 255, 0.96);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
}

.admin-page-sidebar .sidebar-section-header {
  display: grid;
  gap: 2px;
}

.admin-page-sidebar .sidebar-section-header strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.admin-page-sidebar .sidebar-section-header span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.admin-page-back-button {
  justify-content: flex-start;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  background: #ffffff;
}

.admin-page-tabs {
  display: grid;
  gap: 4px;
  overflow: visible;
  padding-bottom: 0;
}

.admin-page-tabs::-webkit-scrollbar {
  display: none;
}

.admin-page-tab {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  text-align: left;
}

.admin-page-tab strong {
  font-size: 12px;
}

.admin-page-tab:hover,
.admin-page-tab.is-active {
  border-color: rgba(29, 111, 214, 0.32);
  background: #f6faff;
}

.admin-page-content {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding-right: 0;
}

.admin-page-content > * {
  width: min(100%, 1080px);
}

.channel-settings-summary-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.channel-settings-summary-copy {
  display: grid;
  gap: 4px;
}

.channel-settings-summary-copy strong {
  font-size: 14px;
}

.channel-settings-summary-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.channel-settings-summary-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.monitor-summary-grid {
  margin-bottom: 2px;
}

.monitor-section {
  display: grid;
  gap: 12px;
}

.monitor-section-body {
  display: grid;
  gap: 10px;
}

.monitor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(260px, 0.84fr);
  gap: 14px;
  align-items: start;
}

.monitor-workspace-main,
.monitor-workspace-side {
  display: grid;
  gap: 10px;
}

.admin-summary-card {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 9px 10px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
}

.admin-summary-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-summary-card strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.05;
}

.admin-summary-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.admin-summary-card-success {
  border-color: rgba(17, 132, 91, 0.22);
}

.admin-summary-card-warning {
  border-color: rgba(161, 92, 7, 0.22);
  background: #fffdf9;
}

.admin-summary-card-neutral {
  border-color: rgba(29, 111, 214, 0.14);
}

.admin-summary-pill {
  display: grid;
  gap: 2px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
}

.admin-summary-pill span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-summary-pill strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.admin-summary-pill small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.admin-summary-pill-success {
  border-color: rgba(17, 132, 91, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf7 100%);
}

.admin-summary-pill-warning {
  border-color: rgba(161, 92, 7, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
}

.admin-summary-pill-neutral {
  border-color: rgba(29, 111, 214, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.channel-settings-layout {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.channel-settings-nav {
  display: grid;
  gap: 6px;
  position: sticky;
  top: 90px;
}

.channel-settings-nav-list {
  display: grid;
  gap: 6px;
}

.channel-settings-nav-item {
  position: relative;
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  text-align: left;
  box-shadow: none;
  overflow: hidden;
}

.channel-settings-nav-item::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: rgba(148, 163, 184, 0.34);
}

.channel-settings-nav-item-success::before {
  background: rgba(17, 132, 91, 0.66);
}

.channel-settings-nav-item-warning::before {
  background: rgba(161, 92, 7, 0.72);
}

.channel-settings-nav-item-error::before {
  background: rgba(192, 51, 51, 0.76);
}

.channel-settings-nav-item:hover,
.channel-settings-nav-item.is-active {
  border-color: rgba(29, 111, 214, 0.28);
  background: #f9fbff;
}

.queue-summary-button:focus-visible,
.queue-workload-button:focus-visible,
.selection-toggle:focus-visible,
.item-quick-action-button:focus-visible,
.thread-quick-action-button:focus-visible,
.admin-page-tab:focus-visible,
.channel-settings-nav-item:focus-visible {
  outline: none;
  border-color: rgba(29, 111, 214, 0.45);
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.12);
}

.admin-page-tab:hover:not(:disabled),
.channel-settings-nav-item:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.channel-settings-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.channel-settings-nav-top strong,
.channel-settings-nav-copy,
.channel-settings-nav-meta {
  display: block;
}

.channel-settings-nav-signal-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.channel-settings-nav-signal {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  color: #475467;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.channel-settings-nav-signal-success {
  border-color: rgba(17, 132, 91, 0.18);
  background: #f3fbf7;
  color: #0f7b54;
}

.channel-settings-nav-signal-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: #fff8ef;
  color: #9a5a09;
}

.channel-settings-nav-signal-error {
  border-color: rgba(192, 51, 51, 0.18);
  background: #fff5f5;
  color: #b42318;
}

.channel-settings-nav-top strong {
  font-size: 13px;
}

.channel-settings-nav-copy,
.channel-settings-nav-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.channel-settings-nav-copy {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.channel-settings-nav-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.channel-settings-detail {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.channel-settings-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 0;
}

.channel-settings-hero-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.channel-settings-hero-copy strong {
  font-size: 20px;
  line-height: 1.04;
}

.channel-settings-hero-copy > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  max-width: 56ch;
}

.channel-hero-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.channel-hero-snapshot-card {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 10px 11px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 10px;
  background: rgba(252, 253, 255, 0.94);
}

.channel-hero-snapshot-card span {
  margin-top: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.channel-hero-snapshot-card strong {
  font-size: 14px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-hero-snapshot-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.channel-hero-snapshot-card-success {
  border-color: rgba(17, 132, 91, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf7 100%);
}

.channel-hero-snapshot-card-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
}

.channel-hero-snapshot-card-neutral {
  border-color: rgba(29, 111, 214, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.channel-capability-pills {
  margin-top: 0;
}

.channel-guidance-card {
  display: grid;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
}

.channel-guidance-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.channel-guidance-copy span {
  margin-top: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.channel-guidance-copy strong {
  font-size: 16px;
  line-height: 1.08;
}

.channel-guidance-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.channel-guidance-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.channel-guidance-disclosure {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.58);
}

.channel-guidance-disclosure .compact-disclosure-body {
  padding-top: 0;
}

.channel-guidance-step {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 9px;
  background: rgba(248, 250, 252, 0.9);
}

.channel-guidance-step strong {
  font-size: 11px;
  line-height: 1.3;
}

.channel-guidance-step span {
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.channel-guidance-card-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
}

.channel-guidance-card-warning .channel-guidance-copy span,
.channel-guidance-card-warning .channel-guidance-copy strong {
  color: #9a5a09;
}

.channel-guidance-card-info {
  border-color: rgba(29, 111, 214, 0.16);
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.channel-guidance-card-info .channel-guidance-copy span,
.channel-guidance-card-info .channel-guidance-copy strong {
  color: var(--accent);
}

.channel-guidance-card-success {
  border-color: rgba(17, 132, 91, 0.18);
  background: linear-gradient(180deg, #f4fbf7 0%, #ffffff 100%);
}

.channel-guidance-card-success .channel-guidance-copy span,
.channel-guidance-card-success .channel-guidance-copy strong {
  color: var(--success);
}

.channel-view-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 0 0;
}

.channel-view-tab {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(220, 227, 236, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.channel-view-tab.is-active {
  border-color: rgba(29, 111, 214, 0.24);
  background: linear-gradient(180deg, #f5f9ff 0%, #edf4ff 100%);
  color: var(--accent);
}

.audit-filters,
.outbox-filters {
  display: grid;
  grid-template-columns: 160px 140px minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.audit-filters label,
.outbox-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.audit-filters select,
.audit-filters input,
.outbox-filters select,
.outbox-filters input {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 10px;
}

.modal-filter-bar {
  position: sticky;
  top: 83px;
  z-index: 3;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.audit-list,
.outbox-list,
.health-list,
.setup-list,
.templates-list {
  display: grid;
  gap: 10px;
}

.setup-summary {
  display: grid;
}

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

.setup-summary-card,
.setup-card {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.setup-summary-card strong,
.setup-card strong {
  font-size: 13px;
}

.setup-summary-card p,
.setup-card-description {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.setup-summary-stats,
.setup-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.setup-card-overview {
  display: grid;
  gap: 8px;
}

.setup-card-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.setup-card-meta code {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.setup-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.setup-card-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.setup-actions {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-action {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.setup-action span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.setup-action.error {
  border-color: rgba(192, 51, 51, 0.22);
  background: #fff6f6;
}

.setup-action.warning {
  border-color: rgba(161, 92, 7, 0.22);
  background: #fff8ef;
}

.setup-action.info {
  border-color: rgba(17, 132, 91, 0.2);
  background: #f2fbf7;
}

.setup-card-lead {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.setup-card-lead strong {
  font-size: 13px;
}

.setup-card-lead span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.setup-card-lead.error {
  border-color: rgba(192, 51, 51, 0.22);
  background: #fff6f6;
}

.setup-card-lead.warning {
  border-color: rgba(161, 92, 7, 0.22);
  background: #fff8ef;
}

.setup-card-lead.info {
  border-color: rgba(17, 132, 91, 0.2);
  background: #f2fbf7;
}

.setup-card.is-blocked {
  border-color: rgba(192, 51, 51, 0.22);
}

.setup-card.is-warning {
  border-color: rgba(161, 92, 7, 0.22);
}

.setup-card.is-demo {
  border-color: rgba(102, 112, 133, 0.2);
}

.setup-card.is-ready {
  border-color: rgba(17, 132, 91, 0.2);
}

.monitor-priority-card {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
}

.monitor-priority-card strong {
  font-size: 12px;
}

.monitor-priority-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.monitor-priority-card.is-warning {
  border-color: rgba(161, 92, 7, 0.22);
  background: #fffdf9;
}

.monitor-priority-card.is-neutral {
  border-color: rgba(29, 111, 214, 0.14);
}

.monitor-priority-card.is-success {
  border-color: rgba(17, 132, 91, 0.2);
  background: #f7fcf9;
}

.monitor-attention-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.monitor-attention-card {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
}

.monitor-attention-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.monitor-attention-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.15;
}

.monitor-attention-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.monitor-attention-card-error {
  border-color: rgba(192, 51, 51, 0.2);
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
}

.monitor-attention-card-warning {
  border-color: rgba(161, 92, 7, 0.2);
  background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
}

.monitor-attention-card-neutral {
  border-color: rgba(29, 111, 214, 0.16);
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.monitor-guidance-card {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
}

.monitor-guidance-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.monitor-guidance-copy span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.monitor-guidance-copy strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.08;
}

.monitor-guidance-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.monitor-guidance-steps {
  display: grid;
  gap: 8px;
}

.monitor-guidance-disclosure {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.58);
}

.monitor-guidance-disclosure > .compact-disclosure-body {
  padding-top: 0;
}

.monitor-guidance-disclosure summary strong {
  font-size: 13px;
}

.monitor-guidance-disclosure summary small {
  max-width: 56ch;
}

.monitor-guidance-step {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.88);
}

.monitor-guidance-step strong {
  font-size: 11px;
  line-height: 1.3;
}

.monitor-guidance-step span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.monitor-guidance-card-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
}

.monitor-guidance-card-warning .monitor-guidance-copy span,
.monitor-guidance-card-warning .monitor-guidance-copy strong {
  color: #9a5a09;
}

.monitor-guidance-card-info {
  border-color: rgba(29, 111, 214, 0.16);
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.monitor-guidance-card-info .monitor-guidance-copy span,
.monitor-guidance-card-info .monitor-guidance-copy strong {
  color: var(--accent);
}

.monitor-guidance-card-success {
  border-color: rgba(17, 132, 91, 0.18);
  background: linear-gradient(180deg, #f4fbf7 0%, #ffffff 100%);
}

.monitor-guidance-card-success .monitor-guidance-copy span,
.monitor-guidance-card-success .monitor-guidance-copy strong {
  color: var(--success);
}

@media (max-width: 980px) {
  .monitor-workspace {
    grid-template-columns: 1fr;
  }

  .monitor-guidance-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

.monitor-pulse-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.monitor-pulse-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
}

.monitor-pulse-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.monitor-pulse-card strong {
  font-size: 18px;
  line-height: 1.05;
  color: var(--ink);
}

.monitor-pulse-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.monitor-pulse-card-success {
  border-color: rgba(17, 132, 91, 0.18);
  background: #f2fbf7;
}

.monitor-pulse-card-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: #fff8ef;
}

.monitor-pulse-card-info {
  border-color: rgba(29, 111, 214, 0.18);
  background: #f5f9ff;
}

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

.monitor-action-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monitor-action-card {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 9px 10px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  align-content: start;
}

.monitor-action-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.monitor-action-card strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.05;
}

.monitor-action-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.monitor-action-card em {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(29, 111, 214, 0.08);
  color: var(--accent);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.monitor-action-card-success {
  border-color: rgba(17, 132, 91, 0.18);
  background: #f2fbf7;
}

.monitor-action-card-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: #fff8ef;
}

.monitor-action-card-info {
  border-color: rgba(29, 111, 214, 0.18);
  background: #f5f9ff;
}

.monitor-compact-disclosure > .compact-disclosure-body {
  gap: 10px;
}

.monitor-compact-disclosure-secondary {
  background: rgba(250, 252, 255, 0.78);
}

.monitor-compact-disclosure-secondary summary strong {
  color: #41506a;
}

.monitor-compact-disclosure-secondary summary small {
  color: #73829a;
}

.audit-row,
.outbox-row,
.health-row,
.template-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
}

.audit-row-main,
.outbox-row-main,
.health-row-main {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.health-row-overview {
  display: grid;
  gap: 8px;
}

.health-row-lead {
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 7px;
  background: #f8fafc;
}

.health-row-lead strong {
  font-size: 12px;
}

.health-row-lead span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.health-row-lead.error {
  border-color: rgba(192, 51, 51, 0.22);
  background: #fff6f6;
}

.health-row-lead.warning {
  border-color: rgba(161, 92, 7, 0.22);
  background: #fff8ef;
}

.health-row-lead.info {
  border-color: rgba(17, 132, 91, 0.2);
  background: #f2fbf7;
}

.template-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 150px 170px;
  align-items: end;
  gap: 10px;
}

.template-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.template-form input,
.template-form select,
.template-form textarea {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  font-size: 13px;
}

.template-form input,
.template-form select {
  height: 38px;
}

.template-form textarea {
  padding-top: 10px;
  resize: vertical;
  line-height: 1.4;
}

.template-form .auth-error {
  grid-column: 1 / -1;
  margin: 0;
}

.template-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.audit-row strong,
.outbox-row strong,
.health-row strong,
.template-row strong {
  font-size: 14px;
}

.audit-row span,
.audit-row time,
.outbox-row span,
.outbox-row time,
.health-row span,
.health-row time,
.template-row span {
  color: var(--muted);
  font-size: 12px;
}

.outbox-row p,
.health-row p,
.template-row p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.audit-row code,
.outbox-row code,
.health-row code {
  display: block;
  width: 100%;
  overflow: hidden;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.health-row .compact-disclosure {
  margin-top: 2px;
}

.audit-row time,
.outbox-row time,
.health-row time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.outbox-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.outbox-attention-strip {
  margin-top: 0;
}

.outbox-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
}

.outbox-group-error {
  border-color: rgba(192, 51, 51, 0.2);
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
}

.outbox-group-warning {
  border-color: rgba(161, 92, 7, 0.2);
  background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
}

.outbox-group-neutral {
  border-color: rgba(29, 111, 214, 0.14);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.outbox-group-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.outbox-group-summary::-webkit-details-marker {
  display: none;
}

.outbox-group-main {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.outbox-group-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.outbox-group-lead {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  background: rgba(248, 250, 252, 0.94);
  color: #475467;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.outbox-group-lead-error {
  border-color: rgba(192, 51, 51, 0.18);
  background: #fff3f3;
  color: #b42318;
}

.outbox-group-lead-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: #fff8ef;
  color: #9a5a09;
}

.outbox-group-lead-neutral {
  border-color: rgba(29, 111, 214, 0.16);
  background: #f5f9ff;
  color: var(--accent);
}

.outbox-group-main strong {
  font-size: 14px;
}

.outbox-group-main span {
  color: var(--muted);
  font-size: 12px;
}

.outbox-group-main p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.outbox-group-body {
  display: grid;
  gap: 10px;
}

.outbox-row-nested {
  background: var(--surface);
}

.outbox-row-error {
  border-color: rgba(192, 51, 51, 0.18);
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
}

.outbox-row-neutral {
  border-color: rgba(29, 111, 214, 0.14);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.outbox-row-closed {
  border-color: rgba(17, 132, 91, 0.14);
  background: linear-gradient(180deg, #f7fcf9 0%, #ffffff 100%);
}

.outbox-attachments-block .message-attachments {
  margin-top: 2px;
}

.channel-settings-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.channel-detail-section {
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfdff;
}

.channel-detail-section-compact {
  gap: 10px;
}

.channel-detail-section-prominent {
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.channel-overview-stack {
  display: grid;
  gap: 10px;
}

.channel-overview-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 12px;
  align-items: start;
}

.channel-overview-main,
.channel-overview-side {
  display: grid;
  gap: 10px;
}

.channel-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  align-items: start;
}

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

.channel-overview-card {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 10px 11px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: 10px;
  background: #ffffff;
}

.channel-overview-card span {
  margin-top: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.channel-overview-card strong {
  font-size: 15px;
  line-height: 1.15;
}

.channel-overview-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

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

.channel-action-card {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 10px 11px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: 10px;
  background: #ffffff;
}

.channel-action-card span {
  margin-top: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.channel-action-card strong {
  font-size: 15px;
  line-height: 1.15;
}

.channel-action-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.channel-action-card-success {
  border-color: rgba(17, 132, 91, 0.2);
  background: #f2fbf7;
}

.channel-action-card-warning {
  border-color: rgba(161, 92, 7, 0.2);
  background: #fff8ef;
}

.channel-action-card-info {
  border-color: rgba(29, 111, 214, 0.18);
  background: #f5f9ff;
}

.channel-action-card-neutral {
  border-color: rgba(148, 163, 184, 0.22);
  background: #f8fafc;
}

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

.channel-mini-card {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 10px 11px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 10px;
  background: #ffffff;
}

.channel-mini-card span {
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.channel-mini-card strong {
  font-size: 15px;
  line-height: 1.15;
}

.channel-mini-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.channel-settings-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.channel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
  min-width: 220px;
}

.modal-actions .ghost-button,
.channel-header-actions .ghost-button,
.circle-chat-actions .ghost-button,
.outbox-actions .ghost-button,
.user-row-actions .ghost-button,
.owner-buttons .ghost-button,
.topbar-page-switcher .ghost-button,
.topbar-quick-actions .primary-button,
.topbar-menu-actions .ghost-button {
  min-width: 0;
}

.channel-settings-card strong,
.channel-settings-card span {
  display: block;
}

.channel-settings-card strong {
  font-size: 15px;
}

.channel-settings-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta-chips,
.fact-inline-list,
.code-collection {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-meta-chips {
  margin-top: 8px;
}

.fact-inline-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.code-collection code {
  overflow: hidden;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-code-collection {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.health-code-collection code,
.integration-diagnostics-notes code {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.channel-settings-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.channel-settings-form input,
.channel-settings-form select,
.channel-settings-form textarea {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  font-size: 13px;
}

.channel-settings-form input,
.channel-settings-form select {
  height: 38px;
}

.channel-settings-form textarea {
  padding-top: 10px;
  resize: vertical;
  line-height: 1.4;
}

.channel-settings-field {
  min-width: 0;
}

.channel-settings-field-wide,
.channel-settings-form .span-2,
.channel-settings-form .span-3 {
  grid-column: 1 / -1;
}

.channel-settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.circle-chat-import {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.integration-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.integration-panel span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.circle-chat-registry {
  display: grid;
  gap: 10px;
}

.integration-diagnostics-panel {
  display: grid;
  gap: 10px;
}

.integration-diagnostics-pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.integration-diagnostics-pulse {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 10px 11px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 10px;
  background: #ffffff;
}

.integration-diagnostics-pulse span {
  margin-top: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.integration-diagnostics-pulse strong {
  font-size: 15px;
  line-height: 1.1;
}

.integration-diagnostics-pulse small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.integration-diagnostics-pulse-success {
  border-color: rgba(17, 132, 91, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf7 100%);
}

.integration-diagnostics-pulse-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
}

.integration-diagnostics-pulse-neutral {
  border-color: rgba(29, 111, 214, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.channel-secondary-disclosure > summary {
  background: rgba(248, 250, 252, 0.72);
}

.channel-secondary-disclosure > .compact-disclosure-body {
  gap: 10px;
}

.channel-secondary-disclosure > summary {
  background: rgba(248, 250, 252, 0.72);
}

.channel-secondary-disclosure > .compact-disclosure-body {
  gap: 10px;
}

.integration-diagnostics-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.integration-signal-card {
  display: grid;
  gap: 4px;
  min-height: 84px;
  padding: 10px 11px;
  border: 1px solid rgba(220, 227, 236, 0.88);
  border-radius: 8px;
  background: #ffffff;
}

.integration-signal-card-success {
  border-color: rgba(17, 132, 91, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf7 100%);
}

.integration-signal-card-warning {
  border-color: rgba(161, 92, 7, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
}

.integration-signal-card-neutral {
  border-color: rgba(220, 227, 236, 0.88);
  background: #ffffff;
}

.integration-signal-card span {
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.integration-signal-card strong {
  font-size: 15px;
  line-height: 1.2;
}

.integration-signal-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.channel-preflight-panel {
  display: grid;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdff;
}

.preflight-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preflight-summary code {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.preflight-check-list {
  display: grid;
  gap: 8px;
}

.preflight-check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.preflight-check-row div {
  display: grid;
  gap: 4px;
}

.preflight-check-row strong {
  font-size: 13px;
}

.preflight-check-row span:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.integration-diagnostics-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.integration-diagnostics-notes code {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.integration-diagnostics-requests {
  display: grid;
  gap: 10px;
}

.compact-disclosure {
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: 9px;
  background: rgba(250, 252, 255, 0.78);
}

.compact-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
  cursor: pointer;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  list-style: none;
  min-width: 0;
}

.disclosure-summary-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.disclosure-summary-copy strong,
.disclosure-summary-copy small {
  display: block;
}

.disclosure-summary-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

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

.compact-disclosure summary::after {
  content: "+";
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.compact-disclosure[open] summary::after {
  content: "-";
}

.compact-disclosure-body {
  display: grid;
  gap: 8px;
}

.integration-request-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.integration-request-card strong {
  font-size: 13px;
}

.integration-request-card pre {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef3f8;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.circle-chat-list {
  display: grid;
  gap: 8px;
}

.circle-discovery-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 12px;
}

.circle-discovery-group-list {
  display: grid;
  gap: 8px;
}

.circle-discovery-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.circle-discovery-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.circle-space-code-collection {
  gap: 6px;
}

.circle-discovery-filters {
  margin-top: 10px;
}

.channel-secondary-disclosure > .compact-disclosure-body > .integration-diagnostics-panel,
.channel-secondary-disclosure > .compact-disclosure-body > .circle-chat-registry,
.channel-secondary-disclosure > .compact-disclosure-body > .channel-settings-form.circle-chat-import {
  padding-top: 0;
  border-top: 0;
}

.channel-secondary-disclosure[open] {
  border-color: rgba(210, 219, 229, 0.96);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

@media (max-width: 1180px) {
  .monitor-workspace {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .monitor-workspace-main,
  .monitor-workspace-side {
    gap: 8px;
  }

  .monitor-action-grid,
  .monitor-action-grid-compact,
  .modal-section-grid-dual,
  .setup-list,
  .audit-filters,
  .outbox-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-filters > :last-child,
  .outbox-filters > :last-child {
    grid-column: 1 / -1;
  }

  .channel-settings-summary-band {
    grid-template-columns: 1fr;
  }

  .channel-overview-workspace {
    grid-template-columns: 1fr;
  }

  .channel-settings-summary-pills,
  .channel-overview-grid,
  .channel-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-guidance-card {
    grid-template-columns: 1fr;
  }

  .channel-guidance-steps,
  .channel-hero-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .channel-settings-layout {
    grid-template-columns: 1fr;
  }

  .channel-settings-nav {
    position: static;
  }

  .channel-settings-summary-pills,
  .channel-hero-snapshot,
  .channel-overview-grid,
  .channel-action-grid {
    grid-template-columns: 1fr;
  }

  .channel-settings-form {
    grid-template-columns: 1fr;
  }

  .channel-settings-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .channel-guidance-card {
    grid-template-columns: 1fr;
  }

  .channel-header-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .channel-header-actions .ghost-button,
  .channel-header-actions .primary-button {
    flex: 1 1 180px;
  }

  .channel-settings-nav-item {
    padding: 12px;
  }
}

.circle-chat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.circle-chat-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.circle-chat-row code {
  display: block;
  margin-top: 8px;
}

.circle-chat-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.circle-chat-row-discovered .circle-chat-actions {
  align-self: center;
}

.channel-settings-form input[readonly] {
  background: #eef3f8;
  color: var(--muted);
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: 1 / -1;
}

.channel-settings-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  grid-column: 1 / -1;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 208px;
  align-items: flex-start;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.user-row.is-attention {
  border-color: rgba(29, 111, 214, 0.2);
  background: #f7fbff;
}

.user-row.has-awaiting {
  box-shadow: inset 3px 0 0 rgba(29, 111, 214, 0.65);
}

.user-row.has-overdue {
  border-color: rgba(192, 51, 51, 0.22);
  background: #fff7f7;
  box-shadow: inset 3px 0 0 rgba(192, 51, 51, 0.82);
}

.team-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.team-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.team-summary-card.is-alert {
  border-color: rgba(192, 51, 51, 0.22);
  background: #fff6f6;
}

.team-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.team-summary-card strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.team-summary-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.user-row-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

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

.user-row-kicker {
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.user-row-presence-meta,
.user-row-workload-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.user-workload-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.user-metric-pill {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.user-metric-pill small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.user-metric-pill strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.user-metric-pill-open {
  border-color: rgba(29, 111, 214, 0.18);
  background: #f5f9ff;
}

.user-metric-pill-open strong {
  color: var(--accent);
}

.user-metric-pill-error {
  border-color: rgba(192, 51, 51, 0.18);
  background: #fff5f5;
}

.user-metric-pill-error strong {
  color: var(--danger);
}

.user-metric-pill-pending {
  border-color: rgba(161, 92, 7, 0.18);
  background: #fff8ef;
}

.user-metric-pill-pending strong {
  color: var(--warning);
}

.user-row-actions {
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 8px;
  min-width: 0;
}

.user-row-actions > .ghost-button,
.user-row-actions > .user-current-label,
.user-row-tools {
  width: 100%;
}

.user-row-tools {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.user-row-tools summary {
  cursor: pointer;
  padding: 9px 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.user-row-tools summary::-webkit-details-marker {
  display: none;
}

.user-row-tools summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.user-row-tools[open] summary::after {
  content: "-";
}

.user-row-tools-body {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.user-password-reset {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
}

.user-password-reset input {
  width: 150px;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
}

.user-current-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.user-row strong {
  font-size: 14px;
}

.user-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.team-form-card .section-header-inline span {
  max-width: 34ch;
}

.user-row-heading .chip {
  display: inline-flex;
  margin-top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 1360px) {
  :root {
    --sidebar: 172px;
    --queue: 296px;
  }

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

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

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

  .topbar {
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 8px 12px 9px;
  }

  .topbar p {
    display: none;
  }

  .sidebar {
    gap: 6px;
    padding: 9px 7px;
  }

  .brand span,
  .sidebar-section-header span {
    display: none;
  }

  .brand {
    min-height: 36px;
    gap: 8px;
  }

  .brand-button {
    padding: 6px 7px;
    border-radius: 9px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand strong {
    font-size: 13px;
  }

  .sidebar-section {
    gap: 4px;
  }

  .channel-button {
    grid-template-columns: 26px minmax(0, 1fr);
    min-height: 34px;
    padding: 4px 5px;
  }

  .channel-icon {
    width: 22px;
    height: 22px;
  }

  .channel-icon svg {
    width: 11px;
    height: 11px;
  }

  .channel-title {
    font-size: 10px;
  }

  .channel-meta {
    margin-top: 0;
    font-size: 9px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 5px;
  }

  .topbar-page-switcher {
    width: auto;
    max-width: 100%;
    overflow: auto;
  }

  .panel-header-queue {
    gap: 4px;
    padding: 0 1px 4px;
  }

  .panel-header-queue-copy {
    gap: 5px;
  }

  .panel-header h2 {
    font-size: 12px;
  }

  .panel-header-queue-copy small,
  .panel-header-queue-copy #queueCount {
    font-size: 9px;
    line-height: 1.1;
  }

  .topbar-copy {
    flex: 1 1 180px;
  }

  .topbar h1 {
    font-size: 18px;
    line-height: 1;
  }

  .topbar-status-cluster {
    display: none;
  }

  .topbar-status-cluster .user-pill,
  .topbar-status-cluster .refresh-pill {
    min-height: 26px;
    padding: 0 8px;
    font-size: 10px;
  }

  .topbar-menu .toolbar-icon-button {
    min-height: 34px;
    width: 34px;
    padding: 0;
  }

  .conversation-list {
    gap: 8px;
  }

  .conversation-item {
    padding: 8px 9px;
    border-radius: 11px;
  }

  .conversation-item::before {
    top: 8px;
    bottom: 8px;
  }

  .conversation-item-main,
  .conversation-item-main-button {
    gap: 4px;
  }

  .item-top,
  .item-top-main,
  .item-title-block {
    gap: 6px;
  }

  .item-heading {
    gap: 2px;
  }

  .item-name {
    font-size: 12px;
  }

  .item-meta-row-primary,
  .item-support-row-secondary,
  .item-footer-main {
    gap: 3px;
  }

  .item-meta-row-primary {
    margin-bottom: 1px;
  }

  .chip,
  .subtle-chip,
  .item-support-pill,
  .item-footer-meta,
  .item-delivery-note {
    min-height: 16px;
    padding: 0 5px;
    font-size: 8px;
  }

  .item-event-pill {
    min-height: 15px;
    padding: 0 4px;
    font-size: 7px;
  }

  .item-preview,
  .conversation-item.is-active .item-preview,
  .conversation-item:hover .item-preview {
    -webkit-line-clamp: 1;
    min-height: calc(9px * 1.35);
  }

  .item-footer-row {
    gap: 4px;
    padding-top: 2px;
  }

  .item-footer-main .item-queue-action {
    justify-content: center;
  }

  .item-queue-action {
    min-height: 16px;
    padding: 0 5px;
  }

  .item-queue-action strong,
  .item-queue-action span {
    font-size: 7px;
  }

  .conversation-item.is-active .item-quick-actions,
  .conversation-item:hover .item-quick-actions {
    max-height: 22px;
  }

  .item-quick-action-button {
    min-height: 20px;
    padding: 0 6px;
    font-size: 8px;
  }

  .conversation-header {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 1px;
    padding: 5px 10px 0;
  }

  .conversation-header-main,
  .detail-toolbar,
  .thread-quick-actions-panel,
  .selection-context-banner {
    grid-column: 1 / -1;
  }

  .detail-toolbar,
  .thread-quick-actions-panel {
    grid-row: auto;
  }

  .conversation-header-main {
    flex: 0 0 auto;
    gap: 0;
  }

  .conversation-kicker {
    font-size: 8px;
  }

  .conversation-header h2 {
    font-size: 12px;
    line-height: 1.05;
  }

  .conversation-header p {
    display: none;
  }

  .conversation-header-facts .chip {
    min-height: 18px;
    padding: 0 6px;
    font-size: 8px;
  }

  .detail-toolbar {
    justify-content: flex-start;
    gap: 5px;
    width: 100%;
    padding: 0 0 4px;
  }

  .detail-toolbar-summary-group {
    min-height: 20px;
    padding: 0 4px 0 6px;
  }

  .detail-toolbar-summary,
  .detail-toolbar-inline-text {
    font-size: 7px;
  }

  .detail-toolbar-management-panel summary {
    min-height: 22px;
    padding: 0 5px 0 7px;
  }

  .detail-toolbar-management-meta {
    max-width: min(100%, 260px);
  }

  .detail-toolbar-management-panel .disclosure-summary-copy strong {
    font-size: 8px;
  }

  .selection-context-banner {
    padding: 8px 10px;
  }

  .thread {
    grid-template-rows: auto auto minmax(160px, 1fr) minmax(0, min(186px, 27vh));
  }

  .thread-panel-header {
    padding: 6px 10px;
  }

  .thread-panel-utility-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 3px 10px 4px;
    scrollbar-width: none;
  }

  .thread-panel-utility-strip::-webkit-scrollbar {
    display: none;
  }

  .thread-quick-actions-inline {
    gap: 3px;
  }

  .thread-delivery-inline {
    flex: 0 0 auto;
    gap: 5px;
    padding: 3px 5px;
  }

  .thread-delivery-inline-copy strong {
    font-size: 8px;
  }

  .thread-delivery-inline-copy span {
    font-size: 7px;
  }

  .thread-quick-actions-inline-header {
    display: none;
  }

  .thread-header-meta,
  .thread-delivery-inline,
  .thread-delivery-inline-actions,
  .thread-quick-actions-inline,
  .thread-quick-actions-list,
  .thread-jumpbar,
  .thread-jumpbar-inline,
  .thread-jumpbar-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .thread-jumpbar-button,
  .thread-quick-action-button,
  .thread-message-view-button,
  .thread-message-view-hint,
  .subtle-chip {
    flex: 0 0 auto;
  }

  .messages {
    gap: 7px;
    padding: 10px 10px calc(var(--thread-composer-offset, 18px) + 6px);
  }

  .message {
    max-width: min(100%, 74%);
  }

  .message-frame {
    gap: 5px;
  }

  .message-meta-row {
    gap: 5px;
  }

  .message-bubble {
    padding: 11px 12px;
    line-height: 1.5;
  }

  .message-meta {
    gap: 1px;
    font-size: 8px;
  }

  .message-meta-primary,
  .message-meta-secondary {
    gap: 3px;
  }

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

  .message-meta-delivery {
    min-height: 15px;
    padding: 0 5px;
    font-size: 7px;
  }

  .message-meta-time {
    font-size: 8px;
  }

  .message-actions {
    gap: 2px;
  }

  .message-action-button,
  .message-action-menu-button {
    min-height: 22px;
    min-width: 22px;
    padding-inline: 6px;
    font-size: 8px;
  }

  .composer {
    gap: 2px;
    max-height: min(146px, 21vh);
    padding: 4px 6px 6px;
  }

  .composer-topbar {
    gap: 3px;
  }

  .composer-tools select,
  .composer-toggle-button {
    min-height: 24px;
    height: 24px;
    font-size: 10px;
  }

  .composer textarea {
    min-height: 42px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .composer-footer {
    gap: 2px;
  }

.composer-submit-actions .ghost-button,
.composer-submit-actions .primary-button {
  min-height: 34px;
  padding-inline: 10px;
  font-size: 11px;
}
}

@media (max-width: 1120px) {
  .auth-shell {
    width: min(100% - 28px, 900px);
  }

  .auth-panel {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  }

  .auth-panel h1 {
    font-size: 30px;
  }

  :root {
    --sidebar: 164px;
    --queue: 272px;
  }

  .topbar {
    padding: 14px 16px 14px;
  }

  .workspace {
    gap: 8px;
    padding: 8px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar p {
    display: none;
  }

  .sidebar {
    gap: 6px;
    padding: 9px 7px;
  }

  .conversation-list {
    gap: 10px;
  }

  .conversation-item {
    padding: 9px;
    border-radius: 11px;
  }

  .conversation-item-main,
  .conversation-item-main-button {
    gap: 5px;
  }

  .item-top {
    gap: 7px;
  }

  .item-top-main {
    gap: 7px;
  }

  .item-meta-row-primary {
    gap: 4px;
  }

  .item-support-row-secondary {
    gap: 5px;
  }

  .item-footer-row {
    align-items: stretch;
    gap: 6px;
  }

  .item-footer-main {
    width: 100%;
  }

  .item-queue-action.is-compact {
    max-width: 100%;
  }

  .item-queue-action.is-compact strong {
    max-width: 100%;
  }

  .brand {
    min-height: 38px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand span,
  .sidebar-section-header span {
    display: none;
  }

  .sidebar-section {
    gap: 5px;
  }

  .channel-button {
    grid-template-columns: 26px minmax(0, 1fr);
    min-height: 36px;
    padding: 4px 5px;
  }

  .channel-icon {
    width: 23px;
    height: 23px;
  }

  .channel-icon svg {
    width: 11px;
    height: 11px;
  }

  .channel-title {
    font-size: 10px;
  }

  .channel-meta {
    margin-top: 0;
    font-size: 8px;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .topbar-page-switcher {
    width: auto;
    min-width: 0;
    overflow: auto;
  }

  .topbar-menu {
    justify-self: end;
  }

  .topbar-quick-actions {
    width: 100%;
  }

  .conversation-header {
    align-items: stretch;
    flex-direction: column;
    padding: 10px 12px 8px;
  }

  .queue-search-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .queue-search-row .search-box,
  .queue-search-row select,
  .queue-search-row .ghost-button {
    width: 100%;
  }

  .detail-toolbar {
    align-items: stretch;
    gap: 14px;
  }

  .detail-toolbar-group {
    padding: 0;
  }

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

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

  .messages {
    padding: 12px 12px calc(var(--thread-composer-offset, 18px) + 8px);
  }

  .message {
    max-width: min(100%, 82%);
  }

  .thread-secondary-grid {
    grid-template-columns: 1fr;
  }

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

  .profile-panel {
    display: none;
  }

  .admin-pages-shell {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px;
  }

  .admin-page-sidebar {
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    background: #fcfdff;
  }

  .admin-page-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .admin-page-tabs::-webkit-scrollbar,
  .channel-settings-nav-list::-webkit-scrollbar {
    display: none;
  }

  .admin-page-tab {
    flex: 0 0 180px;
    min-height: 0;
    padding: 10px 12px;
  }

  .admin-page-content {
    overflow: visible;
    padding-right: 0;
  }

  .admin-page-content > * {
    width: 100%;
  }

  .modal-backdrop.page-view {
    height: auto;
    overflow: visible;
  }

  .channel-settings-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .channel-hero-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .integration-diagnostics-pulse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-action-grid {
    grid-template-columns: 1fr;
  }

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

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

  .channel-settings-nav {
    position: static;
    top: auto;
  }

  .channel-settings-nav-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .channel-settings-nav-item {
    flex: 0 0 188px;
    min-height: 0;
    padding: 12px;
    box-shadow: none;
  }

  .audit-filters,
  .outbox-filters,
  .template-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-filters > :last-child,
  .outbox-filters > :last-child,
  .template-form > :last-child {
    grid-column: 1 / -1;
  }

  .health-code-collection,
  .integration-diagnostics-notes {
    grid-template-columns: 1fr;
  }

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

  .user-form > :last-child,
  .password-form > :last-child {
    grid-column: 1 / -1;
  }

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

@media (min-width: 1281px) {
  :root {
    --queue: 344px;
  }

  .topbar {
    padding: 18px 24px 18px;
  }

  .workspace {
    gap: 12px;
    padding: 12px;
  }

  .conversation-header {
    padding: 14px 16px 10px;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    width: min(100% - 24px, 720px);
  }

  .auth-panel {
    grid-template-columns: 1fr;
  }

  .auth-panel-form {
    border-left: 0;
    border-top: 1px solid rgba(220, 227, 236, 0.9);
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
  }

  .main {
    grid-row: 2;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .sidebar {
    display: flex;
    align-items: center;
    grid-row: 1;
    align-self: start;
    position: static;
    min-height: auto;
    gap: 6px;
    height: auto;
    padding: 7px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .brand-button {
    width: auto;
  }

  .sidebar-section {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0;
  }

  .channel-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, max-content);
    align-items: stretch;
    gap: 4px;
    overflow: auto;
    min-height: 0;
    padding-bottom: 0;
  }

  .channel-button {
    min-width: 112px;
    min-height: 36px;
    padding: 4px 5px;
  }

  .channel-title {
    font-size: 10px;
  }

  .channel-status-inline,
  .channel-waiting-note,
  .channel-total-count {
    font-size: 8px;
  }

  .channel-total-count {
    min-height: 16px;
    padding: 0 5px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-height: 0;
    padding: 7px 10px;
  }

  .topbar-copy {
    display: none;
  }

  .conversation-header {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 8px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: visible;
  }

  .topbar-page-switcher {
    width: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(96px, max-content);
    align-items: stretch;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .topbar-page-switcher::-webkit-scrollbar {
    display: none;
  }

  .topbar-page-switcher,
  .topbar-quick-actions {
    min-width: 0;
  }

  .topbar-page-switcher { grid-column: 1; }

  .topbar-menu {
    grid-column: 2;
    justify-self: end;
  }

  .topbar-page-switcher .toolbar-button {
    width: auto;
    min-width: 96px;
    scroll-snap-align: start;
  }

  .topbar-quick-actions .toolbar-button {
    width: auto;
    min-width: 0;
    padding: 0 10px;
  }

  .topbar-quick-actions .toolbar-button span:last-child {
    display: none;
  }

  .topbar-quick-actions .toolbar-button::after {
    content: "Nuovo";
  }

  .topbar-menu-panel {
    right: 0;
  }

  .toolbar-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  .topbar-page-switcher .button-icon {
    display: none;
  }

  .topbar-status-cluster {
    max-width: min(48vw, 320px);
  }

  .topbar-status-cluster .user-pill {
    max-width: 180px;
  }

  .queue-section-header.compact span,
  .queue-views-header-copy span,
  .queue-search-panel .queue-section-header span {
    display: none;
  }

  .workspace {
    height: var(--workspace-compact-height, calc(100vh - 132px));
    min-height: 0;
    padding: 0;
    gap: 0;
  }

  .queue-panel,
  .thread {
    border-right: 0;
  }

  .queue-panel {
    height: var(--workspace-compact-height, calc(100vh - 132px));
    border-bottom: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .conversation-panel,
  .conversation-detail,
  .thread {
    height: var(--workspace-compact-height, calc(100vh - 132px));
    min-height: 0;
    overflow: hidden;
  }

  .conversation-panel {
    margin-top: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
  }

  .thread {
    display: flex;
    flex-direction: column;
  }

  .conversation-kicker {
    font-size: 11px;
  }

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

  .conversation-header p {
    font-size: 11px;
  }

  .detail-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    overflow: visible;
  }

  .selection-context-copy strong,
  .selection-context-copy p {
    font-size: 11px;
  }

  .detail-toolbar {
    padding: 10px;
  }

  .detail-toolbar-status-strip,
  .detail-toolbar-management-panel,
  .detail-toolbar-controls {
    width: 100%;
    gap: 8px;
  }

  .detail-toolbar-status-strip {
    display: none;
  }

  .detail-toolbar-management-meta {
    display: inline-flex;
  }

  .detail-toolbar-controls {
    align-items: stretch;
  }

  .detail-toolbar-actions,
  .detail-toolbar-fields {
    gap: 6px;
    width: 100%;
  }

  .detail-toolbar-actions-owner,
  .detail-toolbar-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .detail-toolbar-reminder-menu {
    width: 100%;
  }

  .detail-toolbar-reminder-menu summary {
    width: 100%;
    justify-content: center;
  }

  .detail-toolbar-actions-reminder {
    right: 0;
    left: 0;
    min-width: 0;
    justify-content: stretch;
  }

  .detail-toolbar-actions-reminder .ghost-button {
    flex: 1 1 calc(50% - 6px);
  }

  .detail-toolbar-actions .ghost-button,
  .detail-toolbar-fields .detail-select-field,
  .detail-toolbar-fields select {
    width: 100%;
  }

  .detail-toolbar-actions .ghost-button {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }

  .detail-select-field {
    gap: 4px;
    flex: 1 1 120px;
  }

  .detail-select-field span,
  .detail-toolbar-label {
    font-size: 10px;
  }

  .detail-toolbar-label,
  .conversation-header p {
    display: none;
  }

  .thread-panel-header {
    display: grid;
    gap: 6px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 9px 12px;
  }

  .thread-panel-actions {
    grid-column: 1 / -1;
  }

  .thread-panel-utility-strip {
    align-items: stretch;
    flex-wrap: wrap;
    overflow: visible;
    padding: 4px 10px 6px;
  }

  .thread-header-meta,
  .thread-delivery-inline,
  .thread-quick-actions-inline,
  .thread-jumpbar {
    width: 100%;
    min-width: 0;
  }

  .thread-delivery-inline {
    justify-content: space-between;
    padding: 6px 8px;
  }

  .thread-delivery-inline-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .thread-quick-actions-inline {
    justify-content: flex-start;
  }

  .workspace.workspace-compact.workspace-compact-detail .compact-back-button {
    display: inline-flex;
    align-self: start;
    width: fit-content;
    min-width: 0;
    padding-inline: 10px;
  }

  .messages {
    min-height: 160px;
    padding: 14px 12px 12px;
  }

  .thread-jumpbar {
    padding: 8px 12px 0;
  }

  .thread-jumpbar-inner {
    gap: 8px;
    padding: 8px 9px;
  }

  .thread-jumpbar-actions {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .thread-jumpbar-button {
    flex: 0 0 auto;
  }

  .composer {
    max-height: min(244px, 34vh);
  }

  .message {
    max-width: min(100%, 96%);
  }

  .message-bubble {
    padding: 12px 13px;
    font-size: 13px;
    line-height: 1.48;
  }

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

  .message-delivery-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .composer {
    gap: 5px;
    padding: 8px 12px 10px;
    background: rgba(255, 255, 255, 0.99);
  }

  .composer-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding-bottom: 2px;
  }

  .composer-tools {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    flex: 1 1 auto;
  }

  .composer-tools label,
  .composer-attachments-section label {
    font-size: 10px;
  }

  .composer-toggle-button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
  }

  .composer-status-bar span:not([hidden]),
  .composer-attachments-meta span,
  #discardReplyDraftButton {
    min-height: 24px;
    padding: 0 7px;
    font-size: 10px;
  }

  .composer textarea {
    min-height: 84px;
    padding: 11px 12px;
    font-size: 13px;
  }

  #replyAttachmentsInput {
    min-height: 44px;
  }

  .composer-attachments-meta {
    display: none;
  }

  .composer-section {
    padding: 8px;
    background: #ffffff;
  }

  .composer-main-section {
    border-color: rgba(29, 111, 214, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }

  #connectorHint {
    border-style: dashed;
    white-space: normal;
    line-height: 1.35;
  }

  .composer-delivery-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .composer-delivery-actions {
    justify-content: flex-start;
  }

  #discardReplyDraftButton {
    min-height: 34px;
  }

  .composer-footer {
    grid-template-columns: 1fr;
    padding-top: 2px;
  }

  .composer-footer-copy {
    display: none;
  }

  .composer-status-bar {
    width: 100%;
    order: 2;
  }

  .composer-submit-actions {
    width: 100%;
    order: 1;
    justify-content: flex-end;
    gap: 6px;
  }

  .composer-submit-actions .primary-button {
    min-height: 40px;
  }

  .workspace.workspace-compact {
    height: var(--workspace-compact-height, calc(100vh - 132px));
  }

  .workspace.workspace-compact .queue-panel,
  .workspace.workspace-compact .conversation-panel,
  .workspace.workspace-compact .conversation-detail,
  .workspace.workspace-compact .thread {
    height: calc(var(--workspace-compact-height, calc(100vh - 132px)) - 42px);
  }

  .admin-pages-shell {
    min-height: 0;
    gap: 12px;
    padding: 10px 12px 12px;
  }

  .admin-page-sidebar {
    gap: 6px;
    padding: 10px;
  }

  .admin-page-tab {
    flex: 0 0 132px;
    min-height: 0;
    padding: 10px 12px;
  }

  .admin-page-tab span {
    display: none;
  }

  .channel-settings-nav-list {
    gap: 8px;
  }

  .channel-settings-nav-item {
    flex: 0 0 164px;
    gap: 6px;
    padding: 10px 12px;
  }

  .channel-settings-nav-copy {
    display: none;
  }

  .channel-settings-nav-meta {
    font-size: 11px;
  }

  .modal-header {
    gap: 12px;
  }

  .modal-header h2 {
    font-size: 19px;
  }

  .modal-header p {
    font-size: 13px;
  }

  .modal-filter-bar {
    top: 0;
    padding: 12px;
  }

  .channel-settings-nav-item,
  .setup-summary-card,
  .setup-card,
  .modal-section-card,
  .audit-row,
  .outbox-row,
  .health-row,
  .template-row {
    box-shadow: none;
  }
}

@media (max-width: 820px) {
  .queue-search-header,
  .conversation-list-header {
    align-items: stretch;
  }

  .conversation-list-count {
    align-self: flex-start;
  }

  .conversation-list-panel,
  .queue-search-panel {
    padding: 10px;
  }

  .queue-tools-panel {
    position: static;
    top: auto;
    gap: 8px;
    background: transparent;
  }

  .queue-primary-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .conversation-list {
    gap: 6px;
    padding-right: 0;
  }

  .thread-panel-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .thread-panel-heading span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .thread-panel-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .thread-ops-panel {
    width: 100%;
    min-width: 0;
  }

  .thread-refresh-button {
    min-width: 0;
  }

  .main {
    overflow: auto;
  }

  .workspace {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .workspace-mobile-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: sticky;
    top: 0;
    z-index: 4;
    gap: 6px;
    padding: 6px 10px 6px;
    background: rgba(255, 255, 255, 0.96);
  }

  .workspace:not(.workspace-compact) .conversation-panel {
    display: none;
  }

  .workspace:not(.workspace-compact) .queue-panel {
    display: flex;
    height: auto;
    min-height: 0;
    overflow: visible;
    border-right: 0;
  }

  .sidebar {
    gap: 8px;
    padding: 8px 10px;
  }

  .channel-nav {
    gap: 4px;
    padding-bottom: 0;
  }

  .brand {
    min-height: 36px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand span,
  .sidebar-section-header span {
    display: none;
  }

  .channel-button {
    grid-template-columns: 28px minmax(0, 1fr);
    min-width: 116px;
    min-height: 36px;
    padding: 4px 5px;
  }

  .channel-icon {
    width: 24px;
    height: 24px;
  }

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

  .channel-title {
    font-size: 10px;
  }

  .channel-status-inline,
  .channel-waiting-note,
  .channel-total-count {
    font-size: 8px;
  }

  .channel-total-count {
    min-height: 16px;
    padding: 0 5px;
  }

  .topbar {
    gap: 8px;
    padding: 9px 12px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-page-switcher {
    gap: 5px;
    padding: 2px;
  }

  .topbar-page-switcher .toolbar-button span:last-child {
    font-size: 10px;
  }

  .toolbar-button {
    min-height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }

  .topbar-quick-actions .toolbar-button {
    min-width: 0;
  }

  .workspace-mobile-nav .ghost-button {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 32px;
    font-size: 11px;
  }

  .workspace.workspace-compact.workspace-compact-detail .workspace-mobile-nav .ghost-button {
    min-height: 34px;
  }

  .workspace.workspace-compact .queue-panel,
  .workspace.workspace-compact .conversation-panel,
  .workspace.workspace-compact .conversation-detail,
  .workspace.workspace-compact .thread {
    height: calc(var(--workspace-compact-height, calc(100dvh - 124px)) - 42px);
  }

  .queue-panel {
    padding: 8px;
  }

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

  .queue-summary-button {
    min-height: 0;
    padding: 10px;
  }

  .queue-summary-button span {
    font-size: 11px;
  }

  .queue-summary-button strong {
    min-width: 24px;
    min-height: 24px;
    padding: 0 6px;
    font-size: 11px;
  }

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

  .queue-workload-button {
    gap: 2px;
    padding: 9px 10px;
  }

  .queue-workload-label {
    font-size: 11px;
  }

  .queue-workload-button strong {
    font-size: 16px;
  }

  .queue-workload-button small {
    font-size: 10px;
  }

  .conversation-header,
  .messages,
  .thread-panel-header,
  .composer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .conversation-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .detail-toolbar {
    gap: 8px;
  }

  .detail-toolbar-status-strip {
    display: none;
  }

  .detail-toolbar-management-meta {
    display: inline-flex;
  }

  .detail-toolbar-actions,
  .detail-toolbar-fields {
    gap: 6px;
  }

  .detail-toolbar-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .messages {
    min-height: 140px;
    gap: 11px;
    padding-bottom: calc(var(--thread-composer-offset, 88px) + 6px);
  }

  .message-bubble {
    font-size: 13px;
    line-height: 1.46;
  }

  .composer {
    gap: 6px;
    max-height: min(264px, 38vh);
  }

  .composer-signal-strip {
    grid-template-columns: 1fr;
  }

  .composer-secondary-panel {
    width: 100%;
  }

  .composer-submit-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .composer-submit-actions .ghost-button,
  .composer-submit-actions .primary-button {
    flex: 1 1 100%;
  }

  .user-form,
  .password-form,
  .modal-section-grid-dual,
  .admin-pages-shell,
  .channel-settings-layout,
  .channel-settings-form,
  .queue-view-form,
  .setup-list {
    grid-template-columns: 1fr;
  }

  .admin-page-tabs,
  .channel-settings-nav-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .admin-page-tabs::-webkit-scrollbar,
  .channel-settings-nav-list::-webkit-scrollbar {
    display: none;
  }

  .health-code-collection,
  .integration-diagnostics-notes {
    align-items: stretch;
  }

  .health-code-collection code,
  .integration-diagnostics-notes code {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .admin-page-tab,
  .channel-settings-nav-item {
    flex: 0 0 auto;
    min-height: 0;
    width: auto;
  }

  .channel-overview-grid {
    grid-template-columns: 1fr;
  }

  .channel-mini-grid {
    grid-template-columns: 1fr;
  }

  .admin-page-tabs {
    gap: 8px;
  }

  .channel-settings-nav-list {
    gap: 8px;
  }

  .admin-page-tab {
    flex-basis: 124px;
  }

  .channel-settings-nav-item {
    flex-basis: 144px;
  }

  .audit-filters,
  .outbox-filters,
  .template-form {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3 {
    grid-column: auto;
  }

  .modal-header,
  .panel-header,
  .user-row,
  .user-row-actions,
  .user-password-reset,
  .section-header-inline,
  .template-form,
  .channel-settings-card header,
  .channel-header-actions,
  .channel-settings-actions,
  .integration-panel,
  .circle-discovery-group-header,
  .circle-chat-row,
  .circle-chat-actions,
  .queue-view-card,
  .setup-card-header,
  .setup-summary-stats,
  .setup-card-meta,
  .audit-filters,
  .outbox-filters,
  .audit-row,
  .outbox-row,
  .outbox-group-summary,
  .outbox-actions,
  .health-row,
  .template-row,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .monitor-pulse-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .integration-diagnostics-pulse-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 6px;
    padding: 6px 8px;
  }

  .brand {
    gap: 8px;
    min-height: 32px;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .search-clear-button {
    right: 10px;
  }

  .search-shortcut-hint {
    display: none;
  }

  .queue-search-panel .search-box input {
    padding-right: 40px;
  }

  .queue-toolbar-meta {
    min-height: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .app-shell {
    min-width: 0;
    overflow: hidden;
  }

  .auth-shell {
    width: min(100% - 20px, 480px);
  }

  .auth-panel-intro,
  .auth-panel-form {
    padding: 22px 18px;
    gap: 18px;
  }

  .auth-highlights {
    gap: 10px;
  }

  .auth-panel h1 {
    font-size: 28px;
  }

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

  .health-code-collection,
  .integration-diagnostics-notes {
    grid-template-columns: 1fr;
  }

  .queue-filters-grid {
    grid-template-columns: 1fr;
  }

  .queue-search-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .queue-search-row .search-box,
  .queue-search-row .ghost-button {
    width: 100%;
  }

  .queue-search-actions,
  .queue-toolbar-recovery-actions,
  .queue-toolbar-utility-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .message-thread-disclosure summary > span {
    width: 100%;
    min-height: 24px;
    padding: 0 8px;
  }

  .queue-advanced-tools summary {
    align-items: flex-start;
    gap: 8px;
  }

  .queue-advanced-tools summary span {
    display: grid;
    gap: 2px;
  }

  .queue-advanced-tools summary small {
    display: block;
    max-width: 100%;
    white-space: normal;
  }

  .circle-pending-run-disclosure,
  .circle-outbound-run-disclosure {
    width: 100%;
    margin-left: 0;
  }

  .outbox-group {
    padding: 10px;
  }

  .outbox-group-body {
    gap: 8px;
  }

  .outbox-group-badges {
    gap: 6px;
  }

  .message-thread-summary-main {
    flex-direction: column;
  }

  .message-thread-replies {
    margin-left: 6px;
    padding-left: 7px;
  }

  .message-action-button {
    min-height: 26px;
    font-size: 10px;
  }

  .message-delivery-state strong {
    font-size: 10px;
  }

  .message-delivery-state-code {
    min-height: 18px;
    font-size: 8px;
  }

  .message-content {
    font-size: 12px;
    line-height: 1.5;
  }

  .message-reply-reference span,
  .message-attachment span {
    font-size: 11px;
  }

  .queue-toolbar-status-line {
    flex-basis: 100%;
  }

  .panel-header-actions {
    width: 100%;
  }

  .queue-summary,
  .queue-workload {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-menu-panel {
    width: min(280px, calc(100vw - 20px));
  }

  .queue-summary-button,
  .queue-workload-button {
    border-radius: 10px;
  }

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

  .team-summary-card:last-child {
    grid-column: 1 / -1;
  }

  .user-workload-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .empty-dashboard {
    width: 100%;
  }

  .empty-dashboard-focus-cards {
    grid-template-columns: 1fr;
  }

  .queue-primary-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 92px;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 2px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .channel-nav::-webkit-scrollbar {
    display: none;
  }

  .channel-button {
    grid-template-columns: 24px minmax(0, 1fr);
    min-width: 92px;
    min-height: 44px;
    padding: 6px 7px;
    align-content: center;
    gap: 6px;
    scroll-snap-align: start;
  }

  .channel-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
  }

  .channel-icon svg {
    width: 13px;
    height: 13px;
  }

  .channel-copy {
    gap: 3px;
  }

  .channel-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 5px;
  }

  .channel-title {
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .channel-count-cluster {
    gap: 3px;
    justify-self: end;
  }

  .channel-alert-count,
  .channel-total-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 9px;
  }

  .channel-secondary-chip {
    display: none;
  }

  .channel-total-count {
    display: none;
  }

  .channel-button-overview .channel-total-count {
    display: inline-flex;
  }

  .channel-meta {
    display: none;
  }

  .channel-status-inline,
  .channel-waiting-note {
    display: none;
  }

  .topbar-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
    padding-top: 0;
  }

  .topbar h1 {
    font-size: 18px;
    line-height: 1.05;
  }

  .topbar p,
  .topbar-page-switcher {
    display: none;
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    flex: 0 0 auto;
  }

  .topbar-status-cluster {
    max-width: min(56vw, 240px);
  }

  .topbar-status-cluster .user-pill {
    display: none;
  }

  .topbar-menu {
    margin-left: 0;
    align-self: center;
  }

  .topbar-menu-pages {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding-top: 0;
    border-top: 0;
  }

  .topbar-menu-pages .toolbar-button {
    justify-content: center;
    min-height: 34px;
  }

  .topbar-quick-actions .toolbar-button {
    flex: 0 0 auto;
    padding: 0 10px;
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 0;
    padding: 8px 10px 6px;
    border-bottom: 0;
    background: rgba(247, 249, 252, 0.96);
  }

  .topbar-menu .toolbar-icon-button {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  }

  .topbar-menu .toolbar-icon-button span:last-child {
    display: none;
  }

  .topbar-menu-panel {
    top: calc(100% + 8px);
    right: 0;
    width: min(320px, calc(100vw - 20px));
    padding: 12px;
    gap: 10px;
    border-radius: 14px;
  }

  .main {
    overflow: auto;
  }

  .workspace {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
    background: #f7f9fc;
  }

  .workspace-mobile-nav {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 4;
  }

  .workspace:not(.workspace-compact) .conversation-panel {
    display: none;
  }

  .workspace:not(.workspace-compact) .queue-panel {
    display: flex;
    height: auto;
    min-height: 0;
    overflow: visible;
    border-right: 0;
  }

  .workspace.workspace-compact .queue-panel,
  .workspace.workspace-compact .conversation-panel,
  .workspace.workspace-compact .conversation-detail,
  .workspace.workspace-compact .thread {
    height: calc(var(--workspace-compact-height, calc(100dvh - 124px)) - 46px);
  }

  .channel-secondary-chip {
    font-size: 8px;
  }

  .conversation-item {
    padding: 7px 8px;
  }

  .item-preview {
    -webkit-line-clamp: 1;
  }

  .item-footer-meta {
    font-size: 10px;
  }

  .workspace-mobile-nav {
    gap: 6px;
    padding: 4px 8px 4px;
    background: rgba(247, 249, 252, 0.96);
    border-bottom: 0;
  }

  .workspace-mobile-nav .ghost-button {
    min-height: 28px;
    border-radius: 9px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.94);
  }

  .workspace-mobile-nav .ghost-button.is-active {
    border-color: rgba(29, 111, 214, 0.28);
    background: linear-gradient(180deg, #f5f9ff 0%, #edf4ff 100%);
    color: var(--accent);
  }

  .message {
    max-width: 100%;
  }

  .conversation-header-facts {
    gap: 4px;
  }

  .conversation-header-facts .chip {
    min-height: 22px;
    padding: 0 8px;
    font-size: 10px;
  }

  .conversation-header {
    gap: 4px;
    padding: 8px 10px 2px;
  }

  .conversation-header-main {
    gap: 2px;
  }

  .conversation-header h2 {
    font-size: 15px;
    line-height: 1.06;
  }

  .detail-toolbar {
    gap: 6px;
    padding: 2px 8px 6px;
  }

  .detail-toolbar-status-strip {
    display: none;
  }

  .detail-toolbar-summary-group {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .detail-toolbar-management-meta {
    display: inline-flex;
    max-width: min(60vw, 220px);
  }

  .detail-toolbar-summary {
    min-height: 0;
    font-size: 11px;
    line-height: 1.25;
  }

  .detail-toolbar-summary .chip {
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 9px;
    line-height: 1.2;
  }

  .detail-toolbar-management-panel > summary {
    min-height: 40px;
    padding: 0 10px;
  }

  .detail-toolbar-label,
  .conversation-header p {
    display: none;
  }

  .detail-toolbar-fields {
    grid-template-columns: 1fr;
  }

  .messages {
    min-height: 120px;
    padding: 10px 10px calc(var(--thread-composer-offset, 88px) + 6px);
  }

  .thread-jumpbar {
    padding: 8px 10px 0;
  }

  .thread-jumpbar-inner {
    align-items: flex-start;
  }

  .thread-jumpbar-label {
    width: 100%;
  }

  .thread-panel-header {
    gap: 6px;
    padding: 6px 8px;
  }

  .thread-sync-notice {
    padding: 3px 5px;
    border-radius: 8px;
  }

  .thread-sync-notice-bar {
    gap: 4px;
  }

  .thread-sync-notice-main {
    gap: 1px;
  }

  .thread-sync-notice strong,
  .thread-sync-notice-pill,
  .thread-sync-notice span,
  .thread-sync-notice-description,
  .thread-sync-notice-action {
    font-size: 8px;
  }

  .thread-sync-notice-pill {
    min-height: 16px;
    padding-inline: 5px;
  }

  .thread-sync-notice-action {
    min-height: 20px;
    padding-inline: 6px;
  }

  .thread-panel-actions {
    width: 100%;
    justify-content: flex-start;
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .thread-panel-utility-strip {
    align-items: stretch;
    flex-wrap: wrap;
    overflow: visible;
    padding: 4px 8px 6px;
  }

  .thread-header-meta,
  .thread-delivery-inline,
  .thread-quick-actions-inline,
  .thread-jumpbar {
    width: 100%;
    min-width: 0;
  }

  .thread-delivery-inline {
    justify-content: space-between;
    padding: 6px 8px;
  }

  .thread-delivery-inline-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .thread-quick-actions-inline {
    justify-content: flex-start;
  }

  .thread-panel-utility-strip {
    gap: 3px;
    padding: 2px 8px;
  }

  .thread-header-meta {
    gap: 4px;
  }

  .thread-message-view-switch {
    padding: 1px;
  }

  .thread-message-view-button,
  .thread-message-view-hint,
  .thread-jumpbar-summary,
  .thread-quick-action-button,
  .thread-jumpbar-button {
    min-height: 20px;
    padding-inline: 6px;
    font-size: 7px;
  }

  .thread-message-view-hint {
    display: none;
  }

  .thread-ops-panel,
  .thread-secondary-panel {
    width: 100%;
    min-width: 0;
    padding: 0;
    border-radius: 12px;
  }

  .thread-ops-panel > summary .disclosure-summary-copy small,
  .thread-secondary-panel > summary .disclosure-summary-copy small,
  .detail-toolbar-management-panel > summary .disclosure-summary-copy small {
    display: none !important;
  }

  .thread-header-meta {
    justify-content: flex-start;
  }

  .thread-ops-panel > summary,
  .thread-secondary-panel summary {
    min-height: 36px;
    padding: 0 10px;
  }

  .detail-toolbar-management-panel > summary {
    min-height: 36px;
    padding: 0 10px;
  }

  .detail-toolbar-inline-text {
    min-height: 0;
    font-size: 11px;
    line-height: 1.3;
  }

  .composer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
    gap: 3px;
    padding: 3px 5px 4px;
    max-height: min(164px, 27vh);
    border-radius: 12px 12px 0 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .composer.is-clean {
    gap: 2px;
    padding-top: 3px;
  }

  .composer-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
  }

  .composer.is-clean .composer-topbar {
    display: none;
  }

  .composer-tools select {
    min-height: 26px;
    font-size: 10px;
  }

  .composer-toggle-button {
    width: auto;
    min-width: 54px;
    min-height: 26px;
  }

  .composer-main-section {
    padding: 1px;
  }

  .composer textarea {
    min-height: 36px;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.32;
  }

  #connectorHint {
    font-size: 9px;
  }

  #connectorHint[data-compact="true"] {
    display: none !important;
  }

  .composer-footer {
    grid-template-columns: 1fr;
    gap: 3px;
    align-items: stretch;
  }

  .composer-footer-copy {
    min-height: 0;
  }

  .composer.is-clean .composer-footer-copy {
    display: none;
  }

  .composer-status-bar span:not([hidden]) {
    min-height: 16px;
    padding: 0 5px;
    font-size: 7px;
  }

  .composer-submit-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
  }

  .composer-submit-actions .ghost-button,
  .composer-submit-actions .primary-button {
    width: 100%;
    min-height: 28px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .composer-submit-actions .primary-button {
    grid-column: 1 / -1;
  }

  .thread-secondary-panel {
    width: auto;
  }

  .thread-secondary-panel summary {
    min-height: 30px;
    padding: 0 10px;
  }

  .thread-secondary-summary-meta {
    width: auto;
    max-width: min(100%, 140px);
    justify-content: flex-end;
    gap: 3px;
  }

  .thread-secondary-panel[open] {
    position: fixed;
    inset: 68px 12px 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: none;
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
    z-index: 12;
  }

  .thread-secondary-panel[open] summary {
    width: 100%;
    margin: 0 0 10px;
    justify-content: space-between;
  }

  .thread-secondary-shell {
    padding-bottom: 2px;
  }

  .admin-pages-shell {
    padding: 10px;
  }

  .admin-page-sidebar {
    padding: 10px;
  }

  .admin-page-sidebar,
  .modal-section-card,
  .setup-summary-card,
  .setup-card,
  .audit-row,
  .outbox-row,
  .health-row,
  .template-row {
    padding: 12px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .modal-actions .ghost-button {
    width: 100%;
  }

  .user-row {
    gap: 12px;
  }

  .user-workload-metrics {
    gap: 6px;
  }

  .user-row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    flex: 0 0 auto;
    gap: 8px;
  }

  .user-row-actions .ghost-button,
  .user-row-actions .user-current-label,
  .user-password-reset,
  .user-row-tools {
    width: 100%;
  }

  .user-password-reset {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: stretch;
  }

  .user-password-reset input {
    width: 100%;
  }

  .user-current-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
  }

  .user-row-tools {
    grid-column: 1 / -1;
  }

  .channel-settings-nav-item {
    flex-basis: 132px;
  }

  #replyAttachmentsInput {
    min-height: 40px;
  }

  .composer-status-bar {
    min-width: 0;
  }

  .composer-submit-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 6px;
  }

  .composer-submit-actions .ghost-button,
  .composer-footer .primary-button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .workspace {
    gap: 0;
    padding: 0;
  }

  .thread-panel-header {
    padding: 8px 10px;
    gap: 5px;
  }

  .thread-panel-heading {
    gap: 0;
  }

  .thread-panel-heading span {
    display: none;
  }

  .compact-back-button {
    min-height: 28px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .conversation-list-panel,
  .queue-search-panel {
    padding: 6px 8px 0;
    border-radius: 0;
    background: transparent;
  }

  .panel-header-queue-copy #queueCount,
  .panel-header-queue-copy small {
    display: none;
  }

  .queue-tools-panel {
    gap: 5px;
  }

  .queue-primary-filters {
    grid-template-columns: 1fr;
  }

  .queue-search-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 2px;
  }

  .queue-search-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .queue-search-actions .ghost-button,
  .queue-toolbar-recovery-actions .ghost-button {
    width: 100%;
  }

  .panel-header-queue-copy {
    align-items: baseline;
    gap: 6px;
  }

  .panel-header-queue-copy small {
    display: none;
  }

  .panel-header-queue-copy #queueCount {
    font-size: 10px;
  }

  .conversation-list-header-copy span,
  .queue-search-header-copy span {
    font-size: 11px;
  }

  .conversation-list-count {
    min-height: 26px;
    padding: 0 9px;
    font-size: 10px;
  }

  .thread-panel-heading strong {
    font-size: 12px;
  }

  .thread-panel-heading span {
    font-size: 10px;
  }

  .thread-quick-actions-list {
    grid-template-columns: 1fr;
  }

  .panel-header-queue {
    display: grid;
    gap: 6px;
    padding-bottom: 4px;
  }

  .queue-header-actions {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }

  .queue-focus-button {
    flex: 1 1 auto;
  }

  .queue-summary-panel,
  .queue-active-filters-panel,
  .queue-views-panel,
  .bulk-actions,
  .queue-advanced-tools {
    padding-left: 0;
    padding-right: 0;
  }

  .queue-summary-panel.is-secondary {
    gap: 2px;
    padding-top: 1px;
  }

  .queue-summary-panel.is-secondary:not([open]) > summary {
    min-height: 16px;
  }

  .queue-summary-panel.is-secondary:not([open]) .disclosure-summary-copy {
    gap: 4px;
  }

  .queue-summary-panel.is-secondary:not([open]) .disclosure-summary-copy strong {
    font-size: 9px;
  }

  .queue-summary-panel.is-secondary:not([open]) .disclosure-summary-copy small {
    font-size: 8px;
    line-height: 1.1;
  }

  .queue-summary-panel.is-secondary[open] > summary {
    min-height: 20px;
  }

  .queue-summary-panel.is-secondary .queue-summary {
    gap: 5px;
  }

  .queue-summary-panel.is-secondary .queue-summary-button {
    min-height: 0;
    padding: 8px 9px;
  }

  .queue-summary-panel.is-secondary .queue-summary-button span {
    font-size: 9px;
  }

  .queue-summary-panel.is-secondary .queue-summary-button strong {
    min-width: 20px;
    min-height: 20px;
    padding: 0 5px;
    font-size: 9px;
  }

  .conversation-list {
    gap: 7px;
    padding-top: 2px;
    padding-right: 0;
  }

  .conversation-item {
    padding: 8px 9px;
    border-radius: 12px;
  }

  .conversation-item::before {
    top: 10px;
    bottom: 10px;
    width: 2px;
  }

  .item-top {
    gap: 6px;
  }

  .selection-toggle {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    font-size: 11px;
    opacity: 0.7;
  }

  .conversation-item-main {
    gap: 5px;
  }

  .item-top-main {
    align-items: start;
    gap: 6px;
  }

  .item-title-block {
    gap: 5px;
  }

  .item-channel-badge {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .item-channel-badge svg {
    width: 11px;
    height: 11px;
  }

  .item-name {
    font-size: 12px;
  }

  .item-support-row-secondary {
    gap: 4px;
    padding-top: 2px;
  }

  .item-support-row-secondary .item-footer-meta,
  .item-support-row-secondary .item-delivery-note {
    min-height: 17px;
    padding: 0 5px;
    font-size: 9px;
  }

  .item-summary,
  .item-inline-facts {
    display: none;
  }

  .item-time {
    font-size: 9px;
  }

  .item-meta-row {
    gap: 4px;
  }

  .item-event-row {
    gap: 5px;
  }

  .item-event-meta {
    font-size: 8px;
  }

  .chip,
  .subtle-chip {
    min-height: 21px;
    padding: 0 7px;
    font-size: 10px;
  }

  .item-preview {
    color: #475467;
    font-size: 10px;
    line-height: 1.35;
    -webkit-line-clamp: 1;
    min-height: calc(10px * 1.35);
  }

  .item-footer-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 3px;
    padding-top: 6px;
  }

  .item-footer-main {
    width: 100%;
    gap: 4px;
  }

  .item-footer-main .item-queue-action {
    width: 100%;
    justify-content: space-between;
  }

  .item-footer-main .item-queue-action strong {
    max-width: 100%;
  }

  .item-quick-actions {
    display: none;
  }

  .conversation-item.is-mobile-compact .item-meta-row {
    gap: 3px;
  }

  .conversation-item.is-mobile-compact .item-queue-action {
    padding: 4px 6px;
  }

  .conversation-item.is-mobile-compact .item-queue-action strong {
    font-size: 8px;
  }

  .conversation-item.is-mobile-compact .item-quick-action-button {
    min-height: 22px;
    padding: 0 7px;
    font-size: 8px;
  }

  .message-thread-summary-pill {
    width: 100%;
    gap: 3px;
  }

  .message-thread-summary-main {
    align-items: flex-start;
    gap: 6px;
  }

  .message-thread-summary-main small {
    font-size: 9px;
    text-align: left;
  }

  .circle-pending-run,
  .circle-outbound-run,
  .message-thread-group {
    gap: 8px;
  }

  .message-thread-summary-preview {
    font-size: 9px;
  }

  .message-thread-replies {
    gap: 7px;
    margin-left: 8px;
    padding: 7px 6px 1px 8px;
    border-radius: 0 10px 10px 0;
  }

  .message {
    gap: 4px;
    max-width: 100%;
  }

  .message-frame {
    gap: 4px;
  }

  .message-meta-row {
    gap: 5px;
    flex-direction: column;
    align-items: stretch;
  }

  .message-meta-primary,
  .message-meta-secondary {
    gap: 4px;
  }

  .message-role-badge {
    min-height: 16px;
    font-size: 8px;
  }

  .message-actions {
    justify-content: flex-start;
    opacity: 1;
    transform: none;
  }

  .message-actions-menu-panel {
    left: 0;
    right: auto;
    min-width: 150px;
  }

  .message-bubble {
    padding: 11px 12px;
    border-radius: 14px;
  }

  .message.is-thread-reply {
    max-width: 100%;
  }

  .message.is-thread-reply .message-bubble {
    border-radius: 14px;
  }

  .message-delivery-state {
    margin-bottom: 7px;
    padding: 8px;
  }

  .message-delivery-state-head {
    gap: 6px;
  }

  .message-delivery-progress {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .message-delivery-progress-step {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
  }

  .message-delivery-progress-label {
    font-size: 8px;
  }

  .message-reply-reference {
    margin-bottom: 7px;
    padding: 7px 8px;
  }

  .message-delivery-trace {
    gap: 7px;
    margin-top: 8px;
    padding-top: 7px;
  }

  .message-delivery-trace-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .message-delivery-trace-step {
    width: 100%;
  }

  .message-delivery-trace-copy strong {
    font-size: 10px;
  }

  .message-delivery-trace summary small,
  .message-delivery-trace-copy small {
    font-size: 9px;
  }

  .message-attachments {
    gap: 6px;
    margin-top: 8px;
  }

  .message-attachment {
    padding: 9px 10px;
  }

  .message-attachment-media,
  .message-attachment-audio {
    width: 100%;
    max-width: 100%;
  }

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

  .message-meta-primary,
  .message-meta-secondary {
    gap: 4px;
  }

  .message.outbound .message-meta,
  .message.outbound .message-meta-primary,
  .message.outbound .message-meta-secondary {
    text-align: left;
    justify-content: flex-start;
  }

  .outbox-group-main strong {
    font-size: 13px;
  }

  .outbox-group-main p {
    font-size: 12px;
    line-height: 1.35;
  }
}

@media (max-width: 680px) {
  .topbar {
    gap: 6px;
    min-height: 48px;
    padding: 8px 10px;
  }

  .topbar-copy {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar h1 {
    font-size: 16px;
    line-height: 1;
  }

  .topbar p {
    display: none;
  }

  .topbar-actions {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 4px;
  }

  .sidebar-section-header {
    align-items: center;
  }

  .sidebar-section-header-copy {
    gap: 2px;
  }

  .sidebar-section-toggle {
    min-height: 26px;
    padding: 0 9px;
    font-size: 10px;
  }

  .channel-nav.is-collapsed {
    grid-auto-columns: minmax(96px, max-content);
  }

  .workspace-mobile-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 3px 8px 4px;
  }

  .workspace-mobile-nav .ghost-button {
    width: 100%;
    justify-content: center;
    padding-inline: 8px;
    white-space: nowrap;
    min-height: 28px;
    font-size: 10px;
  }

  .queue-search-header {
    align-items: flex-start;
  }

  .queue-search-header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .queue-search-panel .queue-search-header .queue-search-header-meta {
    display: none;
    min-width: 0;
    text-align: left;
  }

  .queue-toolbar-recovery-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .queue-search-panel.is-collapsed {
    padding: 2px 0;
  }

  .conversation-list-panel,
  .queue-search-panel {
    padding: 6px 8px 0;
    border-radius: 0;
    background: transparent;
  }

  .detail-toolbar-status-strip {
    display: none;
  }

  .detail-toolbar-management-meta {
    display: none;
  }

  .detail-toolbar-management-panel > summary {
    min-height: 26px;
    padding: 0 6px 0 7px;
  }

  .detail-toolbar {
    gap: 3px;
    padding: 4px 8px;
  }

  .detail-toolbar-inline-text {
    font-size: 9px;
    line-height: 1.2;
  }

  .detail-toolbar-summary .chip {
    min-height: 18px;
    padding: 0 6px;
    font-size: 8px;
  }

  .detail-toolbar-management-panel .disclosure-summary-copy strong {
    font-size: 8px;
    line-height: 1.1;
  }

  .thread-panel-header {
    position: relative;
    gap: 4px;
    padding: 6px 8px;
  }

  .thread-header-meta {
    display: none;
  }

  .thread-panel-actions {
    position: relative;
    gap: 4px;
    width: 0;
    min-width: 0;
    justify-self: end;
    overflow: visible;
  }

  .thread-message-view-switch {
    padding: 1px;
    gap: 1px;
  }

  .thread-message-view-button-compact {
    min-height: 18px;
    min-width: 52px;
    padding-inline: 7px;
    font-size: 7px;
  }

  .thread-message-view-hint {
    min-height: 18px;
    padding: 0 6px;
    font-size: 7px;
  }

  .thread-ops-panel > summary,
  .thread-secondary-panel summary {
    min-height: 24px;
    padding: 0 6px;
  }

  .thread-secondary-panel summary strong {
    font-size: 7px;
  }

  .thread-secondary-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    min-width: 0;
    z-index: 4;
  }

  .thread-secondary-panel:not([open]) summary {
    width: auto;
    min-width: 0;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(252, 253, 255, 0.96);
  }

  .thread-secondary-panel:not([open]) .thread-secondary-summary-meta {
    display: none;
  }

  .thread-sync-notice {
    padding: 4px 6px;
    border-radius: 8px;
  }

  .thread-sync-notice.is-collapsible {
    padding: 0;
  }

  .thread-sync-notice-summary {
    min-height: 28px;
    padding: 0 6px;
    gap: 6px;
  }

  .thread-sync-notice-summary-copy {
    gap: 0;
  }

  .thread-sync-notice-summary-copy strong {
    font-size: 8px;
  }

  .thread-sync-notice-summary-copy small {
    font-size: 7px;
    line-height: 1.15;
  }

  .thread-sync-notice-bar {
    gap: 5px;
  }

  .thread-sync-notice-main {
    gap: 1px;
  }

  .thread-sync-notice strong,
  .thread-sync-notice-pill,
  .thread-sync-notice span,
  .thread-sync-notice-description,
  .thread-sync-notice-action {
    font-size: 8px;
  }

  .thread-sync-notice-pill {
    min-height: 17px;
    padding-inline: 5px;
  }

  .thread-sync-notice-summary-pill {
    min-height: 16px;
    padding: 0 5px;
    font-size: 7px;
  }

  .thread-sync-notice-action {
    min-height: 22px;
    padding-inline: 7px;
  }

  .thread-sync-notice-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .thread-sync-notice-body {
    padding: 0 6px 6px;
  }

  .thread-sync-notice.is-heavy {
    padding-block: 3px;
  }

  .composer {
    gap: 4px;
    padding: 6px 7px 8px;
    max-height: min(228px, 36vh);
  }

  .composer-topbar {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .composer-toggle-button {
    width: 100%;
    min-width: 0;
  }

  .composer-signal-strip {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .composer-secondary-panel {
    width: 100%;
    min-width: 0;
  }

  .composer-secondary-panel > summary {
    min-height: 24px;
    padding: 4px 8px;
  }

  .composer-status-bar {
    gap: 4px;
  }

  .composer-delivery-panel {
    gap: 4px;
    padding: 4px 6px;
    border-radius: 9px;
  }

  .composer-delivery-panel,
  .composer-delivery-panel[data-variant="compact"] {
    align-items: flex-start;
    flex-direction: column;
  }

  .composer-delivery-copy {
    gap: 2px;
  }

  .composer-delivery-copy strong,
  .composer-delivery-panel[data-variant="compact"] .composer-delivery-copy strong {
    font-size: 8px;
  }

  .composer-delivery-copy small,
  .composer-delivery-panel[data-variant="compact"] .composer-delivery-copy small {
    font-size: 8px;
  }

  .composer-delivery-signals {
    gap: 3px;
  }

  .composer-delivery-signal {
    min-height: 16px;
    padding-inline: 5px;
    font-size: 7px;
  }

  .composer-delivery-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .composer-delivery-action {
    min-height: 22px;
    padding-inline: 7px;
    font-size: 8px;
  }

  .composer-footer-copy {
    display: none;
  }

  .composer-submit-actions {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .thread-refresh-button {
    min-height: 28px;
    font-size: 10px;
  }

  .thread-secondary-panel summary {
    min-height: 24px;
  }

  .detail-toolbar-management-panel > summary {
    min-height: 26px;
  }

  .thread-secondary-summary-meta {
    display: none;
  }

  .thread-secondary-panel[open] {
    inset: 72px 8px 8px;
    padding: 8px 8px 10px;
    border-radius: 14px;
  }

  .thread-secondary-panel[open] summary {
    margin: 0 0 6px;
  }

  .thread-secondary-shell {
    gap: 5px;
    padding-right: 0;
  }

  .thread-secondary-tabs {
    gap: 3px;
  }

  .thread-secondary-tab {
    min-height: 24px;
    padding: 0 6px;
    font-size: 8px;
  }

  .thread-secondary-panels,
  .thread-secondary-view,
  .profile-card,
  .timeline,
  .technical-log,
  .profile-summary-card,
  .profile-subsection {
    gap: 5px;
  }

  .profile-summary-card,
  .profile-subsection,
  .internal-note-card,
  .internal-tag-chip-row {
    padding: 7px 8px;
    border-radius: 8px;
  }

  .profile-summary-head strong {
    font-size: 11px;
  }

  .profile-summary-head span,
  .profile-empty-copy,
  .internal-note-card span,
  .internal-note-form-footer span {
    font-size: 10px;
  }

  .internal-note-card p {
    font-size: 11px;
    line-height: 1.35;
  }

  .internal-tag-form,
  .internal-note-form,
  .internal-notes-list,
  .internal-tags-list,
  .profile-subsection-stack {
    gap: 5px;
  }

  .internal-note-form textarea {
    min-height: 60px;
    padding: 8px 9px;
    font-size: 11px;
  }

  .internal-tag-form .ghost-button,
  .internal-note-form-footer .ghost-button,
  .tag-remove-button {
    min-height: 24px;
    padding-inline: 8px;
    font-size: 9px;
  }
}

@media (max-width: 560px) {
  .main {
    overflow: auto;
  }

  .queue-panel {
    padding: 0;
  }

  .queue-search-panel,
  .conversation-list-panel {
    padding-left: 8px;
    padding-right: 8px;
  }

  .queue-summary-panel {
    padding: 6px;
  }

  .queue-summary-panel .queue-summary,
  .queue-summary,
  .queue-workload,
  .queue-summary-breakdown-grid,
  .queue-summary-breakdown-grid-temporal,
  .queue-summary-breakdown-channels {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .workspace-mobile-nav .ghost-button {
    flex: 1 1 0;
  }

  .thread-secondary-panel {
    width: fit-content;
    justify-self: end;
  }

  .thread-secondary-panel summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 999px;
  }

  .thread-secondary-panel .disclosure-summary-copy {
    gap: 1px;
  }

  .thread-secondary-panel summary strong {
    font-size: 10px;
  }

  .thread-secondary-panel summary small {
    display: block;
    font-size: 9px;
    color: var(--muted);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 108px;
  }

  .thread-secondary-panel[open] {
    inset: 64px 8px 8px;
    padding: 10px 10px 12px;
    border-radius: 16px;
  }

  .thread-secondary-panel[open] summary {
    margin-bottom: 8px;
  }

  .thread-secondary-shell {
    gap: 6px;
  }

  .thread-secondary-tabs {
    gap: 4px;
  }

  .thread-secondary-tab {
    min-height: 28px;
    padding: 0 6px;
    font-size: 9px;
  }
}

.profile-inline-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
