:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f5f6f8;
  --surface-raised: #ffffff;
  --border: #e3e7ee;
  --border-strong: #d6dce6;
  --text: #121826;
  --muted: #637083;
  --muted-light: #8994a5;
  --accent: #5267f2;
  --accent-dark: #3f51d7;
  --accent-soft: #eef1ff;
  --green: #18845d;
  --green-soft: #e9f8f1;
  --amber: #b96a12;
  --amber-soft: #fff3dc;
  --violet: #7b4ed8;
  --violet-soft: #f2ecff;
  --rose: #c64968;
  --rose-soft: #fff0f3;
  --danger: #d23b48;
  --danger-soft: #fff0f1;
  --shadow-sm: 0 1px 2px rgba(18, 24, 38, .04);
  --shadow-md: 0 16px 40px rgba(18, 24, 38, .1);
  --radius: 14px;
  --sidebar-width: 264px;
  --topbar-height: 68px;
  color-scheme: light;
  font-family: "Poppins", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.brand,
.button {
  font-family: "Montserrat", "Poppins", sans-serif;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.16;
  letter-spacing: -.035em;
}

h2 {
  margin-bottom: 5px;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -.02em;
}

h3 {
  margin-bottom: 5px;
  font-size: 15px;
}

p {
  color: var(--muted);
}

.icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: none;
  overflow: hidden;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] {
  display: none !important;
}

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

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 13px 14px;
}

.brand-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 780;
  letter-spacing: -.04em;
}

.brand-mark {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--text);
  color: #fff;
  font-size: 17px;
  font-weight: 850;
  transform: skew(-7deg);
}

.brand-light .brand-mark {
  background: #fff;
  color: #111827;
}

.workspace-switcher {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  margin: 16px 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  padding: 9px 10px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.workspace-switcher > .icon {
  width: 15px;
  color: var(--muted-light);
}

.flag-badge {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-soft);
  font-size: 17px;
}

.workspace-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

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

.workspace-copy strong {
  font-size: 13px;
  font-weight: 650;
}

.workspace-copy small {
  color: var(--muted-light);
  font-size: 10px;
}

.main-navigation {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-label {
  margin: 17px 10px 5px;
  color: #98a4b5;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
}

.nav-item {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 11px;
  border-radius: 9px;
  padding: 0 11px;
  color: #4f5968;
  font-size: 13.5px;
  font-weight: 520;
  transition: background .16s ease, color .16s ease;
}

.nav-item:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.nav-item.active {
  background: #eef1f5;
  color: var(--text);
  font-weight: 650;
}

.nav-item.active .icon {
  color: var(--accent);
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}

.sidebar-logout-form {
  width: 100%;
  margin: 0;
}

.sidebar-logout-button {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sidebar-logout-button:hover {
  background: #fff2f2;
  color: #bd3f45;
}

.support-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dfece6;
  border-radius: 11px;
  background: #f3fbf7;
  padding: 10px 11px;
}

.support-card strong,
.support-card small {
  display: block;
}

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

.support-card small {
  color: var(--green);
  font-size: 10px;
}

.support-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #26a773;
  box-shadow: 0 0 0 4px rgba(38, 167, 115, .12);
}

.sidebar-close,
.mobile-menu,
.sidebar-scrim {
  display: none;
}

.app-column {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .92);
  padding: 0 28px;
  backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-actions,
.region-item {
  display: flex;
  align-items: center;
}

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

.region-item {
  gap: 14px;
  color: var(--muted);
}

.region-item strong {
  color: var(--text);
}

.region-item .icon {
  color: var(--text);
}

.plan-pill,
.soft-pill,
.capability-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.plan-pill {
  padding: 5px 9px;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}

.icon-button:hover {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text);
}

.sidebar-close,
.mobile-menu {
  display: none;
}

.search-button {
  display: flex;
  min-width: 155px;
  height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  padding: 0 9px;
  color: var(--muted-light);
  box-shadow: var(--shadow-sm);
}

.search-button span {
  flex: 1;
  text-align: left;
}

kbd {
  border: 0;
  border-radius: 5px;
  background: var(--surface-soft);
  padding: 2px 5px;
  color: var(--muted-light);
  font: inherit;
  font-size: 11px;
}

.avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: linear-gradient(145deg, #3c4fca, #54a58c);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--border);
}

.page-content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 34px 30px 60px;
}

.page-header,
.editor-header,
.section-heading,
.subsection-heading,
.split-heading,
.heading-with-icon {
  display: flex;
  align-items: center;
}

.page-header,
.editor-header,
.section-heading,
.subsection-heading,
.split-heading {
  justify-content: space-between;
}

.page-header {
  gap: 28px;
  margin-bottom: 26px;
}

.page-header p {
  max-width: 830px;
  margin-bottom: 0;
  font-size: 15px;
}

.compact-header {
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 15px;
  font-weight: 650;
  line-height: 1;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}


/* Buttons stay flat and precise across the product. */
.button,
.button:hover,
.button:focus,
.icon-button,
.icon-button:hover,
.search-button,
.text-button,
.segmented-control button,
.segmented-control button.active {
  box-shadow: none !important;
  transform: none !important;
}


/* Accessible custom select and multi-select surfaces. */
.premium-select {
  position: relative;
  width: 100%;
}

.premium-select > select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.premium-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--text);
  font: inherit;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: none;
  cursor: pointer;
}

.premium-select-trigger > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-select-trigger .select-chevron {
  color: var(--muted);
  width: 17px;
  height: 17px;
  transition: transform .16s ease;
}

.premium-select.open .premium-select-trigger {
  border-color: var(--accent);
  outline: 3px solid rgba(82, 103, 242, .09);
}

.premium-select.open .premium-select-trigger .select-chevron {
  transform: rotate(180deg);
}

.premium-select-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: none;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(18, 24, 38, .12);
}

.premium-select.open .premium-select-menu {
  display: grid;
  gap: 2px;
}

.premium-select-menu.portal-open {
  display: grid;
  gap: 2px;
}

.premium-select-menu-floating {
  position: fixed;
  z-index: 180;
  top: auto;
  right: auto;
  left: auto;
}

.premium-select-menu > button,
.premium-select-menu > label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--muted);
  font: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
}

.premium-select-menu > button:hover,
.premium-select-menu > label:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.premium-select-menu > button.selected,
.premium-select-menu > label.selected {
  color: var(--accent);
  background: rgba(82, 103, 242, .08);
  font-weight: 600;
}

.premium-select-menu > button.selected::after {
  margin-left: auto;
  content: "✓";
  font-size: 15px;
  font-weight: 700;
}

.multi-menu label input {
  position: absolute;
  opacity: 0;
}

.multi-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: transparent;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
}

.multi-menu label.selected .multi-check {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.channel-option-logo {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e7eaf0;
  border-radius: 10px;
  background: #f7f8fb;
}

.channel-option-image {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 9px;
}

.channel-option-logo-sms .channel-option-image,
.channel-option-logo-call .channel-option-image,
.channel-option-logo-email .channel-option-image,
.channel-option-logo-push .channel-option-image {
  width: 19px;
  height: 19px;
  opacity: .68;
}

.analytics-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 20px;
  padding: 5px;
  width: fit-content;
  background: var(--surface-soft);
  border-radius: 11px;
}

.analytics-tabs a {
  padding: 9px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}

.analytics-tabs a.active {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}


.workflow-details-card {
  margin-bottom: 18px;
}

.workflow-detail-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.workflow-builder {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.workflow-builder-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}

.workflow-builder-toolbar h2 {
  margin: 2px 0 4px;
}

.workflow-builder-toolbar p {
  margin: 0;
}

.workflow-add-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.node-add-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: none;
}

.node-add-button:hover {
  color: var(--accent);
  border-color: #bbc4ff;
  background: var(--accent-soft);
}

.node-add-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.node-add-button .icon {
  width: 17px;
  height: 17px;
}

.workflow-designer-grid {
  display: grid;
  grid-template-columns: minmax(460px, 1fr) 360px;
  min-height: 650px;
}

.workflow-canvas {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 34px max(32px, 7vw) 60px;
  background-color: #f8f9fc;
  background-image: radial-gradient(#d8dde8 1px, transparent 1px);
  background-size: 20px 20px;
  border-right: 1px solid var(--border);
}

.designer-node {
  display: grid;
  grid-template-columns: 22px 42px 1fr 20px;
  align-items: center;
  gap: 12px;
  width: min(100%, 520px);
  min-height: 76px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  box-shadow: none;
  cursor: pointer;
}

.designer-node.selected {
  border-color: var(--accent);
  outline: 3px solid rgba(82, 103, 242, .09);
}

.designer-node.dragging {
  opacity: .55;
}

.designer-node-grip {
  color: var(--muted-light);
  font-size: 20px;
  cursor: grab;
}

.designer-node-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
}

.designer-node-icon.green { color: var(--green); background: var(--green-soft); }
.designer-node-icon.violet { color: var(--violet); background: var(--violet-soft); }
.designer-node-icon.amber { color: var(--amber); background: var(--amber-soft); }
.designer-node-icon.rose { color: var(--rose); background: var(--rose-soft); }
.designer-node-icon.neutral { color: var(--muted); background: var(--surface-soft); }

.designer-node > div {
  display: grid;
  gap: 3px;
}

.designer-node small {
  color: var(--muted);
  font-size: 11px;
}

.designer-node > .icon:last-child {
  color: var(--muted-light);
  width: 20px;
  height: 20px;
}

.designer-connector {
  display: grid;
  place-items: center;
  width: 2px;
  height: 40px;
  color: var(--muted-light);
  background: var(--border-strong);
}

.designer-connector .icon {
  padding: 2px;
  width: 16px;
  height: 16px;
  background: #f8f9fc;
}

.workflow-properties {
  padding: 22px;
  background: var(--surface);
}

.workflow-properties header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.workflow-properties h3 {
  margin: 3px 0 0;
  font-size: 18px;
}

.workflow-properties .field {
  margin-bottom: 15px;
}

.workflow-timestamp-field {
  margin-bottom: 15px;
}

.workflow-timestamp-field .field {
  margin-bottom: 6px;
}

.workflow-timestamp-controls {
  display: flex;
  gap: 7px;
  align-items: center;
}

.workflow-timestamp-controls select,
.workflow-timestamp-set select,
.workflow-timestamp-set input {
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.workflow-timestamp-controls select {
  flex: 1;
}

.workflow-timestamp-controls .button {
  white-space: nowrap;
}

.workflow-timestamp-field > small,
.workflow-timestamp-set > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.workflow-timestamp-set {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.workflow-timestamp-set > strong {
  font-size: 12px;
}

.workflow-timestamp-set > small:not(:empty) {
  color: var(--danger);
}

.code-input {
  min-height: 90px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 12px !important;
}

.field-error textarea {
  border-color: var(--danger) !important;
}

.workflow-sticky-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.workflow-danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.workflow-danger p {
  margin: 3px 0 0;
}

@media (max-width: 1050px) {
  .workflow-detail-grid,
  .workflow-designer-grid {
    grid-template-columns: 1fr;
  }

  .workflow-canvas {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .workflow-properties {
    min-height: 420px;
  }
}

@media (max-width: 720px) {
  .workflow-builder-toolbar {
    flex-direction: column;
  }

  .workflow-add-menu {
    justify-content: flex-start;
  }

  .workflow-canvas {
    padding: 24px 14px 40px;
  }
}


.usage-section {
  margin-bottom: 26px;
}

.usage-engine-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.usage-total {
  color: var(--accent);
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
}

.usage-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.usage-metric-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.usage-table {
  min-width: 1120px;
}

@media (max-width: 720px) {
  .usage-engine-summary {
    grid-template-columns: 1fr;
  }
}

.infrastructure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.infrastructure-card header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.infrastructure-card header > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.infrastructure-card h2,
.infrastructure-card p {
  margin-bottom: 2px;
}

.service-health {
  display: block;
  width: 9px;
  height: 9px;
  margin-top: 8px;
  background: var(--green);
  border-radius: 50%;
}

.service-health.offline {
  background: var(--rose);
  box-shadow: 0 0 0 4px var(--rose-soft);
}

.service-unavailable .infrastructure-stats {
  opacity: .72;
}

.infrastructure-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.infrastructure-stats > div {
  display: grid;
  gap: 4px;
  padding: 15px;
  background: var(--surface);
}

.infrastructure-stats span,
.infrastructure-stats small {
  color: var(--muted);
  font-size: 11px;
}

.infrastructure-stats strong {
  font-family: "Montserrat", sans-serif;
  font-size: 22px;
}

.bandwidth-card {
  margin-bottom: 18px;
}

.infra-performance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.operational-metric-card {
  min-width: 0;
  padding: 18px;
}

.operational-metric-card > .section-heading {
  align-items: center;
  margin-bottom: 14px;
}

.operational-metric-card > .section-heading p {
  margin-top: 3px;
}

.operational-metrics {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--border);
}

.operational-metrics article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 15px;
  background: var(--surface);
}

.operational-metric-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
}

.operational-metric-icon.violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.operational-metric-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.operational-metric-icon .icon {
  width: 17px;
  height: 17px;
}

.operational-metrics small,
.operational-metrics p {
  color: var(--muted);
}

.operational-metrics small {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.operational-metrics strong {
  display: block;
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  line-height: 1.2;
}

.operational-metrics p {
  margin: 3px 0 0;
  font-size: 11.5px;
}

.measurement-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
}

.measurement-note h2 {
  margin-bottom: 5px;
}

.measurement-note p {
  margin: 0;
}

@media (max-width: 1100px) {
  .usage-metric-grid,
  .usage-metric-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .infra-performance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .infrastructure-grid {
    grid-template-columns: 1fr;
  }

  .operational-metric-card,
  .measurement-note {
    padding: 15px;
  }
}

/* Campaign directory follows the compact agent-card layout. */
.campaign-directory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 14px 16px;
}

.campaign-directory-heading h2,
.campaign-directory-heading p {
  margin: 0;
}

.campaign-directory-heading h2 {
  font-size: 15px;
}

.campaign-directory-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.campaign-list-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
}

.campaign-list-card {
  min-height: 330px;
  gap: 0;
  border-radius: 10px;
  padding: 16px;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.campaign-list-card:hover {
  border-color: #cbd5e5;
  box-shadow: 0 10px 26px rgba(20, 30, 52, .07);
  transform: translateY(-2px);
}

.campaign-list-card > header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.campaign-directory-avatar {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  background: #eaf2ff;
  color: #4f74da;
}

.campaign-directory-avatar .icon {
  width: 20px;
  height: 20px;
}

.campaign-list-card > header > div {
  min-width: 0;
}

.campaign-list-card > header a {
  color: inherit;
  text-decoration: none;
}

.campaign-list-card > header h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-list-card > header p {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-list-tags {
  display: flex;
  min-height: 30px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 17px;
}

.campaign-list-tags span {
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 5px 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
}

.campaign-list-card .campaign-list-description {
  display: -webkit-box;
  min-height: 51px;
  margin: 13px 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.campaign-list-metrics > div {
  min-width: 0;
  min-height: 72px;
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 10px 11px;
}

.campaign-list-metrics dt,
.campaign-list-metrics small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-list-metrics dd {
  margin: 5px 0 2px;
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
}

.campaign-list-card > footer {
  align-items: center;
  margin-top: auto;
  padding-top: 15px;
}

/* Pastel channel artwork is shared by selectors, cards and child summaries. */
.channel-brand,
.channel-option-logo {
  border-color: transparent;
}

.channel-brand-sms,
.channel-option-logo-sms { background: #eaf2ff; color: #4f72d8; }
.channel-brand-whatsapp,
.channel-option-logo-whatsapp { background: #e7f8ee; color: #259a58; }
.channel-brand-call,
.channel-option-logo-call { background: #f0ecff; color: #725bc9; }
.channel-brand-viber,
.channel-option-logo-viber { background: #f2ecfb; color: #7657b2; }
.channel-brand-wechat,
.channel-option-logo-wechat { background: #e9f8ef; color: #28925a; }
.channel-brand-email,
.channel-option-logo-email { background: #eaf4ff; color: #4d78c7; }
.channel-brand-push,
.channel-option-logo-push { background: #fff3df; color: #b77626; }
.channel-brand-messenger,
.channel-option-logo-messenger { background: #e9f1ff; color: #4779d8; }
.channel-brand-instagram,
.channel-option-logo-instagram { background: #faeaf4; color: #b44c82; }
.channel-brand-telegram,
.channel-option-logo-telegram { background: #e9f5fb; color: #3d87ad; }
.channel-brand-review_needed,
.channel-option-logo-review_needed { background: #fff4df; color: #bd7b19; }

.channel-brand > img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.channel-brand-sms > img,
.channel-brand-call > img,
.channel-brand-email > img,
.channel-brand-push > img {
  opacity: .72;
}

.channel-option-logo .channel-option-image {
  width: 25px;
  height: 25px;
  border-radius: 7px;
}

.channel-option-logo-sms .channel-option-image,
.channel-option-logo-call .channel-option-image,
.channel-option-logo-email .channel-option-image,
.channel-option-logo-push .channel-option-image {
  opacity: .72;
}

.campaign-list-channels .channel-brand > img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.campaign-list-channels .channel-brand-sms > img,
.campaign-list-channels .channel-brand-call > img,
.campaign-list-channels .channel-brand-email > img,
.campaign-list-channels .channel-brand-push > img {
  width: 15px;
  height: 15px;
}

.campaign-single-channel-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 5px;
}

.campaign-single-channel-summary .channel-brand {
  width: 35px;
  height: 35px;
  flex-basis: 35px;
  border-radius: 9px;
}

.campaign-single-channel-summary .channel-brand > img {
  width: 26px;
  height: 26px;
}

.campaign-single-channel-summary strong {
  margin: 0;
}

.campaign-time-card-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.campaign-time-card-heading .channel-brand {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 10px;
}

.campaign-time-card-heading .channel-brand > img {
  width: 28px;
  height: 28px;
}

/* Delivery-child review keeps testing and the approval decision visible. */
.campaign-child-config-layout.has-review-sidebar {
  display: grid;
  grid-template-columns: minmax(250px, .34fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.campaign-child-review-sidebar {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 12px;
}

.campaign-child-review-main {
  min-width: 0;
}

.campaign-child-review-main .campaign-child-form {
  margin: 0 0 18px;
}

.campaign-sidebar-context,
.campaign-sidebar-test,
.campaign-sidebar-decision,
.campaign-sidebar-approved {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  padding: 14px;
}

.campaign-sidebar-context {
  display: flex;
  align-items: center;
  gap: 11px;
}

.campaign-sidebar-context > div {
  min-width: 0;
}

.campaign-sidebar-context strong,
.campaign-sidebar-context small,
.campaign-sidebar-test strong,
.campaign-sidebar-test small,
.campaign-sidebar-decision strong,
.campaign-sidebar-decision p,
.campaign-sidebar-approved strong,
.campaign-sidebar-approved p {
  display: block;
  margin: 0;
}

.campaign-sidebar-context small,
.campaign-sidebar-test small,
.campaign-sidebar-decision p,
.campaign-sidebar-approved p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.campaign-message-test.campaign-sidebar-test,
.campaign-call-test.campaign-sidebar-test {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 12px;
  margin: 0;
}

.campaign-sidebar-test .field,
.campaign-sidebar-test .button {
  margin: 0;
}

.campaign-approve-child.campaign-sidebar-decision {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 12px;
  margin: 0;
}

.campaign-sidebar-decision .field {
  margin: 0;
}

.campaign-sidebar-approved {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-color: #bfe9d2;
  background: #f2fbf6;
  color: #218659;
}

@media (max-width: 1280px) {
  .campaign-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .campaign-child-config-layout.has-review-sidebar {
    grid-template-columns: 1fr;
  }

  .campaign-child-review-sidebar {
    position: static;
  }
}

@media (max-width: 800px) {
  .campaign-directory-heading,
  .campaign-list-card > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .campaign-list-grid {
    grid-template-columns: 1fr;
  }
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.settings-tabs a {
  padding: 9px 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.settings-tabs a:hover {
  color: var(--accent);
  border-color: #bbc4ff;
}

.secret-reveal-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--amber-soft);
  border: 1px solid #f0c87b;
  border-radius: 13px;
}

.secret-reveal-card > div {
  min-width: 0;
  flex: 1;
}

.copy-secret {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.copy-secret code {
  min-width: 0;
  flex: 1;
  overflow: auto;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid #e9c16f;
  border-radius: 8px;
  white-space: nowrap;
}

.settings-connection-list,
.settings-number-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.settings-connection-list > article {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.settings-connection-list > article > header,
.settings-connection-list > article > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-soft);
}

.settings-connection-list > article > header > div,
.settings-connection-list > article > footer > div,
.settings-number-list form > div:first-of-type {
  display: flex;
  align-items: center;
  gap: 11px;
}

.settings-connection-list h3,
.settings-connection-list p {
  margin: 0;
}

.settings-connection-list > article > form {
  padding: 16px;
}

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

.settings-form-actions {
  display: flex;
  justify-content: flex-end;
}

.secret-actions {
  display: flex !important;
  gap: 7px !important;
}

.settings-connection-list footer strong,
.settings-connection-list footer small {
  display: block;
}

.settings-number-list form {
  display: grid;
  grid-template-columns: 1.2fr 1fr 180px 1fr auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

@media (max-width: 1050px) {
  .three-columns,
  .settings-number-list form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .three-columns,
  .settings-number-list form {
    grid-template-columns: 1fr;
  }

  .settings-connection-list > article > footer,
  .copy-secret {
    align-items: stretch;
    flex-direction: column;
  }
}


.knowledge-metrics {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
}

.knowledge-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
}

.knowledge-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.knowledge-card:hover {
  border-color: #bbc4ff;
  background: #fbfbff;
}

.knowledge-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-card h3 {
  margin: 1px 0 5px;
}

.knowledge-card p {
  min-height: 42px;
  margin-bottom: 14px;
}

.knowledge-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.knowledge-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: 18px;
}

.knowledge-detail-grid aside {
  display: grid;
  gap: 18px;
}

.document-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.document-list article {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 13px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.document-list article > div {
  display: grid;
  gap: 3px;
}

.error-copy {
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.retrieval-test form {
  display: grid;
  gap: 14px;
}

.retrieval-results ol {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.retrieval-results li {
  padding: 13px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.retrieval-results li header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.retrieval-results li p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  white-space: pre-wrap;
}

.modal-wide {
  width: min(760px, calc(100vw - 32px));
}

.knowledge-upload-modal > header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.knowledge-ingest-tabs {
  display: grid;
  gap: 18px;
}

.knowledge-ingest-tab-list {
  padding: 0;
}

.document-drop-field {
  position: relative;
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  padding: 28px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.document-drop-field:hover,
.document-drop-field:focus-within {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.document-drop-field input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.document-drop-field > span:not(.document-drop-icon) {
  color: var(--muted);
  font-size: 12px;
}

.document-drop-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.document-drop-icon .icon {
  width: 21px;
  height: 21px;
}

.knowledge-document-identity {
  margin-top: 20px;
}

.knowledge-document-identity .field > span small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.field-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.inline-link {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 980px) {
  .knowledge-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .knowledge-metrics,
  .knowledge-card-grid {
    grid-template-columns: 1fr;
  }
}

.button-primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button-danger {
  border-color: #efc4c8;
  background: var(--surface);
  color: var(--danger);
}

.button-large {
  min-height: 48px;
  border-radius: 10px;
  padding: 11px 18px;
}

.button-small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 12px;
}

.button-full {
  width: 100%;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-tile {
  display: flex;
  min-height: 104px;
  align-items: center;
  gap: 13px;
  border-right: 1px solid var(--border);
  padding: 18px 20px;
  transition: background .15s ease;
}

.stat-tile:last-child {
  border-right: 0;
}

.stat-tile:hover {
  background: var(--surface-soft);
}

.stat-tile > .icon {
  width: 16px;
  margin-left: auto;
  color: var(--muted-light);
}

.stat-icon,
.resource-icon,
.journey-link-icon,
.form-card-icon,
.empty-icon,
.notice-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  border-radius: 10px;
}

.stat-icon {
  width: 42px;
  height: 42px;
}

.stat-tile span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.stat-tile small {
  color: var(--muted);
  font-size: 11px;
}

.stat-tile strong {
  font-size: 24px;
  letter-spacing: -.03em;
}

.blue {
  background: #eaf1ff;
  color: #3969c9;
}

.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.green {
  background: var(--green-soft);
  color: var(--green);
}

.rose {
  background: var(--rose-soft);
  color: var(--rose);
}

.neutral {
  background: var(--surface-soft);
  color: var(--muted);
}

.section-heading {
  gap: 20px;
  margin: 0 0 14px;
}

.section-heading p,
.subsection-heading p {
  margin: 0;
  font-size: 13px;
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.journey-card {
  position: relative;
  display: flex;
  min-height: 310px;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 25px;
}

.journey-card > div {
  max-width: 80%;
}

.journey-card > div p {
  min-height: 40px;
  margin-bottom: 4px;
  font-size: 13px;
}

.journey-number {
  position: absolute;
  top: 13px;
  right: 18px;
  color: #e1e5eb;
  font-size: 46px;
  font-weight: 850;
  letter-spacing: -.08em;
}

.journey-link {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  padding: 10px 12px;
  transition: border .15s ease, transform .15s ease;
}

.journey-link:hover {
  border-color: #bdc6d6;
  transform: translateY(-1px);
}

.journey-link > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.journey-link small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-link > .icon {
  width: 16px;
  color: var(--muted-light);
}

.journey-link-icon {
  width: 38px;
  height: 38px;
}

.content-card,
.form-card,
.resource-card,
.danger-zone-inline {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.content-card {
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 12px 17px;
}

.table-search {
  display: flex;
  width: min(330px, 60%);
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 11px;
  background: var(--surface);
}

.table-search .icon {
  width: 16px;
  color: var(--muted-light);
}

.table-search input {
  width: 100%;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
}

.record-count {
  color: var(--muted);
  font-size: 12px;
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  height: 43px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .02em;
}

.data-table th,
.data-table td {
  padding: 11px 17px;
}

.data-table td {
  height: 68px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.data-table tbody tr:first-child td {
  border-top: 0;
}

.data-table tbody tr:hover td {
  background: #fafbfc;
}

.resource-name,
.resource-card-head,
.resource-meta,
.profile-summary,
.checkbox-row,
.checkbox-field,
.heading-with-icon {
  display: flex;
  align-items: center;
}

.resource-name {
  gap: 11px;
}

.resource-name > span:last-child {
  display: flex;
  flex-direction: column;
}

.resource-name strong {
  color: var(--text);
  font-weight: 650;
}

.resource-name small {
  color: var(--muted-light);
  font-size: 11px;
}

.resource-icon {
  width: 38px;
  height: 38px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 4px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: capitalize;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-light);
}

.status-published {
  border-color: #cce9db;
  background: #f3fbf7;
  color: var(--green);
}

.status-published i {
  background: #26a773;
}

.status-draft {
  border-color: #f1dfb5;
  background: #fffaf0;
  color: #98631c;
}

.status-draft i {
  background: #d79734;
}

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

.status-created,
.status-queued,
.status-ringing,
.status-connected {
  border-color: #d8defc;
  background: #f5f6ff;
  color: var(--accent-dark);
}

.status-created i,
.status-queued i,
.status-ringing i,
.status-connected i {
  background: var(--accent);
}

.status-completed {
  border-color: #cce9db;
  background: #f3fbf7;
  color: var(--green);
}

.status-completed i {
  background: #26a773;
}

.status-failed,
.status-canceled {
  border-color: #efcdd1;
  background: var(--danger-soft);
  color: var(--danger);
}

.status-failed i,
.status-canceled i {
  background: var(--danger);
}

.soft-pill {
  padding: 4px 8px;
  text-transform: capitalize;
}

.mono-soft,
.code-input {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.mono-soft {
  font-size: 12px;
}

.empty-state {
  display: flex;
  min-height: 360px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 48px 20px;
  text-align: center;
}

.empty-state p {
  max-width: 420px;
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
}

.empty-icon .icon {
  width: 24px;
  height: 24px;
}

.small-empty {
  min-height: 250px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 20px;
  transition: border .15s ease, box-shadow .15s ease, transform .15s ease;
}

a.resource-card:hover {
  border-color: #bbc4d4;
  box-shadow: 0 12px 32px rgba(18, 24, 38, .07);
  transform: translateY(-2px);
}

.resource-card-head,
.resource-meta {
  justify-content: space-between;
}

.resource-card h2 {
  margin-top: 18px;
}

.resource-card p {
  flex: 1;
  font-size: 13px;
}

.resource-meta {
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.full-span {
  grid-column: 1 / -1;
}

.editor-header {
  gap: 20px;
  margin-bottom: 24px;
}

.editor-title h1 {
  margin: 6px 0 4px;
  font-size: 28px;
}

.editor-title p {
  margin: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.back-link:hover {
  color: var(--accent);
}

.back-link .icon {
  width: 15px;
}

.editor-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 245px;
  gap: 18px;
  align-items: start;
}

.compact-editor-layout {
  grid-template-columns: minmax(0, 1fr) 245px;
  max-width: 1120px;
  margin: 0 auto;
}

.editor-tabs {
  position: sticky;
  top: calc(var(--topbar-height) + 22px);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.editor-tabs a {
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.editor-tabs a span {
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 700;
}

.editor-tabs a:hover,
.editor-tabs a.active {
  background: var(--surface);
  color: var(--text);
}

.editor-form,
.single-column-editor,
.settings-grid {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.single-column-editor {
  max-width: 980px;
  margin: 0 auto;
}

.form-card {
  scroll-margin-top: calc(var(--topbar-height) + 20px);
  padding: 23px;
}

.form-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.form-card-heading p {
  margin: 0;
  font-size: 12px;
}

.form-card-icon {
  width: 40px;
  height: 40px;
}

.heading-with-icon {
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 15px;
}

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

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-grid .field {
  margin-bottom: 0;
}

.field > span:first-child,
.dynamic-field-row label > span {
  color: #3d4654;
  font-size: 12px;
  font-weight: 650;
}

.field input,
.field textarea,
.field select,
.dynamic-field-row input,
.dynamic-field-row select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  outline: none;
  background: var(--surface);
  transition: border .15s ease, box-shadow .15s ease;
}

.field input,
.field select,
.dynamic-field-row input,
.dynamic-field-row select {
  height: 42px;
  padding: 0 11px;
}

.field textarea {
  resize: vertical;
  padding: 10px 11px;
  line-height: 1.55;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.dynamic-field-row input:focus,
.dynamic-field-row select:focus {
  border-color: #8090f5;
  box-shadow: 0 0 0 3px rgba(82, 103, 242, .1);
}

.field input[readonly] {
  background: var(--surface-soft);
  color: var(--muted);
}

.field small {
  color: var(--muted-light);
  font-size: 11px;
}

.code-input {
  font-size: 12px;
}

.switch,
.inline-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch > span {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cbd1da;
  transition: background .18s ease;
}

.switch > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  content: "";
  transition: transform .18s ease;
}

.switch input:checked + span {
  background: var(--accent);
}

.switch input:checked + span::after {
  transform: translateX(16px);
}

.switch em {
  font-style: normal;
  font-weight: 650;
}

.inline-switch {
  margin-top: 16px;
}

.subsection-heading {
  gap: 15px;
  margin: 24px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.dynamic-fields {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.dynamic-field-row {
  display: grid;
  grid-template-columns: 24px 1fr 1fr 105px 1.6fr 1.1fr 76px 38px;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 11px;
}

.dynamic-field-row label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.drag-handle {
  display: grid;
  height: 42px;
  place-items: center;
  color: var(--muted-light);
}

.compact-checkbox {
  height: 42px;
  justify-content: center;
}

.checkbox-field {
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.checkbox-field input {
  accent-color: var(--accent);
}

.danger-ghost {
  color: var(--danger);
}

.sticky-actions {
  position: sticky;
  z-index: 10;
  bottom: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  padding: 10px;
  box-shadow: 0 10px 30px rgba(18, 24, 38, .1);
  backdrop-filter: blur(12px);
}

.editor-actions-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 22px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.publish-card,
.test-agent-card,
.danger-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

.publish-card > .form-card-icon {
  margin-bottom: 14px;
}

.test-agent-card > .form-card-icon {
  margin-bottom: 14px;
}

.test-agent-card p,
.test-agent-card small {
  font-size: 12px;
}

.test-agent-card form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.voice-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.voice-preview-button {
  width: 42px;
  height: 42px;
  color: var(--accent);
}

.voice-preview-button.is-loading {
  opacity: .55;
  animation: pulse 1s ease-in-out infinite;
}

.publish-card p,
.danger-card p {
  font-size: 12px;
}

.danger-card {
  border-color: #efd7da;
  background: #fffafb;
}

.danger-zone-inline {
  display: flex;
  max-width: 980px;
  align-items: center;
  justify-content: space-between;
  margin: 16px auto 0;
  border-color: #efd7da;
  padding: 18px 22px;
}

.danger-zone-inline p {
  margin: 2px 0 0;
  font-size: 12px;
}

.request-url-row {
  display: flex;
  gap: 12px;
}

.request-url-row .grow {
  flex: 1;
}

.method-field {
  width: 110px;
}

.timeout-field {
  width: 120px;
}

.workflow-preview {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 5px 0;
}

.workflow-node {
  display: flex;
  min-width: 150px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 10px;
}

.workflow-node > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.workflow-node div {
  display: flex;
  flex-direction: column;
}

.workflow-node small {
  color: var(--muted-light);
  font-size: 9px;
}

.workflow-line {
  width: 24px;
  height: 1px;
  flex: none;
  background: var(--border-strong);
}

.telephony-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 30px;
}

.static-card {
  min-height: 185px;
}

.provider-logo {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #121826;
  color: white;
  font-weight: 800;
}

.phone-heading {
  margin-top: 10px;
}

.capability-list {
  display: flex;
  gap: 5px;
}

.capability-list span {
  padding: 4px 7px;
  font-size: 10px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 2px;
  font-size: 12px;
  font-weight: 650;
}

.danger-text {
  color: var(--danger);
}

.small-avatar {
  width: 36px;
  height: 36px;
}

.modal-open {
  overflow: hidden;
}

.modal,
.command-dialog {
  position: fixed;
  z-index: 100;
  inset: 0;
}

.modal-backdrop,
.command-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(17, 24, 39, .42);
  backdrop-filter: blur(3px);
}

.modal-panel {
  position: relative;
  width: min(570px, calc(100% - 28px));
  max-height: calc(100vh - 50px);
  overflow-y: auto;
  margin: 25px auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.modal-panel header,
.modal-panel form,
.modal-panel footer {
  display: flex;
}

.modal-panel header {
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 19px 22px;
}

.modal-panel header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-panel form {
  flex-direction: column;
  padding: 22px;
}

.modal-panel footer {
  justify-content: flex-end;
  gap: 8px;
  margin: 6px -22px -22px;
  border-top: 1px solid var(--border);
  padding: 14px 22px;
}

.checkbox-row {
  gap: 18px;
  margin: 4px 0 18px;
}

.command-panel {
  position: relative;
  width: min(540px, calc(100% - 28px));
  margin: 12vh auto 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.command-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 0 15px;
}

.command-input-row input {
  width: 100%;
  height: 56px;
  border: 0;
  outline: 0;
  background: transparent;
}

.command-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
}

.command-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 10px;
}

.command-links a:hover {
  background: var(--surface-soft);
}

.flash {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
}

.flash > span {
  flex: 1;
}

.flash-success {
  border-color: #c7e9d9;
  background: #f1fbf6;
  color: var(--green);
}

.flash-error {
  border-color: #efcdd1;
  background: var(--danger-soft);
  color: var(--danger);
}

.notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  border: 1px solid #dce2ff;
  border-radius: 12px;
  background: #f7f8ff;
  padding: 13px 15px;
}

.notice-banner p {
  margin: 2px 0 0;
  font-size: 12px;
}

.notice-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-soft);
  color: var(--accent);
}

.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.segmented-control {
  display: flex;
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 3px;
}

.segmented-control button {
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 0 13px;
  color: var(--muted);
  font-size: 12px;
}

.segmented-control button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.segmented-control button.dark {
  background: var(--text);
  color: #fff;
}

.filter-chip {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  padding: 0 11px;
}

.filter-chip span {
  color: var(--muted);
}

.interval-control {
  margin-left: auto;
  border: 1px solid var(--border);
  background: var(--surface);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.metric-label {
  color: var(--muted);
}

.metric-card strong {
  margin: 5px 0 2px;
  font-size: 25px;
  letter-spacing: -.03em;
}

.metric-card small {
  color: var(--muted-light);
}

.info-dot {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-size: 8px;
  font-weight: 700;
}

.quality-section {
  margin-top: 20px;
}

.inline-heading h2 {
  display: flex;
  align-items: center;
  gap: 7px;
}

.inline-heading h2 .icon {
  color: var(--accent);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.profile-summary {
  gap: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.profile-summary h3,
.profile-summary p {
  margin: 0;
}

.profile-pills {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}

.detail-list {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
}

.detail-list div:last-child {
  border-bottom: 0;
}

.detail-list span {
  color: var(--muted);
}

.login-page {
  background: #f6f7f9;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(430px, .95fr) minmax(520px, 1.05fr);
  min-height: 100vh;
}

.login-brand-panel {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  background: #111725;
  color: #fff;
  padding: 43px 54px;
}

.login-brand-panel::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  content: "";
}

.login-brand-panel > * {
  position: relative;
  z-index: 1;
}

.login-brand-copy {
  max-width: 540px;
  margin-top: 15vh;
}

.eyebrow-light {
  color: #91a1ff;
}

.login-brand-copy h1 {
  margin: 7px 0 18px;
  color: #fff;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.01;
  letter-spacing: -.055em;
}

.login-brand-copy p {
  max-width: 500px;
  color: #aeb8c9;
  font-size: 17px;
}

.voice-orbit {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 460px;
  height: 460px;
}

.orbit,
.voice-core {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit {
  border: 1px solid rgba(135, 152, 255, .25);
}

.orbit-one {
  width: 330px;
  height: 330px;
}

.orbit-two {
  width: 455px;
  height: 455px;
}

.voice-core {
  display: flex;
  width: 190px;
  height: 190px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: radial-gradient(circle at 35% 30%, #8291ff, #4752cf 50%, #242b70);
  box-shadow: 0 0 80px rgba(91, 105, 242, .35);
}

.voice-core i {
  width: 7px;
  border-radius: 10px;
  background: white;
  opacity: .9;
}

.voice-core i:nth-child(1),
.voice-core i:nth-child(5) { height: 30px; }
.voice-core i:nth-child(2),
.voice-core i:nth-child(4) { height: 55px; }
.voice-core i:nth-child(3) { height: 80px; }

.login-footnote {
  margin: auto 0 0;
  color: #7f8a9e;
  font-size: 11px;
}

.login-form-panel {
  display: grid;
  place-items: center;
  padding: 40px;
}

.login-form-wrap {
  width: min(430px, 100%);
}

.mobile-login-brand {
  display: none;
}

.login-heading {
  margin-bottom: 28px;
}

.login-heading h2 {
  margin: 2px 0 8px;
  font-size: 32px;
  letter-spacing: -.04em;
}

.login-heading p {
  margin: 0;
}

.login-form .field {
  margin-bottom: 17px;
}

.login-form .field input {
  height: 48px;
}

.login-recaptcha {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: center;
  margin: 1px 0 18px;
  overflow: hidden;
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.login-help {
  margin: 24px 0 0;
  text-align: center;
  font-size: 12px;
}

.channel-raster-icon {
  display: block;
  object-fit: contain;
  stroke: none;
}

.error-page {
  background: var(--bg);
}

.standalone-error {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 25px;
  padding: 30px;
}

.error-card {
  max-width: 480px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 38px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.error-mark {
  display: inline-grid;
  width: 50px;
  height: 50px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
}

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

.call-filter-bar,
.analytics-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.execution-log-filters {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 150px 150px auto;
  align-items: end;
}

.execution-log-table td {
  vertical-align: top;
}

.execution-log-table .mono-soft {
  max-width: 240px;
  overflow-wrap: anywhere;
}

.block-copy {
  display: block;
  margin-top: 4px;
}

.filter-field {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  padding: 0 10px;
}

.filter-field input,
.filter-field select {
  min-height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
}

.filter-search-field {
  min-width: 270px;
  flex: 1;
}

.filter-search-field input {
  width: 100%;
}

.date-filter span {
  color: var(--muted-light);
  font-size: 11px;
}

.simple-toolbar > div {
  display: flex;
  flex-direction: column;
}

.toolbar-caption {
  color: var(--muted-light);
  font-size: 11px;
}

.direction-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}

.direction-pill .icon {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.call-table .resource-name strong {
  font-size: 13px;
}

.call-table .resource-name small {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding: 14px 17px;
  color: var(--muted);
  font-size: 12px;
}

.disabled {
  pointer-events: none;
  opacity: .45;
}

.call-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.call-kpi-grid article {
  display: flex;
  min-height: 94px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 17px;
  box-shadow: var(--shadow-sm);
}

.call-kpi-grid small,
.call-kpi-grid strong {
  display: block;
}

.call-kpi-grid small {
  color: var(--muted);
  font-size: 11px;
}

.call-kpi-grid strong {
  margin-top: 3px;
  font-family: "Montserrat", sans-serif;
  font-size: 17px;
}

.call-kpi-icon,
.metric-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 10px;
}

.call-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}

.call-detail-main,
.call-detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-section,
.side-detail-card {
  overflow: hidden;
  padding: 22px;
}

.compact-section-heading {
  margin: 0 0 18px;
}

.compact-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-section-heading p {
  margin: 3px 0 0;
  font-size: 12px;
}

.transcript-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.transcript-turn {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.speaker-avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
}

.ai-turn .speaker-avatar {
  background: var(--accent-soft);
  color: var(--accent);
}

.transcript-turn header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.transcript-turn time {
  color: var(--muted-light);
  font-size: 10px;
}

.transcript-turn p {
  margin: 0;
  border-radius: 0 12px 12px 12px;
  background: var(--surface-soft);
  padding: 11px 13px;
  color: var(--text);
  white-space: pre-wrap;
}

.ai-turn p {
  background: var(--accent-soft);
}

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

.analysis-result-grid article {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  padding: 14px;
}

.analysis-result-grid small {
  margin-bottom: 7px;
  color: var(--muted);
}

.analysis-result-grid strong {
  font-weight: 600;
  white-space: pre-wrap;
}

.result-pre {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.tool-test-result {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tool-actions-panel {
  max-height: calc(100vh - var(--topbar-height) - 40px);
  overflow-y: auto;
}

.tool-test-card form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.tool-test-card .form-grid {
  grid-template-columns: minmax(0, 1fr);
}

.tool-test-card .tool-test-result {
  min-width: 0;
  margin-top: 2px;
}

.tool-test-result h3 {
  margin: 0 0 8px;
}

.tool-test-result .result-pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tool-test-error {
  overflow-wrap: anywhere;
}

.tool-test-result details {
  min-width: 0;
}

.tool-test-result summary {
  cursor: pointer;
  font-weight: 600;
}

.execution-list,
.execution-list article {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.execution-list article {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px;
}

.execution-list article > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.execution-list article > .status {
  position: absolute;
  align-self: flex-end;
}

.execution-list article small,
.execution-list article strong {
  display: block;
}

.execution-list article small {
  color: var(--muted);
}

.execution-list pre {
  overflow: auto;
  margin: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 11px;
  font-size: 11px;
  white-space: pre-wrap;
}

.side-detail-card h2 {
  margin-bottom: 14px;
}

.call-meta-list {
  margin: 0;
}

.call-meta-list div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border);
  padding: 10px 0;
}

.call-meta-list dt {
  color: var(--muted);
  font-size: 11px;
}

.call-meta-list dd {
  margin: 0;
  text-align: right;
  font-size: 12px;
}

.break-value {
  overflow-wrap: anywhere;
}

.call-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.call-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  min-height: 57px;
}

.call-timeline li::after {
  position: absolute;
  top: 12px;
  bottom: -2px;
  left: 5px;
  width: 1px;
  background: var(--border);
  content: "";
}

.call-timeline li:last-child::after {
  display: none;
}

.call-timeline i {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 2px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
}

.call-timeline .complete i {
  border-color: var(--green);
  background: var(--green);
}

.call-timeline strong,
.call-timeline small {
  display: block;
}

.call-timeline strong {
  font-size: 12px;
}

.call-timeline small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.analytics-filter-bar {
  margin-bottom: 20px;
}

.analytics-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analytics-metric-grid .metric-card {
  min-height: 166px;
}

.metric-icon {
  margin-bottom: 10px;
}

.blue {
  background: var(--accent-soft);
  color: var(--accent);
}

.green {
  background: var(--green-soft);
  color: var(--green);
}

.violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.token-summary-card {
  margin-top: 16px;
  padding: 22px;
}

.usage-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 11px;
}

.usage-split article {
  padding: 18px;
  border-right: 1px solid var(--border);
}

.usage-split article:last-child {
  border-right: 0;
}

.usage-split small,
.usage-split strong {
  display: block;
}

.usage-split small {
  color: var(--muted);
}

.usage-split strong {
  margin-top: 5px;
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
}

.dark-mode {
  --bg: #0d1119;
  --surface: #141a24;
  --surface-soft: #1a212c;
  --surface-raised: #19212d;
  --border: #262f3d;
  --border-strong: #344052;
  --text: #edf1f7;
  --muted: #9da8b8;
  --muted-light: #758195;
  --accent-soft: #222a54;
  color-scheme: dark;
}

.dark-mode .topbar {
  background: rgba(20, 26, 36, .92);
}

.dark-mode .nav-item.active,
.dark-mode .data-table tbody tr:hover td {
  background: #202836;
}

.dark-mode .support-card,
.dark-mode .status-published {
  background: #142a23;
}

.dark-mode .sticky-actions {
  background: rgba(20, 26, 36, .94);
}

@media (max-width: 1220px) {
  .analytics-metric-grid,
  .call-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .call-detail-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .editor-layout {
    grid-template-columns: 145px minmax(0, 1fr);
  }

  .editor-actions-panel {
    position: static;
    grid-column: 2;
    flex-direction: row;
  }

  .editor-actions-panel > * {
    flex: 1;
  }

  .compact-editor-layout {
    grid-template-columns: minmax(0, 1fr) 225px;
  }

  .compact-editor-layout .editor-actions-panel {
    grid-column: auto;
    flex-direction: column;
  }

  .dynamic-field-row {
    grid-template-columns: 24px 1fr 1fr 105px 38px;
  }

  .factor-description,
  .factor-options,
  .compact-checkbox {
    grid-column: span 1;
  }

  .factor-description {
    grid-column: 2 / span 2;
  }
}

@media (max-width: 1020px) {
  .stat-strip,
  .journey-grid,
  .resource-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-tile:nth-child(2) {
    border-right: 0;
  }

  .stat-tile:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }

  .login-shell {
    grid-template-columns: minmax(360px, .8fr) minmax(460px, 1.2fr);
  }

  .login-brand-panel {
    padding: 38px;
  }

  .login-brand-copy h1 {
    font-size: 45px;
  }
}

@media (max-width: 840px) {
  .app-shell {
    display: block;
  }

  .app-column {
    width: 100%;
  }

  .sidebar {
    transform: translateX(-102%);
    box-shadow: var(--shadow-md);
    transition: transform .2s ease;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 35;
    inset: 0;
    border: 0;
    background: rgba(17, 24, 39, .35);
  }

  .sidebar-open .sidebar-scrim,
  .sidebar-close,
  .mobile-menu {
    display: block;
  }

  .topbar {
    padding: 0 18px;
  }

  .region-item .icon,
  .plan-pill {
    display: none;
  }

  .page-content {
    padding: 27px 20px 50px;
  }

  .editor-layout,
  .compact-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .editor-tabs a {
    flex: none;
  }

  .editor-actions-panel,
  .compact-editor-layout .editor-actions-panel {
    grid-column: 1;
    flex-direction: row;
  }

  .tool-actions-panel {
    max-height: none;
    overflow: visible;
  }

  .filter-toolbar {
    flex-wrap: wrap;
  }

  .interval-control {
    margin-left: 0;
  }

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

  .call-detail-layout {
    grid-template-columns: 1fr;
  }

  .call-detail-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-shell {
    display: block;
  }

  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    min-height: 100vh;
    padding: 30px 22px;
  }

  .mobile-login-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 70px;
    font-size: 20px;
    font-weight: 750;
  }
}

@media (max-width: 620px) {
  .search-button {
    min-width: 38px;
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .search-button span,
  .search-button kbd,
  .region-item span {
    display: none;
  }

  .page-header,
  .editor-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-header > .button,
  .page-header > button {
    width: 100%;
  }

  .stat-strip,
  .journey-grid,
  .resource-grid,
  .metric-grid,
  .two-columns {
    grid-template-columns: 1fr;
  }

  .analytics-metric-grid,
  .call-kpi-grid,
  .analysis-result-grid,
  .call-detail-side,
  .usage-split {
    grid-template-columns: 1fr;
  }

  .filter-search-field,
  .filter-field,
  .call-filter-bar .button,
  .analytics-filter-bar .button {
    width: 100%;
  }

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

  .usage-split article {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .usage-split article:last-child {
    border-bottom: 0;
  }

  .stat-tile {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .stat-tile:nth-child(3) {
    border-bottom: 1px solid var(--border);
  }

  .stat-tile:last-child {
    border-bottom: 0;
  }

  .journey-card {
    padding: 20px;
  }

  .editor-actions-panel,
  .compact-editor-layout .editor-actions-panel {
    flex-direction: column;
  }

  .form-card {
    padding: 18px;
  }

  .split-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .dynamic-field-row {
    grid-template-columns: 20px 1fr 38px;
  }

  .dynamic-field-row label,
  .factor-description,
  .factor-options,
  .compact-checkbox {
    grid-column: 2;
  }

  .dynamic-field-row .danger-ghost {
    grid-column: 3;
    grid-row: 1;
  }

  .drag-handle {
    grid-column: 1;
    grid-row: 1;
  }

  .request-url-row {
    flex-direction: column;
  }

  .method-field,
  .timeout-field {
    width: 100%;
  }

  .filter-chip,
  .segmented-control {
    max-width: 100%;
    overflow-x: auto;
  }

  .filter-chip {
    width: 100%;
  }

  .danger-zone-inline {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
}

.button-ai{border:1px solid #b9c9ff;background:#f4f7ff;color:#315fcf}.button-ai:hover{background:#eaf0ff;border-color:#8facff}.button-ai .icon{color:#5279df}.page-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}

/* Product-complete UI additions. */
.brand-logo {
  display: block;
  object-fit: contain;
}

.brand-logo-full {
  width: 112px;
  max-height: 29px;
  object-position: left center;
}

.brand-logo-compact {
  display: none;
  width: 30px;
  height: 30px;
}

.sidebar-toggle {
  width: 29px;
  height: 29px;
}

.app-shell,
.sidebar,
.app-column {
  transition: grid-template-columns .2s ease, width .2s ease, margin .2s ease;
}

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

.sidebar-collapsed .sidebar {
  padding-inline: 8px;
}

.sidebar-collapsed .brand-row {
  justify-content: center;
  padding: 0;
}

.sidebar-collapsed .brand-logo-full,
.sidebar-collapsed .workspace-copy,
.sidebar-collapsed .workspace-switcher > .icon,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-item > span,
.sidebar-collapsed .sidebar-toggle {
  display: none;
}

.sidebar-collapsed .brand-logo-compact {
  display: block;
}

.sidebar-collapsed .workspace-switcher {
  justify-content: center;
  padding: 5px;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

.sidebar-collapsed .nav-item .icon {
  width: 18px;
  height: 18px;
}

.editor-header-actions,
.table-row-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.table-row-actions {
  justify-content: flex-end;
}

.editor-title > div {
  display: block;
}

.editor-tabs a.active {
  background: #fff;
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--accent);
  font-weight: 600;
}

.field-disabled {
  opacity: .48;
}

.compact-number-field {
  max-width: 260px;
  margin: 0;
}

.workflow-builder-body {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 650px;
}

.workflow-node-palette {
  border-right: 1px solid var(--border);
  background: #fafafb;
  padding: 16px 12px;
}

.node-palette-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
  padding: 0 5px;
}

.node-palette-heading strong {
  font-size: 12px;
}

.node-palette-heading small {
  color: var(--muted);
  font-size: 10px;
}

.node-palette-list {
  display: grid;
  gap: 7px;
}

.node-palette-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  padding: 7px 8px;
  text-align: left;
}

.node-palette-item:hover {
  border-color: #cbd3df;
  background: #f7f9fc;
}

.node-palette-item > span:nth-child(2) {
  min-width: 0;
}

.node-palette-item strong,
.node-palette-item small {
  display: block;
}

.node-palette-item strong {
  font-size: 11.5px;
}

.node-palette-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-palette-item > .icon {
  width: 13px;
  color: var(--muted-light);
}

.node-palette-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.workflow-builder-body .workflow-designer-grid {
  grid-template-columns: minmax(430px, 1fr) 320px;
}

.workflow-canvas {
  min-height: 650px;
}

.designer-node .icon {
  width: 18px;
  height: 18px;
}

.designer-node > .icon:last-child {
  color: var(--muted-light);
}

.designer-connector .icon {
  width: 15px;
  height: 15px;
  padding: 2px;
  background: #f8f9fc;
}

.property-empty > .icon {
  width: 30px;
  height: 30px;
  margin: 0 auto 10px;
  color: var(--muted-light);
}

.docs-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 820px);
  align-items: start;
  gap: 34px;
}

.docs-nav {
  position: sticky;
  top: calc(var(--topbar-height) + 22px);
  display: grid;
  gap: 2px;
}

.docs-nav a {
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.docs-nav a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.docs-content {
  display: grid;
  gap: 36px;
}

.docs-content section {
  scroll-margin-top: calc(var(--topbar-height) + 22px);
}

.docs-content h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.docs-content p,
.docs-content li {
  color: var(--muted);
  line-height: 1.65;
}

.docs-content ul,
.docs-content ol {
  display: grid;
  gap: 7px;
  padding-left: 20px;
}

.docs-content ul { list-style: disc; }
.docs-content ol { list-style: decimal; }

.docs-content pre {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafafb;
  padding: 16px;
  font-size: 12px;
}

.docs-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid #d9e2ff;
  border-radius: 9px;
  background: #f6f8ff;
  padding: 12px;
}

.docs-callout p {
  margin: 0;
}

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

.node-reference-grid article {
  display: flex;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px;
}

.node-reference-grid h3,
.node-reference-grid p {
  margin: 0;
}

.detail-tab-list {
  display: flex;
  gap: 22px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.detail-tab-list button {
  position: relative;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
}

.detail-tab-list button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  content: "";
}

.detail-tab-list button.active {
  color: var(--text);
}

.detail-tab-list button.active::after {
  background: var(--text);
}

.detail-tab-list button span {
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 2px 6px;
  font-size: 9px;
}

.detail-tab-panel[hidden] {
  display: none;
}

.memory-context {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  padding: 16px;
}

.memory-context > small,
.memory-context > p {
  color: var(--muted);
}

.memory-context pre {
  margin: 10px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.memory-context > p {
  margin: 0;
  font-size: 11px;
}

.caller-memory-list {
  margin-top: 12px;
}

.memory-entry-list {
  display: grid;
  gap: 10px;
}

.memory-entry-list article {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 15px;
}

.memory-entry-list header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.memory-entry-list time {
  flex: none;
  color: var(--muted);
  font-size: 10px;
}

.memory-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.memory-facts span {
  border-radius: 8px;
  background: var(--accent-soft);
  padding: 7px 9px;
  color: var(--text);
  font-size: 11px;
}

.memory-facts small {
  margin-right: 5px;
  color: var(--accent);
  font-weight: 650;
  text-transform: capitalize;
}

.current-history-call {
  background: var(--surface-soft);
}

.call-information-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.transcript-turn > div {
  min-width: 0;
}

.transcript-turn p {
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
  word-break: normal;
}

.automation-section {
  margin-top: 12px;
}

.recording-card {
  display: flex;
  min-height: 390px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  text-align: center;
}

.recording-card audio {
  width: min(540px, 100%);
  margin: 14px 0;
}

.recording-hero {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 14px;
  background: var(--rose-soft);
  color: var(--rose);
}

.recording-hero .icon {
  width: 25px;
  height: 25px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.settings-account-card {
  grid-column: 1 / -1;
}

.settings-password-form {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.settings-toggle-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.settings-toggle-form p {
  margin: 3px 0 0;
  font-size: 11px;
}

.settings-toggle-form .button {
  grid-column: 1 / -1;
  justify-self: end;
}

.test-call-layout {
  display: grid;
  grid-template-columns: minmax(0, 600px) 300px;
  align-items: start;
  gap: 18px;
}

.test-call-help {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafafb;
  padding: 18px;
}

.test-call-help > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.test-call-help ol {
  display: grid;
  gap: 9px;
  margin: 15px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1120px) {
  .workflow-builder-body {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .workflow-builder-body .workflow-designer-grid {
    grid-template-columns: 1fr;
  }

  .call-information-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 840px) {
  .sidebar-collapsed {
    --sidebar-width: 240px;
  }

  .sidebar-collapsed .brand-logo-full,
  .sidebar-collapsed .workspace-copy,
  .sidebar-collapsed .workspace-switcher > .icon,
  .sidebar-collapsed .nav-item > span,
  .sidebar-collapsed .sidebar-toggle {
    display: initial;
  }

  .sidebar-collapsed .brand-logo-compact {
    display: none;
  }

  .workflow-builder-body,
  .docs-layout,
  .test-call-layout {
    grid-template-columns: 1fr;
  }

  .workflow-node-palette {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .node-palette-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-nav {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .docs-nav a {
    flex: none;
  }
}

@media (max-width: 620px) {
  .editor-header-actions,
  .detail-tab-list {
    width: 100%;
    overflow-x: auto;
  }

  .editor-header-actions {
    justify-content: space-between;
  }

  .node-palette-list,
  .node-reference-grid,
  .call-information-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .detail-tab-list {
    gap: 17px;
  }
}

/* --------------------------------------------------------------------------
   2026 interface refresh — compact, neutral and motion-conscious
   -------------------------------------------------------------------------- */

:root {
  --bg: #f7f7f8;
  --surface: #fff;
  --surface-soft: #f4f5f6;
  --surface-raised: #fff;
  --border: #e6e8eb;
  --border-strong: #dfe2e6;
  --text: #171717;
  --muted: #666b73;
  --muted-light: #8a9099;
  --accent: #4073fd;
  --accent-dark: #3163ed;
  --accent-soft: #eef3ff;
  --shadow-sm: none;
  --shadow-md: 0 18px 48px rgba(17, 24, 39, .12);
  --radius: 12px;
  --sidebar-width: 240px;
  --topbar-height: 56px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  font-size: 13px;
  line-height: 1.45;
}

h1,
h2,
h3,
.brand,
.button {
  font-family: inherit;
}

h1 {
  margin-bottom: 5px;
  font-size: clamp(21px, 2vw, 25px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.025em;
}

h2 {
  margin-bottom: 3px;
  font-size: 15px;
  font-weight: 630;
  letter-spacing: -.012em;
}

h3 {
  font-size: 13px;
  font-weight: 620;
}

.icon {
  display: block;
  width: 17px;
  height: 17px;
  overflow: visible;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button,
a,
input,
select,
textarea,
.resource-card,
.knowledge-card,
.designer-node {
  transition-duration: 160ms;
  transition-timing-function: cubic-bezier(.2, .8, .2, 1);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(64, 115, 253, .32);
  outline-offset: 2px;
}

.sidebar {
  scrollbar-width: none;
  border-color: var(--border);
  padding: 14px 10px 12px;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.brand-row {
  min-height: 36px;
  padding: 0 8px;
}

.brand {
  gap: 8px;
  font-size: 17px;
  font-weight: 690;
  letter-spacing: -.035em;
}

.brand-mark {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 720;
  transition: transform .28s cubic-bezier(.2, .9, .2, 1), border-radius .28s ease;
}

.brand:hover .brand-mark {
  border-radius: 9px;
  transform: rotate(-5deg);
}

.workspace-switcher {
  min-height: 42px;
  margin: 13px 0 10px;
  gap: 8px;
  border-radius: 8px;
  padding: 6px 8px;
  box-shadow: none;
  transition: background .16s ease, border-color .16s ease;
}

.workspace-switcher:hover {
  border-color: var(--border-strong);
  background: #fbfbfc;
}

.flag-badge {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  font-size: 15px;
}

.workspace-copy strong {
  font-size: 12px;
  font-weight: 590;
}

.workspace-copy small {
  font-size: 9px;
}

.main-navigation {
  gap: 2px;
}

.nav-label {
  margin: 15px 9px 4px;
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .06em;
}

.nav-item {
  position: relative;
  min-height: 32px;
  gap: 9px;
  border-radius: 7px;
  padding: 0 9px;
  color: #60656d;
  font-size: 12.5px;
  font-weight: 450;
}

.nav-item .icon {
  width: 16px;
  height: 16px;
  stroke-width: 1.55;
}

.nav-item:hover,
.nav-item.active {
  background: var(--surface-soft);
  color: var(--text);
}

.nav-item.active {
  font-weight: 570;
}

.nav-item.active .icon {
  color: currentColor;
}

.sidebar-footer {
  padding-top: 18px;
}

.topbar {
  height: var(--topbar-height);
  border-color: var(--border);
  background: rgba(255, 255, 255, .88);
  padding: 0 22px;
  backdrop-filter: blur(16px) saturate(150%);
}

.topbar-left,
.topbar-actions {
  gap: 8px;
}

.region-item {
  gap: 8px;
  font-size: 12px;
}

.plan-pill {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 3px 7px;
  font-size: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  border: 0;
  background: #202124;
  font-size: 10px;
  font-weight: 620;
  box-shadow: none;
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: var(--muted);
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.icon-button:hover {
  border-color: transparent;
  background: var(--surface-soft);
}

.page-content {
  max-width: 1440px;
  padding: 27px 28px 52px;
}

.page-header,
.editor-header {
  gap: 22px;
  margin-bottom: 22px;
}

.page-header p,
.editor-header p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.eyebrow {
  display: none;
}

.button {
  min-height: 34px;
  gap: 7px;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 570;
  letter-spacing: 0;
  transition: background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}

.button .icon {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.button-primary {
  border-color: #171717;
  background: #171717;
  color: #fff;
}

.button-primary:hover {
  border-color: #303030;
  background: #303030;
}

.button-secondary {
  border-color: var(--border-strong);
  background: #fff;
}

.button-secondary:hover {
  border-color: #cfd3d9;
  background: var(--surface-soft);
}

.button-small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.content-card,
.form-card,
.resource-card,
.danger-zone-inline,
.workflow-builder,
.knowledge-card {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.content-card,
.form-card,
.resource-card,
.knowledge-card {
  background: var(--surface);
}

.stat-strip {
  margin-bottom: 28px;
  border-radius: var(--radius);
  box-shadow: none;
}

.stat-tile {
  min-height: 84px;
  gap: 11px;
  padding: 14px 16px;
}

.stat-tile:hover {
  background: #fafafb;
}

.stat-icon,
.resource-icon,
.journey-link-icon,
.form-card-icon,
.metric-icon {
  border-radius: 8px;
}

.stat-icon {
  width: 34px;
  height: 34px;
}

.stat-tile small,
.metric-label {
  font-size: 10.5px;
}

.stat-tile strong {
  font-size: 19px;
  font-weight: 650;
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading p,
.subsection-heading p {
  font-size: 12px;
}

.journey-grid,
.resource-grid {
  gap: 12px;
}

.journey-card {
  min-height: 280px;
  gap: 10px;
  border-radius: var(--radius);
  background: #fafafb;
  padding: 20px;
}

.journey-number {
  top: 10px;
  right: 15px;
  color: #e7e8ea;
  font-size: 38px;
}

.journey-link {
  min-height: 58px;
  border-radius: 9px;
  padding: 8px 10px;
  transform: none !important;
}

.journey-link:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.journey-link-icon {
  width: 33px;
  height: 33px;
}

.table-toolbar {
  min-height: 56px;
  padding: 9px 13px;
}

.table-search {
  width: min(300px, 60%);
  border-radius: 7px;
  padding: 0 9px;
}

.table-search input {
  height: 34px;
  font-size: 12px;
}

.data-table th {
  height: 38px;
  background: #fafafb;
  font-size: 10px;
  font-weight: 570;
  letter-spacing: .01em;
  text-transform: none;
}

.data-table th,
.data-table td {
  padding: 9px 14px;
}

.data-table td {
  height: 58px;
}

.data-table tbody tr {
  transition: background .14s ease;
}

.data-table tbody tr:hover {
  background: #fafafb;
}

.status,
.soft-pill,
.capability-list span {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 550;
}

.resource-card {
  min-height: 190px;
  padding: 17px;
  transform: none !important;
}

a.resource-card:hover,
.knowledge-card:hover {
  border-color: #cfd3da;
  background: #fafafb;
  box-shadow: none;
}

.resource-card h2 {
  margin-top: 14px;
}

.resource-icon {
  width: 34px;
  height: 34px;
}

.form-card {
  padding: 19px;
}

.form-card-heading {
  gap: 10px;
  margin-bottom: 18px;
}

.form-card-icon {
  width: 35px;
  height: 35px;
}

.field {
  gap: 5px;
  margin-bottom: 13px;
}

.field > span:first-child,
.dynamic-field-row label > span {
  font-size: 11px;
  font-weight: 560;
}

.field input,
.field textarea,
.field select,
.premium-select-trigger {
  min-height: 40px;
  border-color: var(--border-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  box-shadow: none;
}

.premium-select-menu {
  border-radius: 9px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, .1);
  transform-origin: top;
}

.premium-select.open .premium-select-menu {
  animation: menu-in .14s cubic-bezier(.2, .8, .2, 1) both;
}

.metric-grid {
  gap: 12px;
}

.metric-card {
  min-height: 122px;
  border-color: var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: none;
}

.metric-card strong {
  font-family: inherit;
  font-size: 22px;
  font-weight: 650;
}

.analytics-filter-bar,
.call-filter-bar,
.analytics-tabs,
.settings-tabs {
  border-color: var(--border);
  box-shadow: none;
}

.modal-backdrop {
  background: rgba(17, 17, 17, .4);
  backdrop-filter: blur(2px);
}

.modal-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, .18);
  animation: modal-in .2s cubic-bezier(.2, .85, .25, 1) both;
}

.flash {
  border-radius: 9px;
  animation: page-in .2s ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-3px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.page-content > * {
  animation: page-in .24s cubic-bezier(.2, .8, .2, 1) both;
}

.page-content > :nth-child(2) { animation-delay: 35ms; }
.page-content > :nth-child(3) { animation-delay: 70ms; }
.page-content > :nth-child(4) { animation-delay: 105ms; }
.page-content > :nth-child(n+5) { animation-delay: 130ms; }

.dark-mode {
  --bg: #111214;
  --surface: #161719;
  --surface-soft: #1d1f22;
  --surface-raised: #1b1d20;
  --border: #292b2f;
  --border-strong: #34373c;
  --text: #f3f3f3;
  --muted: #a4a7ad;
  --muted-light: #7f848c;
  --accent-soft: #1f2d54;
}

.dark-mode .topbar {
  background: rgba(22, 23, 25, .88);
}

.dark-mode .button-primary {
  border-color: #f3f3f3;
  background: #f3f3f3;
  color: #171717;
}

.dark-mode .workspace-switcher:hover,
.dark-mode .plan-pill,
.dark-mode .button-secondary,
.dark-mode .field input,
.dark-mode .field textarea,
.dark-mode .field select,
.dark-mode .premium-select-trigger {
  background: var(--surface);
}

.dark-mode .data-table th,
.dark-mode .journey-card,
.dark-mode .stat-tile:hover,
.dark-mode .data-table tbody tr:hover,
.dark-mode a.resource-card:hover,
.dark-mode .knowledge-card:hover {
  background: #1a1b1e;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 840px) {
  .topbar {
    padding: 0 14px;
  }

  .page-content {
    padding: 23px 18px 44px;
  }
}

@media (max-width: 620px) {
  .page-header,
  .editor-header {
    gap: 14px;
  }

  .page-header > .button,
  .page-header > button {
    width: auto;
  }

  .journey-card {
    min-height: 0;
  }
}

/* Screenshot-aligned shell and page composition. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f6f8;
  --border: #e5e7eb;
  --border-strong: #d9dde3;
  --text: #1c2434;
  --muted: #697181;
  --muted-light: #9299a5;
  --accent: #356ff6;
  --accent-dark: #255fe4;
  --sidebar-width: 240px;
  --topbar-height: 56px;
}

body,
.app-column {
  background: #fff;
}

.app-shell {
  background: #fff;
}

.sidebar {
  background: #fbfbfc;
  padding: 17px 9px 12px;
}

.brand-row {
  min-height: 39px;
  padding-inline: 11px;
}

.brand {
  font-size: 18px;
  font-weight: 720;
  color: #151922;
}

.brand-mark {
  width: 23px;
  height: 23px;
  border-radius: 6px;
  background: #151922;
  font-size: 12px;
  transform: none;
}

.workspace-switcher {
  height: 44px;
  margin: 11px 0 13px;
  border-color: #dfe3e8;
  border-radius: 8px;
  padding: 6px 9px;
  background: #fff;
}

.workspace-copy strong {
  font-size: 12.5px;
  font-weight: 600;
}

.workspace-copy small {
  display: none;
}

.workspace-switcher > .icon {
  width: 14px;
  height: 14px;
}

.nav-label {
  margin: 16px 10px 5px;
  color: #8ea0b8;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .04em;
}

.nav-item {
  min-height: 34px;
  gap: 9px;
  padding: 0 10px;
  color: #535a66;
  font-size: 12.5px;
}

.nav-item:hover {
  background: #f3f5f7;
}

.nav-item.active {
  background: #f0f3f7;
  color: #20242c;
  font-weight: 600;
}

.topbar {
  padding: 0 25px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.region-item {
  color: #5f6878;
  font-size: 12.5px;
}

.region-item strong {
  color: #252b36;
  font-weight: 650;
}

.plan-pill {
  border: 0;
  background: #f3f4f6;
  color: #687080;
  padding: 4px 8px;
  font-size: 10.5px;
}

.page-content {
  max-width: none;
  margin: 0;
  padding: 25px 29px 48px;
}

.page-header,
.editor-header {
  margin-bottom: 24px;
}

.page-header h1,
.editor-header h1 {
  margin: 0 0 2px;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.015em;
}

.page-header p,
.editor-header p {
  color: #657084;
  font-size: 13px;
  line-height: 1.45;
}

.page-header .button .icon,
.page-header > button .icon {
  display: none;
}

.button {
  min-height: 35px;
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 570;
}

.button-primary {
  border-color: #111827;
  background: #111827;
}

.button-primary:hover {
  border-color: #202a3a;
  background: #202a3a;
}

.button-secondary {
  border-color: #dfe3e8;
  background: #fff;
  color: #343b48;
}

.content-card:has(> .empty-state),
.content-card:has(> .small-empty) {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.resource-grid:has(> .empty-state.full-span) {
  display: block;
}

.empty-state {
  min-height: calc(100vh - var(--topbar-height) - 150px);
  padding: 44px 20px 110px;
}

.small-empty {
  min-height: 360px;
  padding-bottom: 44px;
}

.empty-state .empty-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 13px;
  border-radius: 12px;
}

.empty-state .empty-icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
}

.empty-state h2 {
  margin-bottom: 5px;
  font-size: 17px;
  font-weight: 650;
}

.empty-state p {
  max-width: 360px;
  margin-bottom: 16px;
  color: #717784;
  font-size: 13.5px;
  line-height: 1.55;
}

.empty-state > .button,
.empty-state > a.button {
  width: min(100%, 340px);
  min-height: 42px;
}

.content-card,
.form-card,
.resource-card,
.knowledge-card,
.metric-card,
.stat-strip,
.workflow-builder {
  border-color: #e4e7eb;
  border-radius: 10px;
}

.table-toolbar {
  min-height: 58px;
  padding-inline: 15px;
}

.data-table th {
  background: #fafafa;
  color: #747b87;
}

.data-table td {
  border-color: #eceef1;
}

.resource-card,
.knowledge-card,
.metric-card,
.form-card {
  box-shadow: none;
}

.resource-card:hover,
.knowledge-card:hover {
  background: #fcfcfd;
}

.stat-strip {
  overflow: hidden;
}

.journey-card {
  border-color: #e5e7eb;
  background: #fbfbfc;
}

.journey-number {
  color: #e8eaed;
}

.dark-mode {
  --bg: #111214;
  --surface: #161719;
  --surface-soft: #1d1f22;
  --border: #292b2f;
  --border-strong: #34373c;
  --text: #f3f3f3;
  --muted: #a4a7ad;
  --muted-light: #7f848c;
}

.dark-mode,
.dark-mode .app-column,
.dark-mode .app-shell {
  background: var(--bg);
}

.dark-mode .sidebar {
  background: #141517;
}

.dark-mode .workspace-switcher,
.dark-mode .topbar {
  background: rgba(22, 23, 25, .96);
}

@media (max-width: 840px) {
  .page-content {
    padding: 22px 18px 42px;
  }

  .topbar {
    padding: 0 14px;
  }
}

@media (max-width: 620px) {
  .page-header {
    margin-bottom: 20px;
  }

  .page-header > .button,
  .page-header > button {
    width: 100%;
  }

  .empty-state {
    min-height: 480px;
    padding: 36px 12px 70px;
  }
}

/* Final shell/docs overrides live last so the screenshot-aligned layer cannot supersede them. */
.sidebar {
  padding-top: 0;
}

.brand-logo-full {
  width: 172px;
  height: auto;
  max-height: 32px;
}

.brand-logo-compact {
  width: 28px;
  height: 28px;
}

.brand-row {
  height: var(--topbar-height);
  justify-content: flex-start;
  min-height: var(--topbar-height);
  flex: none;
}

.topbar-sidebar-toggle {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
}

.topbar-sidebar-toggle:hover {
  background: var(--surface-soft);
}

.docs-page-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.docs-layout {
  grid-template-columns: 220px minmax(0, 860px);
  gap: 28px;
  max-width: 1120px;
}

.docs-nav {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}

.docs-nav-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
  padding: 9px 9px 12px;
  border-bottom: 1px solid var(--border);
}

.docs-nav-heading > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}

.docs-nav-heading strong,
.docs-nav-heading small {
  display: block;
}

.docs-nav-heading strong {
  color: var(--text);
  font-size: 12px;
}

.docs-nav-heading small {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 10px;
}

.docs-nav a {
  display: flex;
  align-items: center;
  min-height: 34px;
  border-radius: 7px;
  padding: 0 10px;
}

.docs-nav a.active {
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 600;
}

.docs-nav .docs-nav-back {
  gap: 7px;
  margin-top: 7px;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding-top: 8px;
  color: var(--text);
}

.docs-content {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
}

.docs-content section {
  padding: 30px 32px;
}

.docs-content section + section {
  border-top: 1px solid var(--border);
}

.docs-content .docs-intro {
  padding-top: 34px;
}

.docs-section-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.docs-content h2 {
  margin-bottom: 7px;
  font-size: 17px;
  font-weight: 650;
}

.docs-content p,
.docs-content li {
  font-size: 13px;
  line-height: 1.65;
}

.node-reference-grid {
  margin-top: 16px;
}

.node-reference-grid article {
  background: #fbfbfc;
}

.docs-content pre {
  margin: 15px 0 0;
  border-color: #dfe3e8;
  background: #f7f8fa;
}

.dark-mode .docs-nav,
.dark-mode .docs-content,
.dark-mode .node-reference-grid article {
  background: var(--surface);
}

@media (max-width: 840px) {
  .topbar-sidebar-toggle {
    display: none;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .docs-nav-heading,
  .docs-nav .docs-nav-back {
    display: none;
  }

  .docs-nav a {
    flex: none;
  }

  .docs-content section {
    padding: 24px 20px;
  }
}

.editor-tabs a:hover,
.editor-tabs a.active {
  background: transparent;
  color: var(--text);
}

.editor-tabs a.active {
  box-shadow: none;
  font-weight: 650;
}

/* Freeform workflow builder and compact operations UI. */
.brand-logo-compact {
  width: 38px;
  height: 38px;
}

.nav-item .icon {
  width: 18px;
  height: 18px;
}

.sidebar-collapsed .nav-item .icon {
  width: 20px;
  height: 20px;
}

.workflow-editor-form {
  min-width: 0;
}

.workflow-toolbar-actions {
  display: flex;
  gap: 8px;
}

.workflow-settings-fields {
  display: grid;
  gap: 16px;
  padding: 20px 24px 4px;
}

.workflow-builder-body {
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 720px;
}

.workflow-builder-body .workflow-designer-grid {
  grid-template-columns: minmax(520px, 1fr) 330px;
  min-width: 0;
}

.workflow-node-palette,
.workflow-properties {
  max-height: 720px;
  overflow-y: auto;
}

.workflow-canvas {
  position: relative;
  display: block;
  overflow: auto;
  min-height: 720px;
  padding: 0;
  background-color: #fafbfc;
  background-image: radial-gradient(#d6dce5 1px, transparent 1px);
  background-size: 20px 20px;
  overscroll-behavior: contain;
}

.workflow-node-layer,
.workflow-edge-layer {
  position: absolute;
  inset: 0;
  width: 1500px;
  height: 900px;
}

.workflow-edge-layer {
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.workflow-edge-layer marker path {
  fill: #9aa5b4;
}

.workflow-node-layer {
  z-index: 2;
}

.designer-node {
  position: absolute;
  display: grid;
  grid-template-columns: 20px 38px minmax(0, 1fr);
  width: 236px;
  min-height: 76px;
  touch-action: none;
  user-select: none;
  cursor: grab;
  box-shadow: 0 5px 18px rgba(18, 27, 42, .055);
}

.designer-node:active,
.designer-node.dragging {
  cursor: grabbing;
}

.designer-node.dragging {
  z-index: 5;
  opacity: .92;
  box-shadow: 0 14px 32px rgba(18, 27, 42, .14);
}

.designer-node.selected {
  outline: 3px solid rgba(64, 115, 253, .12);
}

.designer-node-icon {
  width: 38px;
  height: 38px;
}

.node-port {
  position: absolute;
  top: calc(50% - 6px);
  z-index: 3;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #9aa5b4;
  box-shadow: 0 0 0 1px #aab3c0;
}

.node-port-input { left: -7px; }
.node-port-output { right: -7px; }

.workflow-edge {
  fill: none;
  stroke: #9aa5b4;
  stroke-width: 2;
}

.workflow-edge.edge-success { stroke: #159a72; }
.workflow-edge.edge-danger { stroke: #d75963; }

.workflow-edge-label {
  fill: #637083;
  font-size: 11px;
  font-weight: 650;
  paint-order: stroke;
  stroke: #fafbfc;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.workflow-edge-label.edge-success { fill: #117a5d; }
.workflow-edge-label.edge-danger { fill: #be414c; }

.canvas-help {
  position: sticky;
  top: 14px;
  left: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  margin: 14px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 11px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--border);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.canvas-help .icon {
  width: 14px;
  height: 14px;
}

.service-report {
  overflow: hidden;
  padding: 0;
}

.service-report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.service-report-heading h2,
.service-report-heading p {
  margin: 0;
}

.service-report-heading p {
  margin-top: 4px;
}

.service-report-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) 120px repeat(4, minmax(84px, .7fr));
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 10px 22px;
  border-bottom: 1px solid #eceef1;
}

.service-report-row:last-child { border-bottom: 0; }

.service-report-labels {
  min-height: 38px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #fafafa;
}

.service-name-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.service-name-cell div {
  display: grid;
  gap: 3px;
}

.service-name-cell small {
  color: var(--muted);
  font-size: 10px;
}

.service-report-row.service-unavailable {
  color: var(--muted);
  background: #fcfcfd;
}

@media (max-width: 1180px) {
  .workflow-builder-body .workflow-designer-grid {
    grid-template-columns: minmax(480px, 1fr);
  }
  .workflow-properties {
    max-height: none;
    border-top: 1px solid var(--border);
  }
  .service-report-table { overflow-x: auto; }
  .service-report-row { min-width: 850px; }
}

@media (max-width: 760px) {
  .workflow-builder-body { grid-template-columns: 1fr; }
  .workflow-node-palette { max-height: none; border-right: 0; border-bottom: 1px solid var(--border); }
  .node-palette-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-toolbar-actions { width: 100%; flex-wrap: wrap; }
}

.settings-page-header {
  margin-bottom: 10px;
}

.settings-console {
  background: transparent;
}

.settings-tab-list {
  overflow-x: auto;
  justify-content: flex-start;
  border-bottom: 1px solid var(--border);
}

.settings-tab-list button {
  flex: none;
  border-radius: 0;
}

.settings-tab-panel {
  padding: 28px 0 60px;
}

.settings-column {
  width: min(100%, 680px);
}

.settings-column-wide {
  width: min(100%, 920px);
}

.settings-section-heading {
  margin-bottom: 24px;
}

.settings-section-heading h2,
.settings-section-heading p,
.settings-column h3 {
  margin: 0;
}

.settings-section-heading p {
  margin-top: 5px;
}

.settings-column h3 {
  margin-bottom: 14px;
  font-size: 15px;
}

.settings-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-profile > div {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.settings-profile small,
.muted-copy {
  color: var(--muted);
}

.settings-divider {
  margin: 28px 0 22px;
  border-top: 1px solid var(--border);
}

.settings-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.settings-switch-row > div {
  display: grid;
  gap: 4px;
}

.settings-switch-row small {
  color: var(--muted);
}

.settings-inline-form {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  align-items: end;
  gap: 14px;
}

.settings-key-list,
.settings-connection-list {
  display: grid;
  gap: 0;
}

.settings-key-list > form,
.settings-connection-list > article {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.settings-key-list header,
.settings-connection-list article > header,
.settings-number-list header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.settings-key-list header > div,
.settings-connection-list header > div,
.settings-number-list header > div {
  display: grid;
  gap: 4px;
}

.settings-key-list small,
.settings-connection-list small,
.settings-number-list small {
  color: var(--muted);
}

.settings-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.settings-form-actions select {
  min-height: 36px;
}

.secret-reveal {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid #b8dfd2;
  border-radius: 9px;
  background: #f2fbf7;
}

.secret-reveal p { margin: 3px 0 0; }
.secret-reveal code { overflow-wrap: anywhere; user-select: all; }

.settings-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding: 13px 14px;
  color: #46546a;
  background: #f4f7fb;
  border-radius: 8px;
}

.settings-info .icon { flex: none; width: 18px; height: 18px; }
.settings-info p { margin: 0; }

.settings-number-list {
  display: grid;
  gap: 14px;
}

.settings-number-list > form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.settings-number-list header { grid-column: 1 / -1; }

@media (max-width: 820px) {
  .settings-inline-form,
  .settings-number-list > form { grid-template-columns: 1fr; }
  .settings-number-list header { grid-column: auto; }
}

/* Final alignment pass for settings, dialogs and the standalone Learn section. */
.nav-label-learn {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

.modal {
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  width: min(570px, 100%);
  max-height: calc(100vh - 48px);
  margin: 0;
}

.workflow-settings-modal {
  width: min(720px, 100%);
}

.workflow-settings-modal > header {
  min-height: 86px;
  padding: 20px 26px;
}

.workflow-settings-modal > header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.workflow-settings-modal > header .icon-button {
  flex: none;
  margin-right: -6px;
}

.workflow-settings-fields {
  gap: 18px;
  padding: 24px 26px 26px;
}

.workflow-settings-fields .form-grid {
  gap: 18px;
}

.workflow-settings-fields .field {
  gap: 7px;
  margin: 0;
}

.workflow-settings-fields .premium-select-trigger {
  min-height: 42px;
}

.workflow-settings-fields textarea {
  min-height: 72px;
}

.workflow-settings-modal > footer {
  min-height: 66px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 13px 26px;
  border-top: 1px solid var(--border);
}

.workflow-settings-modal > footer .button {
  min-width: 84px;
  min-height: 40px;
}

.settings-inline-form {
  align-items: start;
}

.settings-inline-form > .button {
  align-self: start;
  min-height: 42px;
  margin-top: 22px;
  white-space: nowrap;
}

.settings-inline-form .field,
.settings-number-list > form .field {
  gap: 7px;
}

.settings-console .premium-select-trigger {
  min-height: 42px;
}

#smtp-settings .checkbox-field {
  width: fit-content;
  min-height: 32px;
  margin-top: 10px;
}

#smtp-settings form > .button {
  min-height: 40px;
  margin-top: 10px;
}

.settings-number-list > form {
  row-gap: 14px;
  padding: 18px;
}

.settings-number-list > form > .button {
  min-width: 72px;
  min-height: 42px;
}

.settings-number-list header {
  margin-bottom: 2px;
}

.settings-info {
  line-height: 1.45;
}

@media (max-width: 760px) {
  .modal {
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
  }

  .workflow-settings-modal > header,
  .workflow-settings-fields,
  .workflow-settings-modal > footer {
    padding-inline: 18px;
  }

  .workflow-detail-grid,
  .workflow-settings-fields .two-columns {
    grid-template-columns: 1fr;
  }

  .settings-inline-form > .button {
    margin-top: 0;
  }
}
.template-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.template-actions form { margin: 0; }
.template-rejection { display: block; margin: 7px 0 0 46px; max-width: 420px; }

/* Shared empty-record presentation. Keep every list page visually consistent,
   whether the state is rendered directly in a grid or inside a content card. */
.content-card.empty-state,
.content-card:has(> .empty-state) {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.empty-state {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-height: 360px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 56px 24px;
  text-align: center;
}

.empty-state .empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  margin: 0 0 14px;
  border-radius: 12px;
}

.empty-state .empty-icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
}

.empty-state h2,
.empty-state h3 {
  margin: 0 0 7px;
  color: #202735;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
}

.empty-state p {
  width: min(100%, 520px);
  max-width: 520px;
  margin: 0 auto 18px;
  color: #717784;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.empty-state > .button,
.empty-state > a.button {
  width: min(100%, 340px);
  min-height: 42px;
}

/* Detail-panel states use the same geometry as page-level empty states so the
   portal never presents competing empty-record patterns. */
.empty-state.small-empty {
  min-height: 360px;
  padding: 56px 24px;
}

@media (max-width: 620px) {
  .empty-state,
  .empty-state.small-empty {
    min-height: 320px;
    padding: 40px 16px;
  }
}

.template-import-status {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.template-import-list {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.template-import-item {
  display: grid;
  grid-template-columns: 18px 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  cursor: pointer;
}

.template-import-item + .template-import-item {
  border-top: 1px solid var(--border);
}

.template-import-item:hover {
  background: #fafbfc;
}

.template-import-item.is-imported {
  cursor: default;
  background: #f7f8fa;
  opacity: .72;
}

.template-import-item input {
  margin: 3px 0 0;
}

.template-import-whatsapp-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
  object-fit: contain;
}

.template-import-item strong,
.template-import-item small {
  display: block;
}

.template-import-item strong {
  color: var(--text);
  font-size: 12.5px;
}

.template-import-item small {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 10.5px;
}

.template-import-item p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.workflow-template-preview {
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid #dfe5ec;
  border-radius: 9px;
  background: #f8fafc;
}

.workflow-template-preview strong,
.workflow-template-preview small {
  display: block;
}

.workflow-template-preview strong {
  color: var(--text);
  font-size: 11.5px;
}

.workflow-template-preview p {
  margin: 6px 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.workflow-template-preview small {
  color: var(--muted);
  font-size: 10.5px;
}

.workflow-object-properties {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid #dfe5ec;
  border-radius: 9px;
  background: #f8fafc;
}

.workflow-object-properties strong {
  color: var(--text);
  font-size: 11.5px;
}

.workflow-object-properties small {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.workflow-object-property-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.workflow-object-property-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe5ec;
  border-radius: 7px;
  background: #fff;
}

.workflow-object-property-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workflow-object-property-header strong {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.workflow-object-property-row .field {
  min-width: 0;
  margin: 0;
}

.workflow-object-property-row .field input {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.workflow-object-property-remove {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  color: var(--muted);
}

.workflow-object-property-remove:hover {
  color: var(--danger);
  background: #fff1f2;
}

.workflow-object-property-required {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 10.5px;
}

.workflow-object-property-required input {
  margin: 0;
}

/* Campaigns and audiences use the same calm, staged layout as the resource editors. */
.campaign-wizard {
  width: min(100%, 1120px);
}

.campaign-wizard > .form-card + .form-card {
  margin-top: 16px;
}

.campaign-wizard .form-card {
  padding: 0;
}

.campaign-wizard .form-card-heading {
  padding: 22px 24px 18px;
}

.campaign-create-modal {
  width: min(1040px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
}

.campaign-create-modal > header {
  align-items: flex-start;
  padding: 23px 26px 18px;
}

.campaign-create-modal > header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.campaign-create-modal > header .eyebrow .icon {
  width: 13px;
  height: 13px;
}

.campaign-create-modal > header h2 {
  margin-top: 7px;
  font-size: 24px;
}

.campaign-create-modal > header p {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.campaign-create-modal > .campaign-wizard {
  width: auto;
  padding: 0 26px 26px;
}

.campaign-create-modal .campaign-stepper {
  margin-top: 4px;
}

.campaign-create-modal .campaign-step {
  border: 1px solid var(--border);
  border-radius: 12px;
}

.channel-multi-menu {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 380px;
  gap: 4px;
  padding: 8px;
}

.channel-multi-menu > label {
  min-height: 52px;
  border: 1px solid transparent;
  padding: 8px 10px;
}

.channel-multi-menu > label.selected {
  border-color: rgba(82, 103, 242, .2);
  background: #f5f6ff;
}

.channel-multi-menu > label > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

@media (max-width: 680px) {
  .campaign-create-modal > header,
  .campaign-create-modal > .campaign-wizard {
    padding-left: 18px;
    padding-right: 18px;
  }

  .channel-multi-menu {
    grid-template-columns: 1fr;
  }
}

/* Audience upload lives on the audience directory as a focused modal. */
.audience-upload-modal {
  width: min(720px, calc(100% - 28px));
}

.audience-upload-modal > header {
  align-items: flex-start;
  padding: 24px 26px 20px;
}

.audience-upload-modal > header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.audience-upload-modal > header .eyebrow .icon {
  width: 13px;
  height: 13px;
}

.audience-upload-modal > header h2 {
  margin-top: 7px;
  font-size: 24px;
}

.audience-upload-modal > header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.audience-upload-modal > form {
  gap: 18px;
  padding: 24px 26px 26px;
}

.audience-upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

.audience-file-drop {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed #a78bfa;
  border-radius: 14px;
  background: linear-gradient(145deg, #fbfaff, #f5f3ff);
  color: var(--text);
  cursor: pointer;
  flex-direction: column;
  text-align: center;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.audience-file-drop:hover,
.audience-file-drop:focus-within {
  border-color: var(--accent);
  background: #f2efff;
  transform: translateY(-1px);
}

.audience-file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.audience-file-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: #e9e3ff;
  color: var(--accent);
}

.audience-file-icon .icon {
  width: 22px;
  height: 22px;
}

.audience-file-drop strong {
  font-size: 14px;
}

.audience-file-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audience-file-name.has-file {
  color: var(--accent);
  font-weight: 700;
}

.audience-file-drop small {
  color: var(--muted);
  font-size: 11px;
}

.audience-upload-fields {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid #ddd6fe;
  border-radius: 11px;
  background: #faf9ff;
  padding: 13px 14px;
}

.audience-upload-fields-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border-radius: 9px;
  background: #ebe7ff;
  color: var(--accent);
}

.audience-upload-fields-icon .icon {
  width: 16px;
  height: 16px;
}

.audience-upload-fields strong {
  display: block;
  font-size: 12px;
}

.audience-upload-fields p {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.45;
}

.audience-upload-error {
  margin: -5px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.audience-upload-modal > form > footer {
  margin: 2px -26px -26px;
  padding: 15px 26px;
}

.audience-upload-modal .button.is-loading {
  opacity: .72;
  cursor: wait;
}

@media (max-width: 680px) {
  .audience-upload-grid {
    grid-template-columns: 1fr;
  }

  .audience-upload-modal > header,
  .audience-upload-modal > form {
    padding-left: 18px;
    padding-right: 18px;
  }

  .audience-upload-modal > form > footer {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
  }
}

.campaign-wizard .form-card > .field,
.campaign-wizard .form-card > .form-grid,
.campaign-wizard .campaign-channel-panel {
  margin-right: 24px;
  margin-left: 24px;
}

.campaign-wizard .form-card > .field:last-child,
.campaign-wizard .campaign-channel-panel:last-child {
  margin-bottom: 24px;
}

.campaign-channel-panel {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.campaign-review-card .button,
.audience-upload-note {
  margin-bottom: 24px;
}

.campaign-review-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 24px 18px;
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

.campaign-review-note .icon {
  width: 16px;
  color: var(--accent);
}

.campaign-review-card > .button {
  margin-left: 24px;
}

.audience-progress-cell {
  min-width: 220px;
}

.audience-progress-cell progress {
  display: block;
  width: 100%;
  height: 8px;
  margin-bottom: 5px;
  accent-color: var(--accent);
}

.audience-completed-badge {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 650;
}

.audience-progress-error {
  display: block;
  margin-top: 5px;
  color: var(--danger);
  line-height: 1.45;
}

.table-scroll {
  overflow-x: auto;
}

.audience-list-card .data-table {
  min-width: 860px;
}

.campaign-wizard-multistep {
  width: min(100%, 1120px);
}

.campaign-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}

.campaign-stepper-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  min-width: 0;
  align-items: center;
  column-gap: 8px;
  color: var(--muted-light);
}

.campaign-stepper-item span {
  display: grid;
  width: 28px;
  height: 28px;
  grid-row: span 2;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 750;
}

.campaign-stepper-item strong {
  font-size: 12px;
  line-height: 1.2;
}

.campaign-stepper-item small {
  font-size: 10px;
}

.campaign-stepper-item.is-active {
  color: var(--text);
}

.campaign-stepper-item.is-active span {
  background: var(--accent);
  color: #fff;
}

.campaign-stepper-line {
  height: 1px;
  flex: 1;
  min-width: 18px;
  background: var(--border-strong);
}

.campaign-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 24px 24px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.campaign-step-actions-end {
  justify-content: flex-end;
}

.campaign-step-error {
  margin: 0 auto 0 0;
  color: var(--danger);
  font-size: 11px;
  font-weight: 650;
}

.campaign-panel-heading,
.campaign-preview-heading,
.campaign-schedule-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.campaign-panel-heading {
  margin-bottom: 14px;
}

.campaign-panel-heading .form-card-icon {
  width: 34px;
  height: 34px;
}

.campaign-panel-heading h3,
.campaign-panel-heading p {
  margin-bottom: 0;
}

.campaign-audience-preview {
  margin: 18px 24px 0;
  border: 1px solid #ddd8ff;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbfaff, #f7f9ff);
  padding: 16px;
}

.campaign-preview-heading {
  justify-content: space-between;
  margin-bottom: 13px;
}

.campaign-preview-heading h3,
.campaign-preview-heading p {
  margin-bottom: 0;
}

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

.campaign-group-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 12px;
}

.campaign-group-card strong {
  margin-bottom: 2px;
  font-size: 12px;
}

.campaign-group-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.campaign-group-card b {
  color: var(--text);
}

.campaign-channel-breakdown {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

.campaign-channel-breakdown > strong {
  grid-column: 1 / -1;
}

.campaign-template-help {
  align-self: end;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 12px;
}

.campaign-template-help strong,
.campaign-template-help p {
  display: block;
  margin-bottom: 5px;
}

.campaign-template-help p {
  font-size: 11px;
}

.campaign-review-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 24px 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border);
}

.campaign-review-summary > div {
  min-width: 0;
  background: var(--surface-soft);
  padding: 12px;
}

.campaign-review-summary small,
.campaign-review-summary strong {
  display: block;
}

.campaign-review-summary small {
  margin-bottom: 3px;
  color: var(--muted-light);
  font-size: 10px;
}

.campaign-review-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.campaign-schedule-heading {
  justify-content: space-between;
  margin: 0 24px 12px;
}

.campaign-schedule-heading h3,
.campaign-schedule-heading p {
  margin-bottom: 0;
}

.campaign-schedule-grid {
  display: grid;
  gap: 8px;
  margin: 0 24px;
}

.campaign-schedule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 14px 82px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
}

.campaign-schedule-row > span:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.campaign-schedule-row small {
  color: var(--muted-light);
  font-size: 10px;
}

.campaign-detail-header .eyebrow,
.campaign-journey-card .eyebrow,
.campaign-review-workspace .eyebrow {
  display: block;
  margin-bottom: 6px;
}

.campaign-back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.campaign-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 20px 20px;
}

.campaign-channel-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.campaign-channel-card > header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 15px;
}

.campaign-channel-card > header h3,
.campaign-channel-card > header small {
  display: block;
  margin: 0;
}

.campaign-channel-card > header small {
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 750;
}

.campaign-channel-card > header > strong {
  font-size: 20px;
}

.campaign-channel-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 15px 8px;
}

.campaign-channel-metadata span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 10px;
}

.campaign-channel-metadata strong {
  font-size: 15px;
}

.campaign-channel-metadata small,
.campaign-window-pills span {
  color: var(--muted);
  font-size: 10px;
}

.campaign-window-pills {
  display: flex;
  min-height: 38px;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 15px 12px;
}

.campaign-window-pills span {
  border-radius: 999px;
  background: #f3f1fb;
  padding: 5px 8px;
  text-transform: capitalize;
}

.campaign-channel-card > footer {
  border-top: 1px solid var(--border);
  padding: 12px 15px;
}

.campaign-channel-card > footer .button {
  width: 100%;
}

.campaign-channel-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  background: #eef2ff;
  color: #5267d8;
}

.campaign-channel-whatsapp .campaign-channel-icon,
[data-campaign-channel-form="whatsapp"] .campaign-channel-icon {
  background: #e9f9ef;
  color: #159455;
}

.campaign-channel-call .campaign-channel-icon,
[data-campaign-channel-form="call"] .campaign-channel-icon {
  background: #f1edff;
  color: var(--accent);
}

.campaign-channel-icon .icon {
  width: 19px;
  height: 19px;
}

.campaign-time-grid {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.campaign-time-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px;
  color: var(--text);
}

.campaign-time-child:hover {
  border-color: #c8bdf8;
  background: #faf9ff;
}

.campaign-time-child > span:nth-child(2) {
  text-align: right;
}

.campaign-time-child strong,
.campaign-time-child small,
.campaign-time-child b {
  display: block;
  text-transform: capitalize;
}

.campaign-time-child small {
  color: var(--muted);
  font-size: 10px;
}

.campaign-time-child .status {
  grid-column: 1 / -1;
  width: max-content;
}

.campaign-time-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 20px 20px;
}

.campaign-time-detail-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
}

.campaign-time-detail-card.is-approved {
  border-color: #cce8d6;
  box-shadow: inset 3px 0 #31a769;
}

.campaign-time-detail-card > header,
.campaign-time-detail-card > footer,
.campaign-review-toolbar {
  display: flex;
  align-items: center;
}

.campaign-time-detail-card > header,
.campaign-time-detail-card > footer {
  justify-content: space-between;
  gap: 10px;
}

.campaign-time-detail-card h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.campaign-window-label {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.campaign-time-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 15px 0;
}

.campaign-time-detail-stats span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 9px;
}

.campaign-time-detail-stats small {
  color: var(--muted);
  font-size: 9px;
}

.campaign-time-detail-stats strong {
  overflow: hidden;
  margin-top: 3px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-review-toolbar {
  gap: 10px;
}

.campaign-review-workspace {
  overflow: visible;
}

.campaign-child-form {
  margin: 0 20px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.campaign-child-form + .campaign-child-form {
  margin-top: 14px;
}

.campaign-child-form-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}

.campaign-child-form-heading h3,
.campaign-child-form-heading p {
  margin: 0;
}

.campaign-child-form-heading p {
  color: var(--muted);
  font-size: 11px;
}

.campaign-child-form .form-grid,
.campaign-child-form > .field {
  margin-bottom: 16px;
}

.campaign-inline-time {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 7px;
}

.campaign-child-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.campaign-template-approval,
.campaign-approve-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -6px 20px 20px;
  border: 1px solid #ddd6fe;
  border-radius: 11px;
  background: #faf9ff;
  padding: 13px 15px;
}

.campaign-template-approval small {
  flex: 1;
  color: var(--muted);
  font-size: 11px;
}

.campaign-approve-child {
  margin-top: 20px;
  background: #f8fbf9;
  border-color: #cee9d8;
}

.campaign-approve-child strong,
.campaign-approve-child p {
  display: block;
  margin: 0;
}

.campaign-recipient-modal .modal-panel {
  width: min(940px, 100%);
  overflow: hidden;
}

.campaign-recipient-modal .modal-panel > header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.campaign-recipient-loading {
  padding: 42px 22px;
  color: var(--muted);
  text-align: center;
}

.campaign-recipient-list-wrap {
  max-height: min(560px, calc(100vh - 220px));
  overflow: auto;
  padding: 18px 22px;
}

.campaign-recipient-list {
  display: grid;
  gap: 12px;
}

.campaign-recipient-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.campaign-recipient-card > header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
}

.campaign-recipient-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.campaign-recipient-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: #eef2ff;
  color: #5b63d3;
  font-size: 13px;
  font-weight: 800;
}

.campaign-recipient-identity > div {
  min-width: 0;
}

.campaign-recipient-identity strong,
.campaign-recipient-identity small,
.campaign-recipient-detail > span,
.campaign-recipient-detail > strong,
.campaign-recipient-detail > small {
  display: block;
}

.campaign-recipient-identity strong,
.campaign-recipient-identity small,
.campaign-recipient-detail > strong,
.campaign-recipient-detail > small {
  overflow-wrap: anywhere;
}

.campaign-recipient-identity small,
.campaign-recipient-detail > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.campaign-recipient-card-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(240px, 1.7fr);
  gap: 0;
  padding: 14px;
}

.campaign-recipient-detail {
  min-width: 0;
  padding: 2px 16px;
}

.campaign-recipient-detail:first-child {
  padding-left: 0;
}

.campaign-recipient-detail + .campaign-recipient-detail {
  border-left: 1px solid var(--border);
}

.campaign-recipient-detail > span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.campaign-recipient-detail > strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.55;
}

.campaign-recipient-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.campaign-recipient-attributes span {
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 5px;
  background: var(--surface-soft);
  padding: 3px 5px;
  color: var(--muted);
  font-size: 9px;
}

.campaign-recipient-empty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}

.campaign-recipient-modal .modal-panel > footer {
  align-items: center;
  justify-content: space-between;
  margin: 0;
}

.campaign-recipient-modal .modal-panel > footer small {
  color: var(--muted);
}

.campaign-approve-child p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 980px) {
  .campaign-channel-grid {
    grid-template-columns: 1fr;
  }

  .campaign-time-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .campaign-recipient-modal {
    padding: 12px;
  }

  .campaign-recipient-card-grid {
    grid-template-columns: 1fr;
  }

  .campaign-recipient-detail,
  .campaign-recipient-detail:first-child {
    padding: 11px 0;
  }

  .campaign-recipient-detail + .campaign-recipient-detail {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .campaign-template-approval,
  .campaign-approve-child {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-time-detail-card > footer,
  .campaign-review-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-time-detail-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .campaign-stepper {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-stepper-line {
    width: 1px;
    height: 12px;
    min-height: 12px;
    margin-left: 13px;
    flex: none;
  }

  .campaign-group-grid,
  .campaign-review-summary {
    grid-template-columns: 1fr;
  }

  .campaign-schedule-row {
    grid-template-columns: minmax(0, 1fr) 70px 12px 70px;
  }
}

/* Knowledge workspace: final cascade layer. */
.page-header .button .icon,
.page-header > button .icon {
  display: block;
}

.knowledge-page-header {
  margin-bottom: 18px;
}

.knowledge-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.knowledge-summary-card {
  display: flex;
  min-height: 108px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 18px 20px;
}

/* Shared action spacing. */
.page-header {
  align-items: flex-start;
}

.page-header > div:first-child {
  min-width: 0;
}

.page-header-actions,
.editor-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.page-header-actions {
  padding-top: 1px;
}

.page-header-actions > *,
.editor-header-actions > * {
  margin: 0;
}

@media (max-width: 700px) {
  .page-header-actions,
  .editor-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

}

/* Campaign journey: final layout and omni-channel presentation. */
.campaign-detail-header {
  align-items: flex-start;
}

.campaign-detail-header .page-header-actions {
  max-width: 620px;
}

.campaign-journey-card,
.campaign-review-workspace {
  overflow: visible;
  padding: 24px;
}

.campaign-journey-card > .table-toolbar,
.campaign-review-workspace > .table-toolbar {
  min-height: 0;
  padding: 0 0 20px;
}

.campaign-journey-heading h2,
.campaign-review-workspace > .table-toolbar h2 {
  margin-bottom: 5px;
}

.campaign-journey-heading p,
.campaign-review-workspace > .table-toolbar p {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.campaign-channel-grid {
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 16px;
  padding: 0;
}

.campaign-channel-card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  border-radius: 14px;
  box-shadow: 0 7px 22px rgba(24, 32, 56, .04);
}

.campaign-channel-card > header {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px 19px;
}

.campaign-channel-card > header h3 {
  margin-top: 2px;
  font-size: 15px;
}

.campaign-channel-card > header > strong {
  font-size: 22px;
}

.campaign-channel-metadata {
  gap: 10px;
  padding: 17px 18px 10px;
}

.campaign-channel-metadata span {
  min-height: 64px;
  justify-content: center;
  padding: 10px 12px;
}

.campaign-channel-metadata strong {
  margin-bottom: 2px;
  font-size: 17px;
}

.campaign-window-pills {
  min-height: 45px;
  align-content: flex-start;
  padding: 4px 18px 16px;
}

.campaign-window-pills span.is-empty {
  background: var(--surface-soft);
  color: var(--muted-light);
}

.campaign-channel-card > footer {
  margin-top: auto;
  padding: 14px 18px 17px;
}

.campaign-channel-card.is-empty {
  border-style: dashed;
  box-shadow: none;
}

.campaign-channel-card.is-empty > header,
.campaign-channel-card.is-empty .campaign-channel-metadata,
.campaign-channel-card.is-empty .campaign-window-pills {
  opacity: .72;
}

.campaign-channel-review_needed {
  border-color: #f1c779;
  background: #fffdf8;
}

.channel-brand {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  background: #f7f8fb;
  color: #d68816;
}

.channel-brand > img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 11px;
}

.channel-brand-sms > img,
.channel-brand-call > img,
.channel-brand-email > img,
.channel-brand-push > img {
  width: 23px;
  height: 23px;
  opacity: .68;
}

.channel-brand-review_needed {
  border-color: #f1d69c;
  background: #fff8e8;
}

.channel-brand-review_needed .icon {
  width: 23px;
  height: 23px;
}

.campaign-omnichannel-preview {
  display: grid;
  grid-template-columns: minmax(210px, .7fr) minmax(0, 2fr);
  align-items: center;
  gap: 22px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.campaign-omnichannel-preview h3,
.campaign-omnichannel-preview p {
  margin: 0;
}

.campaign-omnichannel-preview h3 {
  font-size: 14px;
}

.campaign-omnichannel-preview p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.campaign-brand-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.campaign-brand-list > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 7px 10px 7px 7px;
  font-size: 11px;
}

.campaign-brand-list .channel-brand {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 8px;
}

.campaign-brand-list .channel-brand-telegram {
  border-radius: 50%;
}

.campaign-brand-list .channel-brand svg {
  width: 18px;
  height: 18px;
}

.campaign-brand-list .channel-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.campaign-brand-list .channel-brand-sms img,
.campaign-brand-list .channel-brand-call img,
.campaign-brand-list .channel-brand-email img,
.campaign-brand-list .channel-brand-push img {
  width: 17px;
  height: 17px;
}

.campaign-review-note {
  margin-top: 20px;
  padding: 13px 15px;
}

.campaign-time-detail-grid {
  gap: 16px;
  padding: 0;
}

.campaign-time-detail-card {
  min-width: 0;
  padding: 18px;
}

.campaign-time-detail-stats span {
  padding: 11px;
}

.campaign-channel-empty {
  grid-column: 1 / -1;
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed var(--border);
  border-radius: 13px;
  padding: 28px;
  text-align: center;
}

.campaign-channel-empty h3 {
  margin: 14px 0 4px;
}

.campaign-channel-empty p {
  margin: 0;
  color: var(--muted);
}

.campaign-child-form {
  margin: 0 0 18px;
  padding: 20px;
}

.campaign-template-approval,
.campaign-approve-child {
  margin-right: 0;
  margin-left: 0;
}

.campaign-child-form-heading .channel-brand {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.campaign-routing-review-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 18px;
}

.campaign-routing-review-summary,
.campaign-resolve-channel-form {
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 20px;
}

.campaign-routing-review-summary {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: #fffdf8;
}

.campaign-routing-review-summary strong {
  display: block;
  margin: 3px 0 6px;
  font-size: 16px;
}

.campaign-routing-review-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.campaign-prototype-config {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr);
  gap: 16px;
  margin-bottom: 16px;
}

.campaign-prototype-config > .field,
.campaign-prototype-config > .campaign-prototype-notice {
  margin: 0;
}

.campaign-prototype-notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid #f1d69c;
  border-radius: 11px;
  background: #fffaf0;
  padding: 14px;
  color: #7c5a18;
}

.campaign-prototype-notice .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.campaign-prototype-notice strong,
.campaign-prototype-notice p {
  display: block;
  margin: 0;
}

.campaign-prototype-notice p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.5;
}

.campaign-resolve-channel-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.campaign-resolve-channel-form .field {
  flex: 1;
}

.campaign-resolve-channel-form .button {
  margin-bottom: 22px;
}

.campaign-recipient-modal .modal-panel > header {
  padding-top: 20px;
}

@media (max-width: 980px) {
  .campaign-omnichannel-preview,
  .campaign-routing-review-body,
  .campaign-prototype-config {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .campaign-journey-card,
  .campaign-review-workspace {
    padding: 18px;
  }

  .campaign-resolve-channel-form {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-resolve-channel-form .button {
    margin-bottom: 0;
  }
}

.knowledge-summary-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 9px;
}

.knowledge-summary-icon .icon {
  width: 19px;
  height: 19px;
}

.knowledge-summary-card small,
.knowledge-summary-card strong,
.knowledge-summary-card p {
  display: block;
}

.knowledge-summary-card small {
  color: var(--muted);
  font-size: 11px;
}

.knowledge-summary-card strong {
  margin: 2px 0 1px;
  color: var(--text);
  font-family: "Montserrat", "Poppins", sans-serif;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.25;
}

.knowledge-summary-card p {
  margin: 0;
  color: var(--muted-light);
  font-size: 11.5px;
}

.knowledge-sources-card {
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.knowledge-sources-card .table-toolbar {
  min-height: 72px;
  padding: 15px 20px;
}

.knowledge-sources-card .table-toolbar h2 {
  margin: 0 0 3px;
}

.knowledge-sources-card .table-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.knowledge-card-grid {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 16px;
}

.knowledge-card {
  min-height: 116px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 10px;
}

.knowledge-card-body {
  min-width: 0;
}

.knowledge-card-heading {
  align-items: center;
}

.knowledge-card h3 {
  margin: 0;
  font-size: 14px;
}

.knowledge-card p {
  min-height: 0;
  margin: 4px 0 13px;
  color: var(--muted);
  font-size: 12px;
}

.knowledge-card footer {
  align-items: center;
  gap: 14px;
}

.knowledge-card footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.knowledge-card footer .icon {
  width: 13px;
  height: 13px;
}

.knowledge-card-open {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
}

.knowledge-card:hover .knowledge-card-open {
  background: var(--surface-soft);
  color: var(--text);
}

.knowledge-detail-header .editor-title {
  min-width: 0;
}

.knowledge-detail-header .editor-header-actions {
  flex: none;
}

.content-card.detail-section:has(> .small-empty) {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.detail-section > .small-empty {
  min-height: 300px;
  margin: 4px -22px -22px;
  border-top: 1px solid var(--border);
  padding: 44px 24px;
}

.knowledge-create-modal > header p,
.knowledge-upload-modal > header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.knowledge-upload-modal {
  width: min(720px, 100%);
}

.knowledge-upload-modal > header {
  min-height: 84px;
  padding: 20px 26px;
}

.knowledge-upload-modal > form {
  padding: 22px 26px 24px;
}

.knowledge-upload-modal > form > footer {
  margin: 18px -26px -24px;
  padding: 14px 26px;
}

.knowledge-ingest-tabs {
  gap: 18px;
}

.knowledge-ingest-tab-list {
  margin-bottom: 0;
}

.document-drop-field {
  position: relative;
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
  border: 1px dashed var(--border-strong);
  border-radius: 11px;
  background: var(--surface-soft);
  padding: 28px;
  text-align: center;
  cursor: pointer;
}

.document-drop-field input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.document-drop-field > strong {
  font-size: 13px;
}

.document-drop-field > span:not(.document-drop-icon) {
  color: var(--muted);
  font-size: 11.5px;
}

.knowledge-document-identity {
  gap: 16px;
}

.knowledge-document-identity .field > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

@media (max-width: 820px) {
  .knowledge-summary-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .knowledge-detail-header .editor-header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Agent directory and call-log compositions. */

.agent-overview-grid,
.call-log-overview-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.agent-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agent-overview-card,
.call-log-overview-grid article {
  display: flex;
  min-width: 0;
  min-height: 104px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 16px;
}

.agent-overview-card > div,
.call-log-overview-grid article > div {
  min-width: 0;
}

.agent-overview-card small,
.agent-overview-card strong,
.agent-overview-card p,
.call-log-overview-grid small,
.call-log-overview-grid strong,
.call-log-overview-grid p {
  display: block;
  margin: 0;
}

.agent-overview-card small,
.call-log-overview-grid small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.agent-overview-card strong,
.call-log-overview-grid strong {
  margin: 2px 0;
  font-size: 20px;
  font-weight: 650;
}

.agent-overview-card p,
.call-log-overview-grid p {
  overflow: hidden;
  color: var(--muted-light);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-directory-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 165px 150px auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 12px;
}

.agent-directory-filters label,
.agent-directory-search {
  min-width: 0;
}

.agent-directory-filters select,
.agent-directory-search {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.agent-directory-filters select {
  padding: 0 10px;
  color: var(--muted);
  font-size: 11.5px;
}

.agent-directory-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: var(--muted);
}

.agent-directory-search .icon {
  width: 15px;
  height: 15px;
}

.agent-directory-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11.5px;
}

.agent-directory-filters .record-count {
  white-space: nowrap;
}

.agent-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}

.agent-directory-card {
  display: flex;
  min-width: 0;
  min-height: 330px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 16px;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.agent-directory-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 20px rgba(17, 24, 39, .045);
  transform: translateY(-2px);
}

.agent-directory-card > header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
}

.agent-directory-avatar,
.call-customer-mini {
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 650;
}

.agent-directory-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 11px;
}

.agent-directory-card header h2,
.agent-directory-card header p {
  margin: 0;
}

.agent-directory-card header h2 {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-directory-card header p {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted-light);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-directory-card > header .status {
  margin-top: 1px;
}

.agent-directory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}

.agent-directory-tags span {
  display: inline-flex;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 4px 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-directory-tags .icon {
  width: 11px;
  height: 11px;
}

.agent-directory-description {
  display: -webkit-box;
  min-height: 58px;
  margin: 13px 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.agent-directory-stats {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  gap: 8px;
  margin: auto 0 12px;
}

.agent-directory-stats div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}

.agent-directory-stats dt,
.agent-directory-stats dd {
  margin: 0;
}

.agent-directory-stats dt {
  margin-bottom: 4px;
  color: var(--muted-light);
  font-size: 9px;
}

.agent-directory-stats dd {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-directory-card > footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.agent-directory-card > footer form,
.agent-directory-card > footer .button {
  width: 100%;
}

.agent-delete-button {
  border-color: #f0d7da;
  background: var(--surface);
  color: var(--danger);
}

.agent-delete-button:hover {
  background: var(--danger-soft);
}

.agent-filter-empty {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.agent-filter-empty h2,
.agent-filter-empty p {
  margin: 5px 0 0;
}

.call-log-overview-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.call-log-overview-grid article {
  min-height: 108px;
  padding: 14px;
}

.call-log-overview-grid .stat-icon {
  width: 36px;
  height: 36px;
}

.call-log-workspace {
  padding: 0;
  overflow: hidden;
}

.call-log-filter-form {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 14px;
}

.call-log-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.call-log-search {
  display: flex;
  min-height: 40px;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--muted);
}

.call-log-search .icon {
  width: 15px;
  height: 15px;
}

.call-log-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11.5px;
}

.call-log-filter-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr 1.1fr 1.1fr auto auto;
  gap: 8px;
}

.call-log-filter-row label,
.call-log-filter-row select,
.call-log-filter-row input {
  min-width: 0;
}

.call-log-filter-row select,
.call-log-date {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}

.call-log-filter-row select {
  padding: 0 9px;
}

.call-log-date {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
}

.call-log-date span {
  color: var(--muted-light);
  font-size: 9px;
}

.call-log-date input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
}

.call-log-table {
  min-width: 1180px;
}

.call-log-table td {
  height: 70px;
}

.call-customer-mini {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 9px;
}

.call-type-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.call-type-label .icon {
  width: 13px;
  height: 13px;
  color: var(--muted-light);
}

@media (max-width: 1280px) {
  .agent-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .call-log-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .agent-directory-filters {
    grid-template-columns: minmax(250px, 1fr) repeat(3, 145px);
  }

  .agent-directory-filters .record-count {
    display: none;
  }

  .call-log-filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .agent-overview-grid,
  .call-log-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-directory-filters,
  .agent-directory-grid {
    grid-template-columns: 1fr;
  }

  .call-log-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .agent-overview-grid,
  .call-log-overview-grid,
  .call-log-filter-row {
    grid-template-columns: 1fr;
  }

  .call-log-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .call-log-search-row .record-count {
    align-self: flex-start;
  }
}

@media (max-width: 620px) {
  .knowledge-card {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 16px;
  }

  .knowledge-card-open {
    display: none;
  }

  .knowledge-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

.knowledge-card footer {
    gap: 8px 12px;
  }
}


/* Standard call-detail workspace */

.call-detail-console {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.call-overview-hero {
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 2px 0 0;
  box-shadow: none;
}

.call-hero-orbit {
  display: none;
}

.call-hero-heading,
.call-customer-title,
.call-hero-actions,
.call-fact-grid article,
.call-highlight-card,
.call-panel-heading,
.call-subsection-heading {
  display: flex;
  align-items: center;
}

.call-hero-heading {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 0 3px;
}

.call-detail-eyebrow,
.call-panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .095em;
  text-transform: uppercase;
}

.call-detail-eyebrow {
  display: none;
}

.call-detail-eyebrow .icon,
.call-panel-kicker .icon {
  width: 13px;
  height: 13px;
}

.call-customer-title {
  gap: 12px;
  margin-top: 0;
}

.call-customer-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  flex: none;
  place-items: center;
  border: 1px solid #cce9eb;
  border-radius: 12px;
  background: #effafb;
  color: #148393;
  font-size: 18px;
  font-weight: 750;
}

.call-customer-avatar .icon {
  width: 22px;
  height: 22px;
}

.call-customer-title h1 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 650;
  letter-spacing: -.025em;
}

.call-customer-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.call-hero-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.call-hero-actions .is-copied {
  border-color: #bfe8d9;
  background: #effbf6;
  color: #167456;
}

.call-fact-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.call-fact-grid article {
  min-width: 0;
  gap: 11px;
  min-height: 78px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 15px 18px;
  box-shadow: none;
  transition: background .16s ease;
}

.call-fact-grid article:not(:nth-child(3n)) {
  border-right: 1px solid var(--border);
}

.call-fact-grid article:nth-child(-n + 3) {
  border-bottom: 1px solid var(--border);
}

.call-fact-grid article:hover {
  background: var(--surface-soft);
}

.call-fact-grid small,
.call-fact-grid strong,
.call-highlight-card small,
.call-highlight-card strong {
  display: block;
}

.call-fact-grid small {
  margin-bottom: 3px;
  color: var(--muted-light);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.call-fact-grid strong {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.call-fact-icon,
.call-highlight-icon {
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid transparent;
}

.call-fact-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.call-fact-icon .icon,
.call-highlight-icon .icon {
  width: 16px;
  height: 16px;
}

.call-fact-icon.violet,
.call-highlight-icon.violet {
  border-color: #e5dcf8;
  background: #f8f4ff;
  color: #7351aa;
}

.call-fact-icon.blue,
.call-highlight-icon.blue {
  border-color: #d8e7ff;
  background: #f1f6ff;
  color: #246bdb;
}

.call-fact-icon.teal,
.call-highlight-icon.teal {
  border-color: #cce9eb;
  background: #effafb;
  color: #148393;
}

.call-fact-icon.sky,
.call-highlight-icon.sky {
  border-color: #cfeaf5;
  background: #f0faff;
  color: #2782a4;
}

.call-fact-icon.neutral,
.call-highlight-icon.neutral {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--muted);
}

.call-fact-icon.green,
.call-highlight-icon.green {
  border-color: #ccece0;
  background: #ecfaf5;
  color: #168463;
}

.call-highlight-icon.amber {
  border-color: #fae4bd;
  background: #fff7e9;
  color: #b8740d;
}

.call-fact-icon.amber {
  border-color: #fae4bd;
  background: #fff7e9;
  color: #b8740d;
}

.call-fact-icon.rose,
.call-highlight-icon.rose {
  border-color: #f3d3d7;
  background: #fff4f5;
  color: #b34855;
}

.call-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.call-highlight-card {
  height: 100%;
  min-height: 122px;
  align-items: flex-start;
  gap: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 18px;
  box-shadow: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.call-highlight-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 7px 18px rgba(17, 24, 39, .045);
  transform: translateY(-2px);
}

.call-highlight-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.call-highlight-card > div {
  min-width: 0;
  width: 100%;
}

.call-highlight-card strong {
  overflow: hidden;
  margin-bottom: 3px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.call-highlight-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.call-highlight-caption {
  display: inline-flex;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 4px 9px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-highlight-caption.green {
  border-color: #ccece0;
  background: #effaf6;
  color: #168463;
}

.call-highlight-caption.rose {
  border-color: #f3d3d7;
  background: #fff4f5;
  color: #b34855;
}

.call-highlight-caption.amber {
  border-color: #fae4bd;
  background: #fff8ec;
  color: #a8680b;
}

.call-highlight-caption.blue {
  border-color: #d8e7ff;
  background: #f3f7ff;
  color: #246bdb;
}

.call-highlight-caption.teal {
  border-color: #cce9eb;
  background: #f1fafb;
  color: #148393;
}

.call-workspace {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.call-section-rail,
.call-workspace-content {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
}

.call-section-rail {
  position: sticky;
  top: 78px;
  overflow: hidden;
  padding: 14px;
}

.call-section-rail-heading {
  padding: 5px 6px 13px;
}

.call-section-rail-heading > span {
  font-size: 15px;
  font-weight: 700;
}

.call-section-rail-heading p {
  margin: 5px 0 0;
  color: var(--muted-light);
  font-size: 10px;
  line-height: 1.5;
}

.call-section-nav.detail-tab-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  border: 0;
}

.call-section-nav.detail-tab-list button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  min-height: 43px;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 7px 6px 7px 9px;
  text-align: left;
  transition: color .16s ease, transform .16s ease;
}

.call-section-nav.detail-tab-list button > span {
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.call-section-nav.detail-tab-list button::after {
  display: none;
}

.call-section-nav.detail-tab-list button:hover {
  background: transparent;
  color: var(--text);
  transform: translateX(2px);
}

.call-section-nav.detail-tab-list button.active {
  border-left-color: var(--text);
  background: transparent;
  color: var(--text);
  font-weight: 650;
}

.call-section-nav > button > .icon-chevron-right {
  width: 14px;
  height: 14px;
  color: var(--muted-light);
}

.call-nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  background: transparent;
  color: var(--muted);
}

.call-nav-icon .icon {
  width: 15px;
  height: 15px;
}

.call-section-nav button.active .call-nav-icon {
  background: transparent;
  color: var(--text);
}

.call-nav-copy {
  min-width: 0;
}

.call-nav-copy strong,
.call-nav-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-nav-copy strong {
  font-size: 11.5px;
  font-weight: 650;
}

.call-nav-copy small {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 8.5px;
  text-transform: capitalize;
}

.call-nav-count {
  min-width: 21px;
  background: transparent;
  padding: 3px 6px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.call-section-nav button.active .call-nav-count {
  background: transparent;
  color: var(--text);
}

.call-section-nav.detail-tab-list button:hover .call-nav-icon {
  color: var(--text);
}

.call-workspace-content {
  min-width: 0;
  min-height: 470px;
  padding: 22px;
}

.call-panel-heading,
.call-subsection-heading {
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.call-panel-heading {
  margin-bottom: 18px;
  border-bottom: 0;
  padding-bottom: 0;
}

.call-analysis-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.call-analysis-actions form {
  margin: 0;
}

.call-analysis-actions .button {
  white-space: nowrap;
}

.call-panel-heading h2,
.call-subsection-heading h3,
.enhanced-call-information h3,
.recording-copy h3 {
  margin: 5px 0 0;
  letter-spacing: -.025em;
}

.call-panel-heading h2 {
  font-size: 19px;
}

.call-panel-heading p,
.call-subsection-heading p,
.recording-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.call-panel-total {
  flex: none;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 8px 11px;
  color: var(--muted);
  font-size: 9px;
}

.call-panel-total strong {
  margin-right: 3px;
  color: var(--text);
  font-size: 13px;
}

.call-ai-summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  border: 1px solid #c9e7e9;
  border-radius: 10px;
  background: #f1fafb;
  padding: 16px;
  box-shadow: inset 3px 0 0 #19a2b3;
}

.call-ai-summary-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #dff3f5;
  color: #147f8c;
}

.call-ai-summary-icon .icon {
  width: 17px;
  height: 17px;
}

.call-ai-summary small {
  color: #147f8c;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.call-ai-summary p {
  margin: 5px 0 0;
  color: #454052;
  font-size: 11.5px;
  line-height: 1.65;
}

.call-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.call-analysis-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 118px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 15px;
  transition: border-color .16s ease, transform .16s ease;
}

.call-analysis-card:hover {
  transform: translateY(-1px);
}

.call-analysis-card small,
.call-analysis-card strong,
.call-analysis-card p {
  display: block;
}

.call-analysis-card small {
  margin-bottom: 7px;
  color: var(--muted-light);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.call-analysis-card strong {
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.58;
  white-space: pre-wrap;
}

.call-analysis-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.call-analysis-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
}

.call-analysis-icon .icon {
  width: 17px;
  height: 17px;
}

.call-analysis-icon.positive {
  border-color: #c9eadf;
  background: #eaf9f3;
  color: #168463;
}

.call-analysis-icon.negative {
  border-color: #f3d3d7;
  background: #fff0f2;
  color: #b34855;
}

.call-analysis-icon.attention {
  border-color: #f3e2bd;
  background: #fff5df;
  color: #a8680b;
}

.call-analysis-card.positive {
  border-color: #c9eadf;
  background: #f5fcf9;
}

.call-analysis-card.positive strong {
  color: #167456;
}

.call-analysis-card.negative {
  border-color: #f3d3d7;
  background: #fff8f8;
}

.call-analysis-card.negative strong {
  color: #b34855;
}

.call-analysis-card.attention {
  border-color: #f3e2bd;
  background: #fffbf3;
}

.call-analysis-card.attention strong {
  color: #97620f;
}

.call-analysis-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 16px;
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 550;
}

.call-analysis-footer .icon {
  width: 14px;
  height: 14px;
  color: #148393;
}

.call-subsection,
.call-memory-delivery {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 17px;
}

.call-subsection-heading {
  margin-bottom: 14px;
}

.call-empty-state {
  display: flex;
  min-height: 330px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed var(--border-strong);
  border-radius: 13px;
  background: var(--surface-soft);
  padding: 30px;
  text-align: center;
}

.call-empty-state > span {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: none;
}

.call-empty-state h3,
.call-empty-state p {
  margin: 0;
}

.call-empty-state p {
  max-width: 360px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.call-empty-state .button {
  margin-top: 14px;
}

.call-empty-inline {
  border-radius: 11px;
  background: var(--surface-soft);
  padding: 15px;
  color: var(--muted);
  font-size: 11px;
}

.call-empty-inline p {
  margin: 0;
}

.transcript-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.transcript-search {
  display: flex;
  width: min(390px, 100%);
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 11px;
  color: var(--muted);
}

.transcript-search .icon {
  width: 15px;
  height: 15px;
}

.transcript-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
}

.transcript-role-filter {
  display: flex;
  gap: 3px;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 3px;
}

.transcript-role-filter button {
  min-height: 31px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0 11px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.transcript-role-filter button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}

.call-transcript-list {
  gap: 12px;
}

.call-transcript-list .transcript-turn {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
}

.call-transcript-list .speaker-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.call-transcript-list .transcript-turn > div {
  max-width: 86%;
}

.call-transcript-list .customer-turn > div {
  justify-self: end;
}

.call-transcript-list .transcript-turn header > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.call-transcript-list .transcript-turn header small {
  color: var(--muted-light);
  font-size: 8px;
}

.call-transcript-list .transcript-turn p {
  border: 1px solid var(--border);
  border-radius: 4px 13px 13px;
  background: var(--surface-soft);
  padding: 13px 14px;
  font-size: 11.5px;
  line-height: 1.65;
}

.call-transcript-list .ai-turn p {
  border-color: var(--border);
  background: #fafafa;
}

.call-transcript-list .customer-turn p {
  border-radius: 13px 4px 13px 13px;
  background: #f4f7fb;
}

.transcript-turn[hidden],
.transcript-no-results[hidden] {
  display: none;
}

.minimal-recording-card {
  display: grid;
  grid-template-columns: 42px minmax(160px, .7fr) minmax(260px, 1fr) auto;
  min-height: 94px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 18px;
}

.minimal-recording-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
}

.minimal-recording-icon .icon {
  width: 18px;
  height: 18px;
}

.minimal-recording-copy {
  min-width: 0;
}

.minimal-recording-copy h3 {
  margin: 0;
  font-size: 13px;
}

.minimal-recording-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.minimal-recording-card audio {
  width: 100%;
  min-width: 0;
  height: 38px;
}

.minimal-recording-card .button {
  min-height: 38px;
  white-space: nowrap;
}

.recording-empty {
  min-height: 280px;
}

.call-performance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.call-performance-grid article {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 13px;
}

.call-performance-grid small,
.call-performance-grid strong {
  display: block;
}

.call-performance-grid small {
  color: var(--muted);
  font-size: 9px;
}

.call-performance-grid strong {
  margin-top: 3px;
  font-size: 13px;
}

.enhanced-call-information {
  gap: 10px;
}

.enhanced-call-information .side-detail-card {
  border-radius: 10px;
  padding: 16px;
  box-shadow: none;
}

.enhanced-call-information h3 {
  margin-bottom: 14px;
  font-size: 14px;
}

.call-context-section pre {
  margin: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.call-history-table {
  border: 1px solid var(--border);
  border-radius: 10px;
}

.dark-mode .call-overview-hero {
  border-color: transparent;
  background: transparent;
}

.dark-mode .call-fact-grid {
  border-color: var(--border);
  background: var(--surface);
}

.dark-mode .call-fact-grid article {
  background: transparent;
}

.dark-mode .call-fact-grid article:hover {
  background: var(--surface-soft);
}

.dark-mode .call-customer-avatar,
.dark-mode .call-fact-icon.teal,
.dark-mode .call-highlight-icon.teal {
  border-color: #31575d;
  background: #17282b;
  color: #73ced7;
}

.dark-mode .call-fact-icon.blue,
.dark-mode .call-highlight-icon.blue {
  border-color: #31496d;
  background: #18243a;
  color: #7ba7f7;
}

.dark-mode .call-fact-icon.violet,
.dark-mode .call-highlight-icon.violet {
  border-color: #4c3d63;
  background: #251e32;
  color: #bca2eb;
}

.dark-mode .call-fact-icon.sky,
.dark-mode .call-highlight-icon.sky {
  border-color: #315364;
  background: #172a32;
  color: #75c5df;
}

.dark-mode .call-transcript-list .ai-turn p,
.dark-mode .minimal-recording-card {
  border-color: var(--border);
  background: var(--surface-soft);
}

.dark-mode .call-ai-summary {
  border-color: #31575d;
  background: #17282b;
  box-shadow: inset 3px 0 0 #3eb5c3;
}

.dark-mode .call-ai-summary-icon {
  background: #203d41;
  color: #73ced7;
}

.dark-mode .call-ai-summary small {
  color: #73ced7;
}

.dark-mode .call-ai-summary p {
  color: #d5cfdf;
}

.dark-mode .call-section-nav.detail-tab-list button.active {
  border-left-color: var(--text);
  background: transparent;
  color: var(--text);
}

.dark-mode .call-analysis-card.positive {
  border-color: #285345;
  background: #162c25;
}

.dark-mode .call-analysis-card.negative {
  border-color: #60353b;
  background: #2d1b1e;
}

.dark-mode .call-analysis-card.attention {
  border-color: #5f4a27;
  background: #302716;
}

.dark-mode .call-highlight-caption.green,
.dark-mode .call-highlight-caption.teal,
.dark-mode .call-highlight-caption.blue,
.dark-mode .call-highlight-caption.amber,
.dark-mode .call-highlight-caption.rose {
  background: var(--surface-soft);
}

@media (max-width: 1280px) {
  .call-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .call-analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .minimal-recording-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .minimal-recording-card audio {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .call-hero-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .call-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .call-fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .call-fact-grid article,
  .call-fact-grid article:not(:nth-child(3n)),
  .call-fact-grid article:nth-child(-n + 3) {
    border-right: 0;
    border-bottom: 0;
  }

  .call-fact-grid article:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  .call-fact-grid article:nth-child(-n + 4) {
    border-bottom: 1px solid var(--border);
  }

  .call-workspace {
    grid-template-columns: 1fr;
  }

  .call-section-rail {
    position: static;
  }

  .call-section-nav.detail-tab-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .call-information-grid.enhanced-call-information {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .call-overview-hero {
    border-radius: 0;
    padding: 0;
  }

  .call-customer-title {
    align-items: flex-start;
  }

  .call-customer-title p {
    overflow-wrap: anywhere;
  }

  .call-hero-actions .button {
    flex: 1 1 auto;
  }

  .call-fact-grid,
  .call-highlight-grid,
  .call-analysis-grid,
  .call-performance-grid {
    grid-template-columns: 1fr;
  }

  .call-fact-grid article,
  .call-fact-grid article:nth-child(odd),
  .call-fact-grid article:nth-child(-n + 4) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .call-fact-grid article:last-child {
    border-bottom: 0;
  }

  .call-highlight-card {
    min-height: auto;
  }

  .call-section-nav.detail-tab-list {
    display: flex;
    overflow: visible;
  }

  .call-workspace-content {
    min-height: 420px;
    padding: 16px;
  }

  .call-panel-heading,
  .call-subsection-heading,
  .transcript-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .call-analysis-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .transcript-search,
  .transcript-role-filter {
    width: 100%;
  }

  .transcript-role-filter button {
    flex: 1;
  }

  .call-transcript-list .transcript-turn > div {
    max-width: 100%;
  }

  .minimal-recording-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .minimal-recording-card audio,
  .minimal-recording-card .button {
    grid-column: 1 / -1;
  }
}

/* Campaign presentation and review polish. */
.campaign-ai-spotlight {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(340px, .95fr) minmax(520px, 1.35fr);
  align-items: center;
  gap: 34px;
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  background:
    linear-gradient(115deg, rgba(248, 250, 255, .98), rgba(251, 248, 255, .98)) padding-box,
    linear-gradient(105deg, #88a8ff, #63d7e8, #ba8cff, #ffb4d2, #88a8ff) border-box;
  background-size: 100% 100%, 280% 100%;
  padding: 26px 28px;
  font-family: "Poppins", ui-sans-serif, sans-serif;
  box-shadow: 0 14px 36px rgba(75, 86, 150, .09), inset 0 1px 0 rgba(255, 255, 255, .9);
  animation: campaign-ai-border-shine 7s linear infinite;
}

.campaign-ai-spotlight::after {
  position: absolute;
  z-index: -1;
  width: 310px;
  height: 310px;
  top: -205px;
  right: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(149, 119, 255, .2), rgba(126, 211, 255, 0) 68%);
  content: "";
  pointer-events: none;
}

.campaign-ai-copy {
  min-width: 0;
}

.campaign-ai-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5d63c9;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
}

.campaign-ai-kicker .icon {
  width: 15px;
  height: 15px;
  color: #795ee8;
}

.campaign-ai-copy h2 {
  max-width: 590px;
  margin: 9px 0 7px;
  color: #303950;
  font-family: "Montserrat", "Poppins", sans-serif;
  font-size: clamp(20px, 1.7vw, 27px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.018em;
}

.campaign-ai-copy > p {
  max-width: 650px;
  margin: 0;
  color: #727b91;
  font-family: "Poppins", ui-sans-serif, sans-serif;
  font-size: 12.5px;
  line-height: 1.62;
}

.campaign-ai-action {
  margin-top: 18px;
  border-color: #5d55d7;
  background: linear-gradient(105deg, #6557dc, #765ee6);
  color: #fff;
  font-family: "Poppins", ui-sans-serif, sans-serif;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(101, 87, 220, .2);
}

.campaign-ai-action:hover {
  border-color: #574ccb;
  background: linear-gradient(105deg, #594ccb, #6c54dc);
  color: #fff;
  transform: translateY(-1px);
}

.campaign-ai-action .icon {
  width: 15px;
  height: 15px;
}

.campaign-ai-action .icon:last-child {
  margin-left: 3px;
}

.campaign-ai-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.campaign-ai-steps li {
  display: flex;
  min-width: 0;
  min-height: 118px;
  flex-direction: column;
  gap: 15px;
  border: 1px solid rgba(205, 211, 235, .8);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  padding: 15px;
  box-shadow: 0 6px 18px rgba(40, 51, 92, .045);
  backdrop-filter: blur(8px);
}

.campaign-ai-steps li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #eeeaff;
  color: #6656d8;
  font-size: 10px;
  font-weight: 600;
}

.campaign-ai-steps li:nth-child(2) > span {
  background: #e5f8f8;
  color: #218b93;
}

.campaign-ai-steps li:nth-child(3) > span {
  background: #fff0f6;
  color: #bb4f82;
}

.campaign-ai-steps strong,
.campaign-ai-steps small {
  display: block;
}

.campaign-ai-steps strong {
  color: #3b4358;
  font-family: "Poppins", ui-sans-serif, sans-serif;
  font-size: 12px;
  font-weight: 500;
}

.campaign-ai-steps small {
  margin-top: 5px;
  color: #7a8398;
  font-family: "Poppins", ui-sans-serif, sans-serif;
  font-size: 10px;
  line-height: 1.5;
}

@keyframes campaign-ai-border-shine {
  to { background-position: 0 0, 280% 0; }
}

@media (max-width: 1180px) {
  .campaign-ai-spotlight {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .campaign-ai-spotlight {
    padding: 22px;
  }

  .campaign-ai-steps {
    grid-template-columns: 1fr;
  }

  .campaign-ai-steps li {
    min-height: 0;
    flex-direction: row;
  }
}

@media (prefers-reduced-motion: reduce) {
  .campaign-ai-spotlight {
    animation: none;
  }
}

.campaign-list-section > .table-toolbar,
.campaign-journey-card > .table-toolbar,
.campaign-review-workspace > .table-toolbar {
  border-bottom: 0;
}

.campaign-channel-card > header,
.campaign-channel-card > footer,
.campaign-child-actions {
  border-top: 0;
  border-bottom: 0;
}

.campaign-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
  padding: 0 20px 20px;
}

.campaign-list-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 20px;
  box-shadow: 0 7px 22px rgba(24, 32, 56, .035);
}

.campaign-list-card > header,
.campaign-list-card > footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.campaign-list-card h3,
.campaign-list-card p {
  margin: 0;
}

.campaign-list-card h3 {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.campaign-list-card p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.campaign-list-metrics {
  display: grid;
  grid-template-columns: 1.2fr .65fr 1fr;
  gap: 9px;
}

.campaign-list-metrics > span {
  display: flex;
  min-width: 0;
  min-height: 72px;
  justify-content: center;
  flex-direction: column;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 11px 12px;
}

.campaign-list-metrics small,
.campaign-list-metrics strong,
.campaign-list-metrics em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-list-metrics small,
.campaign-list-metrics em,
.campaign-list-channels > small {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.campaign-list-metrics strong {
  margin-top: 4px;
  font-size: 13px;
}

.campaign-list-metrics em {
  margin-top: 3px;
  font-size: 9px;
}

.campaign-list-card > footer {
  align-items: center;
  margin-top: auto;
}

.campaign-list-channels,
.campaign-summary-channels {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.campaign-list-channels > span {
  display: inline-flex;
}

.campaign-list-channels .channel-brand,
.campaign-summary-channels .channel-brand {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 8px;
}

.campaign-list-channels .channel-brand > img,
.campaign-summary-channels .channel-brand > img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.campaign-list-channels .channel-brand-sms > img,
.campaign-list-channels .channel-brand-call > img,
.campaign-list-channels .channel-brand-email > img,
.campaign-list-channels .channel-brand-push > img,
.campaign-summary-channels .channel-brand-sms > img,
.campaign-summary-channels .channel-brand-call > img,
.campaign-summary-channels .channel-brand-email > img,
.campaign-summary-channels .channel-brand-push > img {
  width: 17px;
  height: 17px;
}

.campaign-type-summary-card > div {
  min-width: 0;
  width: 100%;
}

.campaign-summary-channels {
  display: grid;
  grid-template-columns: repeat(5, 30px);
  margin-top: 7px;
}

.campaign-summary-channels > span {
  display: inline-flex;
  align-items: center;
}

.campaign-child-form-heading > .status {
  margin-left: auto;
}

.campaign-message-test {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, .65fr) auto;
  align-items: end;
  gap: 16px;
  margin: 0 0 18px;
  border: 1px solid #d9e4fb;
  border-radius: 12px;
  background: #f8fbff;
  padding: 16px 18px;
}

.campaign-message-test > div strong,
.campaign-message-test > div small {
  display: block;
}

.campaign-message-test > div small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.campaign-message-test .field {
  margin: 0;
}

.campaign-message-test .button {
  margin-bottom: 22px;
}

@media (max-width: 820px) {
  .campaign-list-grid,
  .campaign-list-metrics,
  .campaign-message-test {
    grid-template-columns: 1fr;
  }

  .campaign-list-card > header,
  .campaign-list-card > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .campaign-message-test .button {
    margin-bottom: 0;
  }
}

/* Final campaign overrides live after legacy campaign rules. */
.campaign-list-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
}

.campaign-list-card {
  min-height: 330px;
  gap: 0;
  border-radius: 10px;
  padding: 16px;
  box-shadow: none;
}

.campaign-list-card > header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.campaign-list-card .campaign-list-description {
  display: -webkit-box;
  min-height: 51px;
  margin: 13px 0 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.campaign-list-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.campaign-list-card > footer {
  align-items: center;
  margin-top: auto;
  padding-top: 15px;
}

.channel-brand > img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.channel-brand-sms > img,
.channel-brand-call > img,
.channel-brand-email > img,
.channel-brand-push > img {
  width: 21px;
  height: 21px;
}

.campaign-list-channels .channel-brand > img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.campaign-list-channels .channel-brand-sms > img,
.campaign-list-channels .channel-brand-call > img,
.campaign-list-channels .channel-brand-email > img,
.campaign-list-channels .channel-brand-push > img {
  width: 15px;
  height: 15px;
}

.campaign-time-card-heading .channel-brand > img {
  width: 28px;
  height: 28px;
}

.campaign-time-card-heading .channel-brand-sms > img,
.campaign-time-card-heading .channel-brand-call > img,
.campaign-time-card-heading .channel-brand-email > img,
.campaign-time-card-heading .channel-brand-push > img {
  width: 19px;
  height: 19px;
}

.campaign-sidebar-context p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 1280px) {
  .campaign-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .campaign-list-grid {
    grid-template-columns: 1fr;
  }

  .campaign-list-card > header {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
  }

  .campaign-list-card > footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Normalize the new full-tile artwork after legacy icon-size rules. */
.channel-brand-sms > img,
.channel-brand-call > img,
.channel-brand-email > img,
.channel-brand-push > img {
  width: 32px;
  height: 32px;
  opacity: 1;
}

.channel-option-logo-sms .channel-option-image,
.channel-option-logo-call .channel-option-image,
.channel-option-logo-email .channel-option-image,
.channel-option-logo-push .channel-option-image {
  width: 25px;
  height: 25px;
  opacity: 1;
}

.campaign-brand-list .channel-brand-sms img,
.campaign-brand-list .channel-brand-call img,
.campaign-brand-list .channel-brand-email img,
.campaign-brand-list .channel-brand-push img,
.campaign-summary-channels .channel-brand-sms > img,
.campaign-summary-channels .channel-brand-call > img,
.campaign-summary-channels .channel-brand-email > img,
.campaign-summary-channels .channel-brand-push > img {
  width: 28px;
  height: 28px;
  opacity: 1;
}

.campaign-list-channels .channel-brand-sms > img,
.campaign-list-channels .channel-brand-call > img,
.campaign-list-channels .channel-brand-email > img,
.campaign-list-channels .channel-brand-push > img {
  width: 22px;
  height: 22px;
  opacity: 1;
}

.campaign-time-card-heading .channel-brand-sms > img,
.campaign-time-card-heading .channel-brand-call > img,
.campaign-time-card-heading .channel-brand-email > img,
.campaign-time-card-heading .channel-brand-push > img {
  width: 28px;
  height: 28px;
  opacity: 1;
}

/* Workflow communication nodes use the supplied channel artwork. */
.node-palette-icon .workflow-channel-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.designer-node-icon .workflow-channel-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

/* Header account menu. */
.account-menu {
  position: relative;
  flex: none;
}

.account-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.account-menu > summary::-webkit-details-marker {
  display: none;
}

.account-menu > summary:focus-visible {
  outline: 3px solid rgba(64, 115, 253, .2);
  outline-offset: 2px;
}

.account-menu[open] > summary {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.account-menu-popover {
  position: absolute;
  top: calc(100% + 11px);
  right: 0;
  z-index: 80;
  width: 252px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 8px;
  box-shadow: 0 16px 44px rgba(22, 31, 48, .16);
}

.account-menu-identity {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.account-menu-avatar {
  width: 34px;
  height: 34px;
}

.account-menu-identity > span:last-child,
.account-menu-identity strong,
.account-menu-identity small {
  display: block;
  min-width: 0;
}

.account-menu-identity strong,
.account-menu-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-identity strong {
  color: var(--text);
  font-size: 12px;
}

.account-menu-identity small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.account-menu-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--border);
}

.account-menu-popover form {
  margin: 0;
}

.account-menu-action {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0 10px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}

.account-menu-action:hover,
.account-menu-action:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.account-menu-action .icon {
  color: var(--muted);
}

.account-menu-logout {
  color: var(--danger);
}

.account-menu-logout .icon {
  color: currentColor;
}

@media (max-width: 640px) {
  .account-menu-popover {
    position: fixed;
    top: calc(var(--topbar-height) - 2px);
    right: 12px;
  }
}

/* Shared tile directory treatment for build resources. */
.catalog-directory-filters {
  grid-template-columns: minmax(260px, 1fr) 160px 170px auto;
}

.catalog-directory-filters-wide {
  grid-template-columns: minmax(260px, 1fr) repeat(3, 145px) auto;
}

.catalog-directory-card {
  min-height: 310px;
}

.catalog-directory-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
}

.catalog-directory-icon .icon {
  width: 18px;
  height: 18px;
}

.catalog-directory-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.catalog-directory-icon.violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.catalog-directory-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.catalog-directory-stats {
  grid-template-columns: 1.35fr 1fr;
}

.catalog-card-actions {
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)) !important;
}

.catalog-card-actions form,
.catalog-card-actions .button {
  width: 100%;
}

.catalog-card-error {
  margin: -3px 0 12px;
  border-radius: 8px;
  background: var(--danger-soft);
  padding: 8px 10px;
  color: var(--danger);
  font-size: 9.5px;
  line-height: 1.45;
}

.template-directory-message {
  white-space: pre-line;
}

@media (max-width: 1280px) {
  .catalog-directory-filters,
  .catalog-directory-filters-wide {
    grid-template-columns: minmax(230px, 1fr) repeat(2, 145px);
  }

  .catalog-directory-filters-wide label:nth-of-type(4) {
    grid-column: 2;
  }
}

@media (max-width: 800px) {
  .catalog-directory-filters,
  .catalog-directory-filters-wide {
    grid-template-columns: 1fr;
  }

  .catalog-directory-filters-wide label:nth-of-type(4) {
    grid-column: auto;
  }
}
.copilot-workspace {
  display: flex;
  flex-direction: column;
  width: min(100%, 1180px);
  height: calc(100dvh - var(--topbar-height) - 76px);
  min-height: 600px;
  margin: 0 auto;
  color: #172238;
}

.copilot-header,
.copilot-header-title {
  display: flex;
  align-items: center;
}

.copilot-header {
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid #eef1f6;
}

.copilot-header-title { gap: 12px; }
.copilot-header-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #1768f5; background: #edf4ff; }
.copilot-header-icon .icon { width: 21px; height: 21px; }
.copilot-header h1 { margin: 0; font-size: 20px; line-height: 1.2; }
.copilot-header p { margin: 4px 0 0; color: #7c879a; font-size: 12px; }

.copilot-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px;
  scrollbar-gutter: stable;
}

.copilot-empty {
  padding: clamp(38px, 8vh, 88px) 0 34px;
  text-align: center;
}

.copilot-empty[hidden] { display: none; }
.copilot-hero-icon { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 24px; background: #edf4ff; color: #1768f5; }
.copilot-hero-icon .icon { width: 29px; height: 29px; }
.copilot-empty h2 { margin: 0; color: #101c34; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; letter-spacing: -.035em; }
.copilot-empty > p { max-width: 690px; margin: 12px auto 36px; color: #738097; font-size: 15px; line-height: 1.65; }
.copilot-suggestions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; text-align: left; }
.copilot-suggestion { display: flex; flex-direction: column; align-items: flex-start; min-height: 155px; padding: 20px; border: 1px solid #e6ebf3; border-radius: 18px; background: #fff; box-shadow: 0 2px 10px rgba(25, 48, 90, .025); color: #172238; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.copilot-suggestion:hover, .copilot-suggestion:focus-visible { border-color: #b6cbff; box-shadow: 0 10px 28px rgba(39, 93, 181, .09); transform: translateY(-2px); }
.copilot-suggestion-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 12px; }
.copilot-suggestion-icon .icon { width: 19px; height: 19px; }
.copilot-suggestion-icon.violet { color: #7348ef; background: #f0ebff; }
.copilot-suggestion-icon.green { color: #12a771; background: #e5f8f0; }
.copilot-suggestion-icon.blue { color: #2572ef; background: #e9f1ff; }
.copilot-suggestion-icon.amber { color: #df9307; background: #fff4dc; }
.copilot-suggestion strong { font-size: 14px; font-weight: 700; }
.copilot-suggestion > span:last-child { margin-top: 7px; color: #78849a; font-size: 12px; line-height: 1.45; }

.copilot-messages { display: flex; flex-direction: column; gap: 24px; padding: 12px 0 24px; }
.copilot-message-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.copilot-message-row.copilot-message-user { justify-content: flex-end; }
.copilot-message-row.copilot-message-user .copilot-avatar { order: 2; color: #132746; background: #eaf1ff; font-size: 10px; }
.copilot-avatar { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #e8f1ff; color: #126af0; font-size: 23px; font-weight: 700; }
.copilot-message { max-width: min(78%, 780px); min-width: 0; padding: 17px 21px; border-radius: 17px; background: #f5f7fa; color: #334158; overflow-wrap: anywhere; }
.copilot-message-user .copilot-message { background: #eaf0ff; }
.copilot-message > strong { display: block; margin-bottom: 8px; color: #1d2b43; font-size: 13px; }
.copilot-message-body { font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
.copilot-message-body > :first-child { margin-top: 0; }
.copilot-message-body > :last-child { margin-bottom: 0; }
.copilot-message-body p { margin: 0 0 12px; }
.copilot-message-body h2, .copilot-message-body h3, .copilot-message-body h4 { margin: 21px 0 8px; color: #182640; line-height: 1.35; white-space: normal; }
.copilot-message-body h2 { font-size: 17px; }
.copilot-message-body h3 { font-size: 15px; }
.copilot-message-body h4 { font-size: 14px; }
.copilot-message-body ul, .copilot-message-body ol { margin: 6px 0 16px; padding-left: 23px; white-space: normal; }
.copilot-message-body li { margin: 4px 0; padding-left: 2px; }
.copilot-message-body strong { color: #1a2a44; font-weight: 700; }
.copilot-message-body code { padding: 2px 5px; border-radius: 5px; background: #e8ecf4; color: #2457a6; font: 12px/1.5 "SFMono-Regular", Consolas, monospace; }
.copilot-message-body pre, .copilot-message details pre { max-height: 320px; overflow: auto; padding: 13px; border-radius: 10px; background: #e9edf4; color: #2d3950; white-space: pre; font: 12px/1.5 "SFMono-Regular", Consolas, monospace; }
.copilot-message-body pre code { padding: 0; background: none; color: inherit; }
.copilot-message-body blockquote { margin: 12px 0; padding: 3px 0 3px 14px; border-left: 3px solid #9bbafa; color: #63728c; }
.copilot-message-body a { color: #1a66e9; text-decoration: underline; }
.copilot-message details { margin-top: 14px; font-size: 12px; }
.copilot-message details summary { cursor: pointer; color: #48638e; font-weight: 600; }
.copilot-proposal { margin: 0 0 14px; padding: 18px 20px; border: 1px solid #bac6ff; border-radius: 14px; background: #f5f7ff; }
.copilot-proposal[hidden] { display: none; }
.copilot-proposal p { margin: 8px 0 16px; color: #52617a; font-size: 13px; white-space: pre-wrap; }
.copilot-proposal-actions, .copilot-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.copilot-form { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 12px; border: 1px solid #dce3ee; border-radius: 18px; background: #fff; box-shadow: 0 8px 30px rgba(30, 54, 102, .045); }
.copilot-form:focus-within { border-color: #9cb9fa; box-shadow: 0 0 0 3px rgba(46, 108, 243, .09); }
.copilot-input-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.copilot-form textarea { width: 100%; min-height: 49px; max-height: 180px; padding: 5px 2px; border: 0; outline: 0; background: transparent; color: #24334b; resize: vertical; font: inherit; font-size: 14px; line-height: 1.5; }
.copilot-form textarea::placeholder { color: #919bad; }
.copilot-form-footer small { color: #8c97a9; font-size: 11px; }
.copilot-send { display: grid; flex: none; place-items: center; width: 39px; height: 39px; border: 0; border-radius: 50%; background: #14213b; color: #fff; cursor: pointer; }
.copilot-send:hover { background: #2467e5; }
.copilot-send:disabled { opacity: .45; cursor: wait; }
.copilot-send .icon { width: 19px; height: 19px; transform: rotate(-45deg); }

@media (max-width: 1050px) {
  .copilot-suggestions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .copilot-empty { padding-top: 36px; }
}

@media (max-width: 650px) {
  .copilot-workspace { height: calc(100dvh - var(--topbar-height) - 55px); min-height: 480px; }
  .copilot-header p { display: none; }
  .copilot-scroll { padding: 0 2px; }
  .copilot-empty > p { font-size: 13px; margin-bottom: 24px; }
  .copilot-suggestions { gap: 9px; }
  .copilot-suggestion { min-height: 136px; padding: 13px; border-radius: 13px; }
  .copilot-suggestion strong { font-size: 12px; }
  .copilot-suggestion > span:last-child { font-size: 11px; }
  .copilot-message { max-width: calc(100% - 50px); padding: 13px 15px; }
  .copilot-avatar { width: 31px; height: 31px; }
  .copilot-form { padding: 11px 13px; }
}

/* Give the tool request editor and its test panel the available page width. */
.compact-editor-layout.tool-editor-layout {
  width: 100%;
  max-width: none;
  margin: 0;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
}

.tool-editor-layout > .editor-form,
.tool-editor-layout > .tool-actions-panel,
.tool-editor-layout .request-url-row .grow {
  min-width: 0;
}

@media (max-width: 1050px) {
  .compact-editor-layout.tool-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-editor-layout .tool-actions-panel {
    grid-column: 1;
    max-height: none;
    overflow: visible;
  }
}

/* Open Copilot conversation with live activity in the assistant turn. */
.copilot-workspace { width: min(100%, 980px); min-height: 0; height: calc(100dvh - var(--topbar-height) - 72px); }
.copilot-scroll { padding: 0 12px; }
.copilot-empty { padding: clamp(95px, 17vh, 180px) 0 28px; }
.copilot-hero-icon { width: 56px; height: 56px; margin-bottom: 20px; border-radius: 19px; }
.copilot-hero-icon .icon { width: 26px; height: 26px; }
.copilot-empty h2 { font-size: clamp(25px, 2.9vw, 32px); }
.copilot-empty > p { margin: 11px auto 25px; font-size: 14px; }
.copilot-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.copilot-suggestion { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; width: auto; min-height: 0; padding: 10px 13px; border-radius: 999px; box-shadow: none; color: #45546c; font-size: 12px; font-weight: 600; }
.copilot-suggestion .icon { width: 15px; height: 15px; color: #3374df; }
.copilot-suggestion:hover, .copilot-suggestion:focus-visible { transform: none; box-shadow: 0 2px 12px rgba(39, 93, 181, .07); }
.copilot-messages { gap: 30px; padding: 32px 0 36px; }
.copilot-message-row { gap: 13px; }
.copilot-message-row.copilot-message-user .copilot-message { max-width: min(80%, 660px); padding: 11px 17px; border-radius: 18px; background: #f0f3f8; color: #27364d; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.copilot-avatar { width: 30px; height: 30px; border: 1px solid #dbe9ff; background: #f0f6ff; animation: copilot-breathe 3s ease-in-out infinite; }
.copilot-avatar .icon { width: 17px; height: 17px; }
.copilot-answer { flex: 1; min-width: 0; max-width: 790px; padding: 2px 0 0; color: #2e3b50; }
.copilot-thinking { display: inline-flex; align-items: center; gap: 2px; min-height: 26px; font-size: 14px; font-weight: 700; }
.copilot-thinking[hidden], .copilot-message-body[hidden], .copilot-activity[hidden] { display: none; }
.copilot-thinking-text { color: #526178; }
.copilot-thinking-dots { color: #8299b9; letter-spacing: 2px; }
.copilot-answer > .copilot-message-body { font-size: 14px; line-height: 1.75; white-space: normal; }
.copilot-answer > .copilot-message-body p { margin-bottom: 13px; }
.copilot-activity { max-width: 720px; margin: 8px 0 15px; color: #687b98; font-size: 12px; }
.copilot-activity summary { display: flex; align-items: center; gap: 7px; width: fit-content; cursor: pointer; list-style: none; font-weight: 600; }
.copilot-activity summary::-webkit-details-marker { display: none; }
.copilot-activity summary::before { content: "◌"; color: #2b75e9; font-size: 16px; line-height: 1; }
.copilot-activity:not([open]) summary::after { content: "⌄"; padding-left: 2px; color: #9aabc0; }
.copilot-activity[open] summary::after { content: "⌃"; padding-left: 2px; color: #9aabc0; }
.copilot-activity-list { display: flex; flex-direction: column; gap: 8px; margin: 13px 0 0 8px; padding: 0 0 0 17px; border-left: 1px solid #e2e9f4; list-style: none; }
.copilot-step { display: flex; align-items: center; gap: 8px; min-height: 18px; color: #75839a; transition: color .18s ease; }
.copilot-step-icon { display: grid; flex: none; place-items: center; width: 17px; height: 17px; border: 1px solid #b9c6d8; border-radius: 50%; font-size: 11px; line-height: 1; }
.copilot-step-running { color: #2d6cd7; }
.copilot-step-running .copilot-step-icon { border-color: #4d86ee; color: #4d86ee; animation: copilot-breathe 2s ease-in-out infinite; }
.copilot-step-completed .copilot-step-icon { border-color: #2fbb86; background: #2fbb86; color: #fff; }
.copilot-step-failed .copilot-step-icon { border-color: #e76f76; background: #fff1f1; color: #c5434d; }
.copilot-message-error { color: #ba3e4a; }
.copilot-proposal { margin: 18px 0 4px; max-width: 590px; }
.copilot-proposal-decided { border-color: #d8e6f7; background: #f7faff; color: #526581; font-size: 12px; }
.copilot-form { display: flex; flex-direction: row; align-items: flex-end; gap: 12px; margin: 0 4px; padding: 13px 13px 13px 18px; border-radius: 23px; }
.copilot-form textarea { flex: 1; min-width: 0; min-height: 27px; max-height: 180px; padding: 6px 0; resize: none; overflow-y: auto; }
.copilot-send { width: 36px; height: 36px; }

@keyframes copilot-breathe { 50% { box-shadow: 0 0 0 5px rgba(65, 132, 244, .07); } }

@media (max-width: 650px) {
  .copilot-workspace { height: calc(100dvh - var(--topbar-height) - 52px); min-height: 0; }
  .copilot-empty { padding-top: 14vh; }
  .copilot-suggestions { gap: 7px; }
  .copilot-suggestion { min-height: 0; padding: 8px 10px; font-size: 11px; }
  .copilot-message-row.copilot-message-user .copilot-message { max-width: 86%; }
  .copilot-answer { max-width: calc(100% - 43px); }
  .copilot-form { padding: 10px 11px 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .copilot-avatar, .copilot-thinking-text, .copilot-step-running .copilot-step-icon { animation: none; }
  .copilot-thinking-text { background: none; color: #5d7190; }
}

/* Copilot reference layout: centered welcome cards and an open conversation. */
.app-column:has(.copilot-workspace) .topbar { border-bottom: 0; box-shadow: none; }
.app-column:has(.copilot-workspace) .topbar-sidebar-toggle { display: none; }
.copilot-workspace { width: min(100%, 760px); }
.copilot-scroll { padding: 0 2px; scrollbar-gutter: auto; }
.copilot-empty { padding: clamp(78px, 13vh, 125px) 0 25px; }
.copilot-hero-icon { width: 62px; height: 62px; margin-bottom: 17px; border-radius: 50%; background: #f4f8ff; color: #2077ef; }
.copilot-hero-icon .icon { width: 32px; height: 32px; }
.copilot-empty h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 700; letter-spacing: -.035em; }
.copilot-empty > p { max-width: 650px; margin: 9px auto 44px; color: #758198; font-size: 13px; line-height: 1.55; }
.copilot-suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; text-align: left; }
.copilot-suggestion { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; min-height: 140px; padding: 17px 20px 20px; border: 1px solid #e6ebf3; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(25, 48, 90, .02); color: #111c31; font-size: 13px; }
.copilot-suggestion:hover, .copilot-suggestion:focus-visible { transform: translateY(-2px); border-color: #bfd4fc; box-shadow: 0 10px 25px rgba(39, 93, 181, .07); }
.copilot-suggestion-icon { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 8px; border-radius: 10px; background: #edf4ff; color: #2576f1; }
.copilot-suggestion .copilot-suggestion-icon .icon { width: 19px; height: 19px; color: inherit; }
.copilot-suggestion strong { margin-bottom: 4px; color: #121e33; font-size: 13px; font-weight: 700; }
.copilot-suggestion .copilot-suggestion-description { max-width: calc(100% - 14px); margin: 0; color: #748097; font-size: 12px; font-weight: 400; line-height: 1.5; }
.copilot-suggestion .copilot-suggestion-arrow { position: absolute; right: 17px; bottom: 18px; width: 15px; height: 15px; color: #23334c; }
.copilot-messages { gap: 26px; padding: 18px 0 30px; }
.copilot-message-row.copilot-message-user { flex-direction: column; align-items: flex-end; gap: 6px; }
.copilot-message-row.copilot-message-user .copilot-message { max-width: min(76%, 600px); padding: 12px 16px; border-radius: 15px; background: #f2f4f8; color: #233047; font-size: 13px; line-height: 1.55; }
.copilot-message-time { color: #98a5ba; font-size: 10px; }
.copilot-message-row.copilot-message-assistant { gap: 11px; }
.copilot-avatar { width: 32px; height: 32px; border: 0; background: #edf4ff; color: #1972ee; box-shadow: none; }
.copilot-avatar .icon { width: 18px; height: 18px; }
.copilot-answer { padding-top: 0; }
.copilot-answer > .copilot-message-body { font-size: 13px; line-height: 1.65; }
.copilot-activity { width: fit-content; max-width: 100%; margin: 0 0 15px; border: 1px solid #e4e9f2; border-radius: 999px; background: #fff; color: #657186; font-size: 11px; }
.copilot-activity summary { min-height: 33px; padding: 6px 12px; white-space: nowrap; }
.copilot-activity summary::before { content: "◌"; font-size: 17px; }
.copilot-activity-complete summary::before { content: "✓"; font-size: 12px; font-weight: 700; }
.copilot-activity[open] { border-radius: 16px; }
.copilot-activity-list { margin: 0 12px 12px 19px; padding-left: 14px; }
.copilot-form { min-height: 57px; margin: 0; padding: 8px 9px 8px 15px; border-color: #dce3ed; border-radius: 29px; box-shadow: 0 1px 2px rgba(20, 40, 75, .025); align-items: center; }
.copilot-form textarea { min-height: 25px; padding: 5px 0; color: #26354c; font-size: 13px; line-height: 1.45; }
.copilot-form textarea::placeholder { color: #9aa7bc; }
.copilot-composer-leading, .copilot-composer-trailing { display: grid; flex: none; place-items: center; width: 26px; height: 32px; color: #526178; }
.copilot-composer-leading { margin-right: 4px; }
.copilot-composer-trailing { margin: 0 5px 0 2px; }
.copilot-composer-leading .icon, .copilot-composer-trailing .icon { width: 18px; height: 18px; }
.copilot-send { width: 38px; height: 38px; background: #0b1933; box-shadow: 0 2px 7px rgba(12, 25, 50, .14); }
.copilot-send .icon { width: 19px; height: 19px; transform: none; }
.copilot-report { display: flex; flex-direction: column; gap: 15px; margin: 18px 0 8px -33px; }
.copilot-report-chart-card, .copilot-report-metric, .copilot-report-insights { border: 1px solid #e4e9f1; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(24, 42, 77, .025); }
.copilot-report-chart-card { padding: 18px 18px 12px; }
.copilot-report-chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.copilot-report-chart-heading strong { color: #152035; font-size: 13px; }
.copilot-report-legend { display: flex; flex-wrap: wrap; gap: 12px; color: #536078; font-size: 10px; }
.copilot-report-legend span { display: flex; align-items: center; gap: 6px; }
.copilot-report-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #aeb5c0; }
.copilot-report-legend .copilot-report-legend-current::before { background: #2678f1; }
.copilot-report-chart { display: block; width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.copilot-report-gridline { stroke: #e9edf4; stroke-width: 1; }
.copilot-report-axis { fill: #7c8aa2; font-size: 11px; }
.copilot-report-bar-previous { fill: #b0b6c1; }
.copilot-report-bar-current { fill: #3381f2; }
.copilot-report-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.copilot-report-metric { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 13px 15px; }
.copilot-report-metric span { color: #69778e; font-size: 10px; }
.copilot-report-metric strong { color: #111d33; font-size: clamp(16px, 2.1vw, 21px); line-height: 1.2; }
.copilot-report-metric small { color: #79869b; font-size: 10px; line-height: 1.25; }
.copilot-report-insights { display: flex; gap: 12px; padding: 14px 16px; }
.copilot-report-insights-icon { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #eef4ff; color: #2479f0; font-size: 17px; }
.copilot-report-insights strong { color: #152035; font-size: 12px; }
.copilot-report-insights ul { margin: 7px 0 0; padding-left: 17px; color: #5f6d83; font-size: 11px; line-height: 1.55; }
.copilot-avatar { background: #f2f5f9; color: #31506e; animation: none; }
.copilot-hero-icon { background: #f2f5f9; color: #31506e; }
.copilot-status { display: inline-flex; align-items: center; gap: 9px; min-height: 30px; margin: 1px 0 9px; color: #58677d; font-size: 12px; font-weight: 600; line-height: 1.4; }
.copilot-status::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #5d718c; animation: copilot-status-pulse 1.6s ease-in-out infinite; }
.copilot-status[hidden] { display: none; }
@keyframes copilot-status-pulse { 50% { opacity: .35; transform: scale(.8); } }
.copilot-resource-link { display: inline-flex; align-items: center; width: fit-content; min-height: 35px; margin-top: 13px; padding: 7px 12px; border: 1px solid #d8e2ef; border-radius: 9px; color: #245788; background: #f8fafc; font-size: 12px; font-weight: 700; text-decoration: none; }
.copilot-resource-link:hover, .copilot-resource-link:focus-visible { border-color: #b7cce8; background: #eef4fb; }
.copilot-read-aloud { display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 31px; margin: 10px 0 0 9px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: #6a788c; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.copilot-read-aloud:hover, .copilot-read-aloud:focus-visible { background: #f1f4f8; color: #243e5d; }
.copilot-read-aloud:disabled { opacity: .55; cursor: wait; }
.copilot-read-aloud .icon { width: 14px; height: 14px; }
.copilot-mic { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #526178; cursor: pointer; }
.copilot-mic:hover, .copilot-mic:focus-visible { background: #f0f3f8; color: #1d385b; }
.copilot-mic.is-recording { background: #fff1f1; color: #b93747; box-shadow: 0 0 0 3px rgba(185, 55, 71, .1); }
.copilot-mic:disabled { opacity: .5; cursor: wait; }
.copilot-mic .icon { width: 18px; height: 18px; }
.copilot-voice-status { margin: 7px 16px 0; color: #67758b; font-size: 11px; }
.copilot-voice-status[hidden] { display: none; }
.copilot-voice-status.copilot-voice-error { color: #b93747; }
.copilot-voice-panel { flex: none; width: 100%; margin: 0 0 12px; padding: 17px 19px; border: 1px solid #dce5f0; border-radius: 18px; background: #fff; box-shadow: 0 6px 24px rgba(26, 45, 72, .06); }
.copilot-voice-panel[hidden], .copilot-voice-wave[hidden], .copilot-voice-panel [hidden] { display: none; }
.copilot-voice-panel-head { display: flex; align-items: flex-start; gap: 12px; }
.copilot-voice-panel-icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #eef4fb; color: #315b8a; }
.copilot-voice-panel-icon .icon { width: 17px; height: 17px; }
.copilot-voice-panel-head > div { flex: 1; min-width: 0; }
.copilot-voice-panel-head strong { display: block; color: #17243a; font-size: 13px; line-height: 1.4; }
.copilot-voice-panel-head p { margin: 3px 0 0; color: #68788f; font-size: 12px; line-height: 1.5; }
.copilot-voice-close { display: grid; flex: none; place-items: center; width: 29px; height: 29px; border: 0; border-radius: 8px; background: transparent; color: #728096; cursor: pointer; }
.copilot-voice-close:hover, .copilot-voice-close:focus-visible { background: #f1f4f8; color: #263c58; }
.copilot-voice-close .icon { width: 15px; height: 15px; }
.copilot-voice-wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 66px; margin: 12px 0 2px; overflow: hidden; }
.copilot-voice-wave-bar { display: block; flex: none; width: 4px; height: 7px; border-radius: 99px; background: #3374c8; transition: height 70ms ease-out; }
.copilot-voice-wave-bar:nth-child(3n) { background: #6a9bdb; }
.copilot-voice-permission-help { margin: 12px 0 0; padding: 11px 12px; border-radius: 10px; background: #f5f7fa; color: #53647b; font-size: 11px; line-height: 1.55; }
.copilot-voice-permission-help strong { color: #243c59; }
.copilot-voice-panel-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.copilot-voice-panel-actions .button { min-height: 32px; padding: 6px 12px; font-size: 11px; }
.copilot-voice-timer { margin-right: auto; color: #52657c; font-size: 12px; font-variant-numeric: tabular-nums; }
.copilot-voice-panel[data-state="recording"] .copilot-voice-panel-icon { background: #fff1f1; color: #bb3d4b; }
.copilot-voice-panel[data-state="blocked"] .copilot-voice-panel-icon { background: #fff5eb; color: #af6533; }
@media (prefers-reduced-motion: reduce) { .copilot-status::before { animation: none; } }
@media (max-width: 650px) {
  .copilot-empty { padding-top: clamp(42px, 10vh, 88px); }
  .copilot-suggestions { gap: 10px; }
  .copilot-suggestion { min-height: 130px; padding: 13px; }
  .copilot-suggestion .copilot-suggestion-arrow { right: 11px; bottom: 12px; }
  .copilot-report { margin-left: -43px; }
}
@media (max-width: 430px) {
  .copilot-suggestions { grid-template-columns: 1fr; }
  .copilot-suggestion { min-height: 105px; }
  .copilot-report-metrics { grid-template-columns: 1fr; }
  .copilot-report-chart-heading { align-items: flex-start; flex-direction: column; }
}
.copilot-empty h2 {
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 560;
    letter-spacing: -.035em;
}

.copilot-brand-label { display: block; margin: -8px 0 12px; color: #526993; font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }

.topbar-agent-link {
  --ask-xfloww-ink: #29446f;
  --ask-xfloww-glint: #8298d1;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 4px 5px;
  color: var(--ask-xfloww-ink);
  text-decoration: none;
  white-space: nowrap;
}

.topbar-agent-link .icon { width: 17px; height: 17px; flex: none; }

.topbar-agent-link span {
  background: linear-gradient(100deg, var(--ask-xfloww-ink) 18%, var(--ask-xfloww-ink) 36%, var(--ask-xfloww-glint) 49%, var(--ask-xfloww-ink) 62%, var(--ask-xfloww-ink) 82%);
  background-size: 220% 100%;
  background-position: 100% 50%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: 12px;
  font-weight: 700;
  animation: ask-xfloww-shine 6s ease-in-out infinite;
}

.topbar-agent-link:hover .icon { color: #5271ba; }
.topbar-agent-link:focus-visible { outline: 2px solid #365c9c; outline-offset: 2px; border-radius: 4px; }
.dark-mode .topbar-agent-link { --ask-xfloww-ink: #b9c9f0; --ask-xfloww-glint: #f1f4ff; }

@keyframes ask-xfloww-shine {
  0%, 15% { background-position: 100% 50%; }
  55%, 100% { background-position: 0% 50%; }
}

@media (max-width: 650px) {
  .topbar-agent-link { gap: 5px; padding: 3px 2px; }
  .topbar-agent-link span { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .topbar-agent-link span { background: none; color: var(--ask-xfloww-ink); animation: none; }
}
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Email account list and editors */
.email-accounts-header { align-items: center; }
.email-accounts-header .button { flex: none; }
.email-accounts-list { margin-bottom: 18px; }
.email-accounts-list-heading { padding: 22px 24px 17px; border-bottom: 1px solid var(--border); }
.email-accounts-list-heading h2 { margin: 0 0 4px; }
.email-accounts-list-heading p { margin: 0; color: var(--muted); }
.email-accounts-empty { padding: 38px 24px; text-align: center; }
.email-accounts-empty h3 { margin: 0 0 5px; }
.email-accounts-empty p { margin: 0; color: var(--muted); }
.email-account-item { padding: 22px 24px; }
.email-account-item + .email-account-item { border-top: 1px solid var(--border); }
.email-account-summary, .email-account-identity, .email-account-actions { display: flex; align-items: center; gap: 12px; }
.email-account-summary { justify-content: space-between; }
.email-account-identity { min-width: 0; }
.email-account-identity h3 { margin: 0 0 3px; font-size: 16px; }
.email-account-identity p { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 13px; }
.email-account-avatar { display: grid; width: 42px; height: 42px; flex: none; place-items: center; border-radius: 11px; background: #eef3fa; color: #315fcf; }
.email-account-avatar .icon { width: 20px; height: 20px; }
.email-account-status, .email-account-connection { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.email-account-status.is-active, .email-account-connection.is-connected { background: #e8f6ee; color: #19714b; }
.email-account-status.is-paused, .email-account-connection { background: #f2f3f5; color: #6b7280; }
.email-account-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 19px 0 18px; color: var(--muted); font-size: 13px; }
.email-account-meta > span { min-width: 0; overflow-wrap: anywhere; }
.email-account-meta strong { margin-right: 7px; color: var(--text); }
.email-account-meta .email-account-connection { margin-left: 6px; }
.email-account-error { margin: -3px 0 16px; color: #a33b34; font-size: 12px; }
.email-account-actions { flex-wrap: wrap; gap: 8px; padding-top: 15px; border-top: 1px solid var(--border); }
.email-account-actions form { margin: 0; }
.email-account-actions .text-button { min-height: 38px; padding-inline: 9px; }
.email-account-edit { width: 100%; }
.email-account-edit:not([open]) { width: auto; }
.email-account-edit > summary { display: inline-flex; list-style: none; cursor: pointer; }
.email-account-edit > summary::-webkit-details-marker { display: none; }
.email-account-edit > form { margin-top: 18px; padding: 21px; border: 1px solid var(--border); border-radius: 10px; background: #fafbfc; }
.email-account-edit .checkbox-row, .email-account-modal .checkbox-row { margin: 3px 0 18px; }
.email-account-modal .modal-panel { width: min(780px, calc(100% - 28px)); }
.email-account-modal .modal-panel header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.email-account-modal .modal-panel form { gap: 16px; }
.email-account-modal .modal-panel footer { margin-top: 0; }

@media (max-width: 720px) {
  .email-accounts-header { align-items: flex-start; }
  .email-account-meta { grid-template-columns: 1fr; }
  .email-account-summary { align-items: flex-start; }
  .email-account-item, .email-accounts-list-heading { padding: 18px; }
  .email-account-edit > form { padding: 16px; }
}

/* Agent channel and section tabs */
.agent-config-editor { min-width: 0; }
.agent-main-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.agent-main-tabs button { min-width: 108px; min-height: 40px; border: 1px solid var(--border); border-radius: 999px; padding: 8px 19px; background: var(--surface); color: var(--muted); font: inherit; font-weight: 650; cursor: pointer; }
.agent-main-tabs button:hover { border-color: #aab4c5; color: var(--text); }
.agent-main-tabs button.active { border-color: #182033; background: #182033; color: #fff; }
.agent-main-tabs button[hidden], .agent-subtabs [hidden], .agent-editor-layout [data-agent-section][hidden], .agent-editor-layout [data-voice-preview-panel][hidden] { display: none !important; }
.agent-editor-layout { grid-template-columns: 190px minmax(0, 1fr) 245px; gap: 20px; }
.agent-editor-layout.agent-editor-create { grid-template-columns: 190px minmax(0, 1fr); max-width: 1100px; }
.agent-subtabs { gap: 0; padding-top: 11px; }
.agent-subtabs > div { display: flex; flex-direction: column; gap: 5px; }
.agent-subtabs button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; border: 0; border-radius: 8px; padding: 10px 13px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.agent-subtabs button .icon { width: 16px; height: 16px; flex: none; }
.agent-subtabs button:hover { background: #f3f5f8; color: var(--text); }
.agent-subtabs button.active { background: #edf2f9; color: #244b91; }
.agent-editor-layout .editor-form { gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.agent-editor-layout .form-card { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 24px 26px; }
.agent-editor-layout .form-card:not([hidden]) ~ .form-card:not([hidden]) { border-top: 1px solid var(--border); }
.agent-editor-layout .form-card-heading { margin-bottom: 20px; }
.agent-editor-layout .sticky-actions { margin-top: auto; border-top: 1px solid var(--border); padding: 17px 25px; }
.agent-editor-layout .channel-help { margin: 0; color: var(--muted); font-size: 12px; }

@media (max-width: 1150px) {
  .agent-editor-layout { grid-template-columns: 175px minmax(0, 1fr); }
  .agent-editor-layout .editor-actions-panel { grid-column: 2; position: static; flex-direction: row; }
  .agent-editor-layout .editor-actions-panel > * { flex: 1; }
}
@media (max-width: 820px) {
  .agent-editor-layout, .agent-editor-layout.agent-editor-create { grid-template-columns: minmax(0, 1fr); }
  .agent-subtabs { position: static; overflow-x: auto; padding: 0 0 10px; }
  .agent-subtabs > div { flex-direction: row; white-space: nowrap; }
  .agent-subtabs button { width: auto; flex: none; }
  .agent-editor-layout .editor-actions-panel { grid-column: 1; }
}
@media (max-width: 620px) {
  .agent-main-tabs { gap: 6px; }
  .agent-main-tabs button { min-width: 0; padding-inline: 15px; }
  .agent-editor-layout .form-card { padding: 19px; }
  .agent-editor-layout .sticky-actions { padding: 16px 19px; }
  .agent-editor-layout .editor-actions-panel { flex-direction: column; }
}
.mail-analysis-card { padding: 22px 24px; }
.mail-analysis-card dl { display: grid; gap: 10px; margin: 17px 0 0; }
.mail-analysis-card dl > div { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 16px; border-top: 1px solid var(--border); padding-top: 10px; }
.mail-analysis-card dt { font-weight: 650; }
.mail-analysis-card dd { margin: 0; overflow-wrap: anywhere; }
.mail-log-filter-row { grid-template-columns: 1fr 1.15fr 1.35fr 1.1fr 1.1fr auto auto; }
.mail-log-table { min-width: 1320px; table-layout: fixed; }
.mail-col-customer { width: 18%; }
.mail-col-subject { width: 18%; }
.mail-col-agent { width: 18%; }
.mail-col-mailbox { width: 15%; }
.mail-col-classification { width: 10%; }
.mail-col-status { width: 8%; }
.mail-col-received { width: 11%; }
.mail-col-action { width: 2%; }
.mail-log-table td { min-width: 0; overflow: hidden; }
.mail-log-table .resource-name,
.mail-log-table .mail-log-cell-copy { min-width: 0; }
.mail-log-table .mail-log-cell-copy { display: block; overflow: hidden; }
.mail-log-table .mail-log-cell-copy strong,
.mail-log-table .mail-log-cell-copy small,
.mail-log-table .mail-log-subject,
.mail-log-table .mail-log-ellipsis { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-log-table .mail-log-subject { max-width: none; }
.mail-log-table .status { max-width: 100%; }
.mail-log-table .status i { flex: none; }
.mail-log-table .direction-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-log-table .icon-button { flex: none; }
.mail-detail-console .call-hero-heading > div:first-child,
.mail-detail-console .call-customer-title > div { min-width: 0; }
.mail-detail-console .call-customer-title h1 { overflow-wrap: anywhere; }
.mail-detail-console .call-fact-grid strong { overflow-wrap: anywhere; }
.mail-conversation-list { display: grid; gap: 20px; }
.mail-conversation-list .transcript-turn { margin: 0; align-items: start; }
.mail-conversation-list .transcript-turn > div { min-width: 0; }
.mail-conversation-list .transcript-turn header { align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.mail-message-heading { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 3px; }
.mail-message-heading strong { max-width: 100%; overflow-wrap: anywhere; line-height: 1.4; }
.mail-message-heading small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.mail-conversation-list .transcript-turn time { flex: none; padding-top: 2px; white-space: nowrap; }
.mail-conversation-list .mail-body { margin: 0; padding: 15px 17px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-detail-console .call-panel-heading { align-items: flex-start; gap: 16px; }
.mail-detail-console .call-panel-heading > div { min-width: 0; }
.mail-detail-console .call-panel-heading h2 { margin-top: 7px; }
.mail-detail-console .call-panel-heading p { margin-top: 6px; }
.mail-detail-console .call-panel-heading > .status { flex: none; }
.mail-detail-console .status-replied,
.mail-log-table .status-replied { border-color: #bde6d2; background: #ecf9f2; color: #147752; }
.mail-detail-console .status-replied i,
.mail-log-table .status-replied i { background: #24a76f; }
.mail-detail-console .status-escalated,
.mail-log-table .status-escalated,
.mail-detail-console .status-failed,
.mail-log-table .status-failed { border-color: #f4c5ce; background: #fff0f2; color: #bc4256; }
.mail-detail-console .status-escalated i,
.mail-log-table .status-escalated i,
.mail-detail-console .status-failed i,
.mail-log-table .status-failed i { background: #e05b72; }
.mail-detail-console .status-drafted,
.mail-log-table .status-drafted { border-color: #f4dfad; background: #fff8e8; color: #946316; }
.mail-detail-console .status-drafted i,
.mail-log-table .status-drafted i { background: #d69a29; }
.mail-detail-console .status-ignored,
.mail-log-table .status-ignored { border-color: var(--border); background: var(--surface-soft); color: var(--muted); }
.mail-detail-console .status-processing,
.mail-log-table .status-processing,
.mail-detail-console .status-sending,
.mail-log-table .status-sending { border-color: #cbdcff; background: #f0f5ff; color: #376bb5; }
.mail-detail-console .status-processing i,
.mail-log-table .status-processing i,
.mail-detail-console .status-sending i,
.mail-log-table .status-sending i { background: #4d84d4; }
.mail-detail-console .call-subsection form { display: grid; gap: 12px; margin-top: 15px; }
.mail-detail-console .call-subsection form > .button { justify-self: start; }
.mail-history-list article p, .mail-action-list article p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.mail-history-list article a { color: inherit; }
.mail-history-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 11px; color: var(--muted); font-size: 11px; }
.mail-thread-links { display: grid; gap: 8px; }
.mail-thread-links a { display: flex; justify-content: space-between; gap: 12px; color: var(--text); font-size: 12px; text-decoration: none; }
.mail-thread-links a:hover { color: var(--accent); }
.mail-thread-links span { flex: none; color: var(--muted); }
.mail-action-list header strong { display: inline-flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.mail-action-list header .icon { width: 16px; height: 16px; color: var(--muted); }
.mail-action-list details { margin-top: 12px; }
.mail-action-list summary { cursor: pointer; color: var(--accent); font-size: 11px; }
.mail-action-list pre { max-height: 280px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; }
.mail-detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.mail-detail-facts > div { min-width: 0; border: 1px solid var(--border); border-radius: 9px; padding: 13px; }
.mail-detail-facts dt { color: var(--muted); font-size: 10px; }
.mail-detail-facts dd { margin: 6px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }
@media (max-width: 1280px) { .mail-log-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .mail-log-filter-row, .mail-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .mail-log-filter-row, .mail-detail-facts { grid-template-columns: 1fr; } .mail-thread-links a { display: block; } }
@media (max-width: 700px) { .mail-conversation-list .transcript-turn header { flex-direction: column; gap: 4px; } .mail-conversation-list .transcript-turn time { padding: 0; } .mail-detail-console .call-panel-heading { flex-wrap: wrap; } }
