:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #647084;
  --line: #e3e7ee;
  --green: #0f9f6e;
  --blue: #2563eb;
  --red: #dc2626;
  --yellow: #b7791f;
  --shadow: 0 18px 50px rgba(23, 32, 51, .08);
}

/* CHIP TALKS DESIGN SYSTEM v2 */
:root {
  --bg: #eef3f7;
  --panel: #ffffff;
  --ink: #0b2433;
  --muted: #6a7d8f;
  --line: #dce7ec;
  --green: #0f9f6e;
  --green-strong: #087955;
  --nav: #062b3a;
  --nav-hover: #0b4355;
  --shadow-soft: 0 8px 24px rgba(6, 43, 58, .06);
  --shadow-card: 0 12px 30px rgba(6, 43, 58, .06);
}
html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); line-height: 1.45; font-size: 14px; }
.app-shell { display: block; min-height: 100vh; }
.app-topnav { position: sticky; top: 0; z-index: 50; min-height: 76px; height: 76px; padding: 0 clamp(18px, 3vw, 40px); display: flex; align-items: center; gap: 22px; background: var(--nav); border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: 0 6px 20px rgba(6,43,58,.12); }
.top-brand { flex: 0 0 auto; display: flex; gap: 12px; align-items: center; }
.top-brand .brand-mark { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg,#0f9f6e,#12c9a0); box-shadow: none; }
.top-brand strong { color: #f8fafc; font-size: 21px; font-weight: 760; }
.top-brand small { display: none; }
.top-menu { flex: 1 1 auto; justify-content: center; display: flex; gap: 5px; min-width: 0; }
.top-menu-group { position: relative; display: flex; align-items: center; }
.top-menu-link { min-height: 46px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border-radius: 10px; color: #e7f2f4; font-size: 14px; font-weight: 650; white-space: nowrap; transition: background .16s,color .16s; }
.top-menu-link:hover, .top-menu-group:hover > .top-menu-link { background: var(--nav-hover); color: #fff; }
.top-menu-group.active > .top-menu-link { background: var(--nav-hover); box-shadow: inset 0 -3px 0 #14b889; }
.nav-icon { width: 21px; height: 21px; display: grid; place-items: center; color: #b7ded1; background: none; border: 0; }
.nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.nav-chevron { color: #9be8cf; font-size: 10px; margin-left: 2px; }
.top-submenu { position: absolute; top: calc(100% - 2px); left: 0; min-width: 210px; padding: 8px; display: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 34px rgba(6,43,58,.14); }
.top-menu-group:hover .top-submenu, .top-submenu:hover { display: grid; gap: 3px; }
.top-submenu a { padding: 10px 12px; border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 650; }
.top-submenu a:hover, .top-submenu a.active { background: #eefaf5; color: var(--green-strong); }
.topnav-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.topnav-actions .user-pill { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: #0f9f6e; color: #fff; border: 0; }
.topnav-actions .btn.secondary { min-height: 40px; padding: 0 13px; background: transparent; border-color: #2a5a6b; color: #f8fafc; }
.main { width: min(100% - 48px,1680px); margin: 0 auto; padding: 28px 0 52px; min-width: 0; }
.topbar { margin-bottom: 20px; }
h1 { font-size: 32px; letter-spacing: -.025em; }
.eyebrow { color: #0f9f6e; }
.card { border-radius: 12px; box-shadow: var(--shadow-soft); border-color: var(--line); }
.btn { border-radius: 9px; min-height: 42px; }
.btn.secondary { background: #fff; border-color: #cbd9e2; color: #173b50; }
input, select, textarea { border-color: #cbd9e2; border-radius: 8px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15,159,110,.12); border-color: #0f9f6e; }
.connect-banner, .ai-off-banner { margin-bottom: 10px; padding: 9px 12px; border-radius: 9px; background: #f7fafb; border: 1px solid #d7e5eb; color: #547083; font-size: 12px; font-weight: 600; }
.connect-banner span, .ai-off-banner span { color: #214b60; font-weight: 750; }
.connect-banner a, .ai-off-banner a { float: right; color: var(--green-strong); font-weight: 750; }
.sdr-metric-band { border-radius: 14px; box-shadow: var(--shadow-card); }
.dashboard-workspace { grid-template-columns: minmax(0,1fr) 320px; gap: 20px; }

/* Inbox */
body.page-inbox .main { width: 100%; padding: 0 0 30px; }
body.page-inbox .topbar { padding: 24px 30px 18px; margin: 0; border-bottom: 1px solid var(--line); }
body.page-inbox .connect-banner, body.page-inbox .ai-off-banner { margin: 10px 30px; }
body.page-inbox .support-topbar { padding: 22px 30px 18px; }
body.page-inbox .inbox-layout { grid-template-columns: 360px minmax(0,1fr); gap: 0; min-height: calc(100vh - 220px); }
body.page-inbox .support-queue { border-radius: 0; border-left: 0; border-top: 0; border-bottom: 0; box-shadow: none; background: #fff; }
body.page-inbox .inbox-detail-grid { grid-template-columns: minmax(0,1fr) 310px; gap: 0; min-width: 0; }
body.page-inbox .inbox-thread-card { border-radius: 0; border-top: 0; border-bottom: 0; box-shadow: none; min-width: 0; }
body.page-inbox .lead-side-panel { border-radius: 0; border-right: 0; border-top: 0; border-bottom: 0; box-shadow: none; background: #fff; padding: 0 18px 24px; }
body.page-inbox .support-search { padding: 14px 16px; border-bottom: 1px solid var(--line); }
body.page-inbox .priority-group-head { min-height: 54px; padding: 0 16px; }
body.page-inbox .conversation-row { border: 0; border-radius: 0; padding: 13px 16px; border-bottom: 1px solid #edf2f5; }
body.page-inbox .conversation-row:hover { background: #f6fbf9; }
body.page-inbox .conversation-row.active { background: #edf9f4; box-shadow: inset 3px 0 0 var(--green); }
body.page-inbox .thread-body { background: #fbf8f2; padding: 28px; }
body.page-inbox .message { max-width: min(78%,520px); padding: 14px 16px; border-radius: 12px; box-shadow: 0 4px 14px rgba(6,43,58,.05); }
body.page-inbox .message.inbound { background: #fff; border: 1px solid #e3e7e9; }
body.page-inbox .message.outbound { background: #dcf8e7; border: 1px solid #bde8cd; margin-left: auto; }
body.page-inbox .thread-header { padding: 16px 22px; margin: 0; border-bottom: 1px solid var(--line); }
body.page-inbox .thread-composer { padding: 14px 20px 18px; border-top: 1px solid var(--line); background: #fff; }

/* Templates and builder */
.template-stat-grid { gap: 14px; }
.template-stat-grid article { min-height: 122px; border-radius: 12px; box-shadow: var(--shadow-soft); border-color: var(--line); }
.template-filter-card { padding: 16px; box-shadow: var(--shadow-soft); }
.template-manager-table-card { overflow: hidden; box-shadow: var(--shadow-card); }
.template-table-wrap { overflow: auto; }
.template-manager-table th { color: #607789; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.template-manager-table td { vertical-align: middle; }
.template-row-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.template-builder-shell { grid-template-columns: minmax(0,1fr) minmax(390px,460px); gap: 20px; align-items: start; }
.template-form-panel, .template-preview-panel { border-radius: 14px; box-shadow: var(--shadow-card); }
.template-preview-sticky { position: sticky; top: 96px; }
.template-section { padding: 22px 24px; border-bottom: 1px solid #e7edf3; }
.template-section h3 { color: #173b50; }
.template-media-picker { border: 1px dashed #9bcfbd; border-radius: 12px; background: #f5fbf8; padding: 16px; }
.template-upload-box { min-height: 94px; border: 1px dashed #85bfae; border-radius: 10px; background: #fff; }
.wa-preview { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); }
.test-template-layout { grid-template-columns: minmax(0,1fr) minmax(430px,.95fr); gap: 20px; align-items: start; }
.test-template-form, .test-template-preview { border-radius: 14px; box-shadow: var(--shadow-card); }
.test-template-preview { position: sticky; top: 96px; }

/* Account settings */
.account-settings-page { max-width: 1500px; margin: 0 auto; }
.account-settings-shell { border-radius: 14px; box-shadow: var(--shadow-card); }
.account-settings-tabs, .account-settings-content { background: #fff; }
.account-settings-page .btn-primary, .account-settings-page .save-button { background: #0f9f6e; border-color: #0f9f6e; }

@media (max-width:1180px) {
  .top-menu-link { padding-left: 9px; padding-right: 9px; font-size: 13px; }
  .top-brand strong { font-size: 19px; }
  .main { width: min(100% - 32px,1680px); }
  body.page-inbox .inbox-layout { grid-template-columns: 320px minmax(0,1fr); }
  body.page-inbox .inbox-detail-grid { grid-template-columns: minmax(0,1fr) 280px; }
}
@media (max-width:900px) {
  .app-topnav { gap: 12px; }
  .top-brand strong { display: none; }
  .top-menu { justify-content: flex-start; overflow-x: auto; }
  .top-menu-link { min-height: 42px; }
  body.page-inbox .inbox-layout, body.page-inbox .inbox-detail-grid { grid-template-columns: 1fr; }
  body.page-inbox .lead-side-panel { border-top: 1px solid var(--line); }
  .template-builder-shell, .test-template-layout, .dashboard-workspace { grid-template-columns: 1fr; }
  .template-preview-sticky, .test-template-preview { position: static; }
}
@media (max-width:640px) {
  .app-topnav { min-height: 64px; height: 64px; padding: 0 12px; }
  .top-menu-link .nav-label { display: none; }
  .top-menu-link { padding: 0 9px; }
  .topnav-actions .user-pill { width: 34px; height: 34px; }
  .topnav-actions .btn.secondary { font-size: 0; width: 36px; padding: 0; }
  .main { width: min(100% - 20px,1680px); padding-top: 18px; }
  body.page-inbox .topbar, body.page-inbox .support-topbar { padding-left: 14px; padding-right: 14px; }
  body.page-inbox .connect-banner, body.page-inbox .ai-off-banner { margin-left: 14px; margin-right: 14px; }
  .support-live-cards { flex-wrap: wrap; }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: #111827; color: #fff; padding: 22px; }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: var(--green); font-weight: 800; }
.brand small { display: block; color: #a7b0c0; margin-top: 2px; }
.nav { display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; color: #cbd5e1; padding: 10px; border-radius: 8px; font-weight: 650; }
.nav-item span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.08); font-size: 12px; }
.nav-item.active, .nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.main { padding: 28px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 22px; }
.eyebrow { margin: 0 0 4px; color: var(--green); font-size: 12px; text-transform: uppercase; font-weight: 800; letter-spacing: .08em; }
h1 { margin: 0; font-size: 30px; line-height: 1.1; }
h2 { margin: 0 0 14px; font-size: 18px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-pill { padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: var(--shadow); }
.metric strong { display: block; font-size: 28px; margin-top: 4px; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; background: var(--green); color: #fff; font-weight: 750; cursor: pointer; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--red); }
.btn.compact { min-height: 34px; padding: 0 10px; font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form { margin: 0; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; }
label { font-size: 13px; color: var(--muted); font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
.checkline { display: flex; gap: 8px; align-items: center; color: var(--ink); }
.checkline input { width: auto; min-height: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 11px 8px; vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-gray { background: #eef2f7; color: #475569; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 700; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.warning { background: #fef3c7; color: #92400e; }
.crm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}
.crm-hero h2 { font-size: 26px; margin: 0 0 8px; }
.crm-hero p { max-width: 820px; }
.crm-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.crm-metrics { margin-top: 12px; }
.metric small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.status-card.is-safe { border-color: #fed7aa; background: #fff7ed; }
.status-card.is-safe strong { color: #c2410c; }
.status-card.is-live { border-color: #bbf7d0; background: #f0fdf4; }
.status-card.is-live strong { color: #15803d; }
.crm-command-row { margin-top: 16px; }
.task-list, .lead-rank { display: grid; gap: 10px; }
.task-item, .rank-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px;
}
.task-item:hover, .rank-row:hover { border-color: #bfdbfe; background: #f8fafc; }
.task-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 900;
}
.task-item small, .rank-row small { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }
.pipeline-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
}
.pipeline-strip a {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}
.pipeline-strip a:hover { border-color: #bbf7d0; background: #f8fffb; }
.pipeline-strip strong { font-size: 24px; }
.sdr-metric-band {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.sdr-metric-band article {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}
.sdr-metric-band article:first-child { border-left: 0; }
.sdr-metric-band span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.sdr-metric-band strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}
.sdr-metric-band small {
  color: var(--muted);
  font-size: 12px;
}
.dashboard-tabs {
  display: flex;
  gap: 22px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.dashboard-tabs a {
  position: relative;
  padding: 0 0 13px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.dashboard-tabs a.active {
  color: var(--green);
}
.dashboard-tabs a.active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: var(--green);
}
.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}
.dashboard-main,
.dashboard-side {
  display: grid;
  gap: 18px;
}
.dashboard-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.dashboard-card-head h2 { margin: 0; }
.period-tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.period-tabs span {
  min-width: 40px;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  border-left: 1px solid var(--line);
}
.period-tabs span:first-child { border-left: 0; }
.period-tabs span.active {
  color: #fff;
  background: var(--green);
}
.sdr-chart-card { min-height: 360px; }
.sdr-chart {
  position: relative;
  min-height: 260px;
  margin: 6px 4px 0 20px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(to bottom, rgba(226,232,240,.55) 1px, transparent 1px) 0 0 / 100% 50%,
    linear-gradient(to right, rgba(226,232,240,.45) 1px, transparent 1px) 0 0 / 10% 100%;
}
.chart-y {
  position: absolute;
  left: -22px;
  color: var(--muted);
  font-size: 12px;
}
.chart-y.top { top: -4px; }
.chart-y.bottom { bottom: -7px; }
.chart-line {
  position: absolute;
  left: 0;
  height: 4px;
  border-radius: 999px;
}
.chart-line.total {
  right: 0;
  bottom: 0;
  background: #94a3b8;
}
.chart-line.qualified {
  bottom: 0;
  background: var(--green);
}
.chart-labels {
  position: absolute;
  left: -3px;
  right: 0;
  bottom: -28px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}
.legend-total { background: #94a3b8; }
.legend-qualified { background: var(--green); }
.dashboard-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.channel-empty {
  min-height: 248px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}
.channel-empty span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eefdf7;
  color: var(--green);
  font-weight: 900;
}
.channel-empty strong { color: var(--ink); }
.heatmap {
  display: grid;
  grid-template-columns: 36px repeat(8, 1fr);
  gap: 5px;
  align-items: center;
  min-height: 248px;
}
.heat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.heat-cell {
  min-height: 28px;
  border-radius: 5px;
  background: #edf4f1;
}
.heat-cell.active {
  background: #bbf7d0;
}
.live-dot {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}
.live-dot:before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--green);
  vertical-align: 1px;
}
.activity-list { display: grid; gap: 10px; min-height: 96px; }
.activity-list a {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}
.activity-list a:hover { border-color: #bbf7d0; background: #f8fffb; }
.activity-list small {
  color: var(--muted);
  line-height: 1.35;
}
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quick-grid a {
  min-height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 850;
}
.quick-grid a:hover { background: #ecfdf5; }
.quick-grid span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #dcfce7;
  color: #047857;
  font-weight: 900;
}
.mini-link {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}
.lead-rank.compact .rank-row {
  grid-template-columns: 40px minmax(0, 1fr);
}
.lead-rank.compact .rank-row .badge {
  grid-column: 2;
  justify-self: start;
}
.connect-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
}
.connect-hero h2 {
  font-size: 28px;
  margin-bottom: 8px;
}
.connect-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.connect-option {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.connect-option.selected {
  border-color: #22c55e;
  background: #f0fdf4;
}
.connect-option strong {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 18px;
}
.connect-option em {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ede9fe;
  color: #7c3aed;
  font-size: 12px;
  font-style: normal;
}
.connect-option p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.35;
}
.connect-option small {
  color: #8a97aa;
  font-weight: 750;
}
.connect-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 25px;
  font-weight: 900;
}
.connect-icon.alt {
  background: #f3e8ff;
  color: #9333ea;
}
.connect-grid {
  align-items: start;
}
.connect-checklist {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.connect-checklist div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}
.connect-checklist div.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.connect-checklist strong,
.connect-checklist small {
  display: block;
}
.connect-checklist small {
  margin-top: 4px;
  color: var(--muted);
}
.connect-launch {
  width: 100%;
  margin-bottom: 10px;
}
.connect-launch:disabled {
  background: #e5e7eb;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}
.connect-note {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
}
.connect-note p {
  margin: 6px 0 0;
  color: #9a3412;
  line-height: 1.45;
}
.coexistence-safety {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-color: #bfded5;
  background: #f4fbf8;
}
.coexistence-safety-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #d9f5e8;
  color: #087a5a;
  font-size: 15px;
}
.coexistence-safety strong { color: #123f35; }
.coexistence-safety p { margin: 4px 0 0; color: #50736a; font-size: 13px; line-height: 1.45; }
.coexistence-roadmap { margin-top: 16px; padding: 0; overflow: hidden; }
.coexistence-roadmap-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.coexistence-roadmap-head h2 { margin: 3px 0 0; font-size: 20px; }
.coexistence-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 14px; }
.coexistence-steps article { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; min-height: 92px; padding: 12px; }
.coexistence-steps article:not(:last-child)::after { content: ''; position: absolute; top: 29px; right: -6px; width: 12px; height: 1px; background: #cfdae0; }
.coexistence-steps article > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #cbd7de; border-radius: 50%; background: #f3f6f8; color: #587080; font-size: 12px; font-weight: 800; }
.coexistence-steps article.done > span { border-color: #a8e4c9; background: #dcf7e9; color: #087854; }
.coexistence-steps strong { display: block; color: #16364b; font-size: 13px; line-height: 1.3; }
.coexistence-steps small { display: block; margin-top: 4px; color: #6b7f8e; font-size: 12px; line-height: 1.38; }
.connect-status {
  margin-top: 16px;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.status-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
}
.status-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.status-grid strong {
  word-break: break-word;
}
.coexistence-channel-status {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #c9e5dc;
  border-radius: 10px;
  background: #f6fcf9;
  color: #35665a;
  font-size: 13px;
}
.coexistence-channel-status strong { color: #0b6e53; }
.coexistence-return-card { max-width: 720px; margin: 40px auto; }
.manual-connect-card textarea {
  min-height: 132px;
}
.action-steps div {
  border-left: 4px solid #cbd5e1;
}
.action-steps div.done {
  border-left-color: #22c55e;
}
.ai-master-switch {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}
.ai-master-switch.enabled {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.ai-master-switch.disabled {
  border-color: #fed7aa;
  background: #fff7ed;
}
.ai-master-switch h2 {
  font-size: 24px;
  margin-bottom: 6px;
}
.ai-off-banner {
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
}
.ai-off-banner span {
  margin-right: 8px;
  color: #7c2d12;
  font-weight: 900;
}
.ai-off-banner a {
  float: right;
  color: #7c2d12;
  font-weight: 900;
}
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); }
.login-mark { margin-bottom: 14px; }
.conversation { display: grid; gap: 10px; }
.message { max-width: 760px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.message.inbound { border-left: 4px solid var(--green); }
.message.outbound { border-left: 4px solid var(--blue); margin-left: auto; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.inbox-layout { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.inbox-head { justify-content: space-between; align-items: flex-start; }
.inbox-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 12px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.segmented a { padding: 8px 10px; font-size: 12px; color: var(--muted); font-weight: 800; border-left: 1px solid var(--line); }
.segmented a:first-child { border-left: 0; }
.segmented a.active { background: #ecfdf5; color: #047857; }
.conversation-list { display: grid; gap: 6px; }
.conversation-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.conversation-row.active, .conversation-row:hover { background: #f8fafc; border-color: #cbd5e1; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: #e8f7ef; color: #047857; font-weight: 900; }
.conversation-main, .conversation-meta { display: grid; gap: 3px; }
.conversation-main small, .conversation-meta small { color: var(--muted); font-size: 12px; }
.conversation-meta { justify-items: end; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; display: inline-block; }
.dot.open { background: var(--green); }
.thread-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.thread-header p { margin: 4px 0 0; }
.thread-status { display: grid; justify-items: end; gap: 4px; }
.thread-body { min-height: 220px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.reply-box textarea { min-height: 92px; }
.lead-summary { display: grid; grid-template-columns: 1.35fr repeat(4, 1fr); gap: 12px; }
.summary-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.summary-card.primary { background: #0f9f6e; color: #fff; border-color: #0f9f6e; }
.summary-card span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.summary-card.primary span, .summary-card.primary small { color: rgba(255,255,255,.78); }
.summary-card strong { font-size: 28px; line-height: 1; }
.summary-card small { color: var(--muted); }
.lead-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; box-shadow: var(--shadow); }
.lead-search { display: grid; grid-template-columns: minmax(280px, 1fr) 220px 220px auto; gap: 8px; flex: 1; }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(250px, 1fr)); gap: 12px; overflow-x: auto; padding: 14px 0 8px; align-items: start; }
.kanban-col { background: #f3f5f8; border: 1px solid #dfe5ee; border-radius: 8px; padding: 10px; min-height: 420px; }
.kanban-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; padding: 4px 4px 10px; border-bottom: 1px solid #d9dee7; }
.kanban-head strong { display: block; font-size: 14px; }
.kanban-head small { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }
.stage-dot { width: 11px; height: 11px; border-radius: 50%; background: #94a3b8; margin-top: 4px; }
.stage-dot.new, .stage-dot.proposal { background: var(--blue); }
.stage-dot.contacted { background: var(--yellow); }
.stage-dot.qualified, .stage-dot.won { background: var(--green); }
.stage-dot.lost { background: var(--red); }
.kanban-stack { display: grid; gap: 10px; }
.lead-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; box-shadow: 0 8px 22px rgba(23, 32, 51, .05); display: grid; gap: 10px; }
.lead-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.lead-title { font-weight: 850; line-height: 1.2; }
.lead-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 12px; }
.lead-meta span { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 999px; padding: 4px 7px; }
.lead-ops-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lead-ops-strip .badge { min-height: 20px; font-size: 10px; padding: 0 7px; }
.schedule-box { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; display: grid; gap: 8px; }
.schedule-box h2 { margin: 0; font-size: 16px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-row span { font-size: 11px; color: #475569; background: #eef2ff; border-radius: 999px; padding: 4px 7px; font-weight: 750; }
.lead-note { margin: 0; color: #334155; font-size: 13px; line-height: 1.35; }
.follow-up { margin: 0; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 7px 8px; font-size: 12px; font-weight: 750; }
.lead-move { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.lead-move .btn { min-height: 38px; }
.lead-actions { display: flex; gap: 10px; padding-top: 2px; }
.lead-actions a { color: var(--green); font-size: 12px; font-weight: 850; }
.empty-col { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 18px 10px; text-align: center; color: var(--muted); font-size: 13px; background: rgba(255,255,255,.52); }
.inbox-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.lead-side-panel textarea { min-height: 92px; }
.lead-profile-hero { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.lead-profile-hero h2 { font-size: 26px; margin: 4px 0; }
.back-link { color: var(--green); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lead-profile-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.lead-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr); gap: 16px; align-items: start; }
.lead-timeline-card .conversation { max-height: 520px; overflow-y: auto; padding-right: 4px; }
.agent-rules-shell { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.rules-board { display: grid; gap: 12px; }
.rule-panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.rule-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 14px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.rule-panel.forbidden .rule-panel-head { background: #fff1f2; }
.rule-panel.restriction .rule-panel-head { background: #fffbeb; }
.rule-panel.goal .rule-panel-head { background: #eff6ff; }
.rule-panel.handoff .rule-panel-head { background: #f5f3ff; }
.rule-panel-head strong { display: block; }
.rule-panel-head small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.rule-list { display: grid; gap: 10px; padding: 12px; }
.rule-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; display: grid; gap: 8px; }
.rule-item p { margin: 0; color: #334155; line-height: 1.4; }
.rule-examples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rule-examples div { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #f8fafc; }
.rule-examples p { margin: 6px 0 0; color: var(--muted); line-height: 1.35; }
.agent-overview { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: stretch; margin-bottom: 14px; }
.agent-intro, .agent-status-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: var(--shadow); }
.agent-intro h2 { font-size: 24px; margin-bottom: 8px; }
.agent-intro p { max-width: 840px; }
.agent-status-card { display: grid; align-content: center; gap: 8px; }
.agent-status-card strong { font-size: 20px; }
.agent-status-card small { color: var(--muted); line-height: 1.35; }
.agent-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.agent-tabs a { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-weight: 850; color: #334155; box-shadow: 0 6px 16px rgba(23,32,51,.04); }
.agent-section { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; scroll-margin-top: 20px; }
.section-copy { position: sticky; top: 18px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.section-copy h2 { margin-bottom: 8px; }
.section-copy p { line-height: 1.4; }
.agent-rules-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.rules-groups { display: grid; gap: 12px; }
.rule-group { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.rule-group header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 14px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.rule-group.forbidden header { background: #fff1f2; }
.rule-group.restriction header { background: #fffbeb; }
.rule-group.goal header { background: #eff6ff; }
.rule-group.handoff header { background: #f5f3ff; }
.rule-group header strong { display: block; }
.rule-group header small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.rule-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; }
.rule-row p { margin: 5px 0 0; color: #334155; line-height: 1.4; }
.knowledge-list { display: grid; gap: 10px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.knowledge-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.knowledge-item p { margin: 0; color: #334155; line-height: 1.4; }
.rules-groups-v2 { display: grid; gap: 14px; }
.rule-group-v2 { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.rule-group-header-v2 { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 16px; border-bottom: 1px solid var(--line); }
.rule-group-v2.goal .rule-group-header-v2 { background: #eff6ff; }
.rule-group-v2.allowed .rule-group-header-v2 { background: #ecfdf5; }
.rule-group-v2.restriction .rule-group-header-v2 { background: #fffbeb; }
.rule-group-v2.forbidden .rule-group-header-v2 { background: #fff1f2; }
.rule-group-v2.handoff .rule-group-header-v2 { background: #f5f3ff; }
.rule-group-header-v2 strong { display: block; font-size: 16px; }
.rule-group-header-v2 small { display: block; color: var(--muted); margin-top: 5px; line-height: 1.35; font-size: 13px; }
.rule-list-v2 { display: grid; gap: 10px; padding: 12px; }
.rule-row-v2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; background: #fff; }
.rule-title-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.priority-pill { display: inline-flex; align-items: center; min-height: 22px; border-radius: 999px; background: #f1f5f9; color: #475569; padding: 0 8px; font-size: 11px; font-weight: 850; }
.rule-row-v2 p { margin: 0; color: #334155; line-height: 1.45; font-size: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.site-chat-hero { display: flex; justify-content: space-between; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.site-chat-hero h2 { font-size: 24px; margin-bottom: 6px; }
.site-chat-hero p { margin: 0; max-width: 820px; }
.site-chat-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
.chat-list { display: grid; gap: 8px; }
.chat-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.chat-row.active, .chat-row:hover { background: #f8fafc; border-color: #cbd5e1; }
.chat-row strong { display: block; line-height: 1.2; }
.chat-row small { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }
.site-chat-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.site-chat-options .checkline { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #f8fafc; }
.install-code { min-height: 150px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.install-notes { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; padding: 12px; }
.install-notes p { margin: 6px 0 0; color: var(--muted); line-height: 1.4; }
.client-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.client-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.client-stats div { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #f8fafc; }
.client-stats span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.client-stats strong { display: block; font-size: 26px; margin-top: 4px; }
.appearance-editor { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #f8fafc; }
.appearance-editor h2 { margin-bottom: 4px; }
.widget-preview { border: 1px solid #e3e7ee; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 16px 38px rgba(23,32,51,.12); }
.widget-preview.dark { background: #140b25; border-color: var(--preview-accent); color: #fff; }
.widget-preview-head { display: flex; gap: 10px; align-items: center; padding: 12px; background: #f3f4f8; border-bottom: 1px solid rgba(100,116,139,.22); }
.widget-preview.dark .widget-preview-head { background: #1d1035; }
.preview-avatar { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; overflow: hidden; background: var(--preview-accent); color: #fff; font-weight: 900; }
.preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
.widget-preview-head strong, .widget-preview-head small { display: block; }
.widget-preview-head small { color: var(--muted); font-size: 11px; }
.widget-preview.dark .widget-preview-head small { color: #d8c7ff; }
.widget-preview-body { min-height: 160px; padding: 12px; display: grid; gap: 8px; align-content: start; }
.widget-preview-body p { margin: 0; border: 1px solid #e3e7ee; border-radius: 10px; padding: 10px; line-height: 1.35; font-size: 13px; background: #fff; }
.widget-preview.dark .widget-preview-body p { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.widget-preview-body span { justify-self: start; border: 1px solid var(--preview-accent); color: var(--preview-accent); border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 850; }
.widget-preview-foot { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid rgba(100,116,139,.22); }
.widget-preview-foot small { border: 1px solid #dfe5ee; border-radius: 999px; padding: 9px 10px; color: var(--muted); }
.widget-preview-foot button { border: 0; border-radius: 999px; padding: 0 14px; background: var(--preview-primary); color: #fff; font-weight: 850; }

.connect-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .15);
}
.connect-banner span { font-weight: 900; }
.connect-banner a {
  margin-left: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #4f46e5;
  font-weight: 900;
}
.sdr-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.sdr-command-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.sdr-command-card:hover {
  transform: translateY(-1px);
  border-color: #c4b5fd;
  box-shadow: 0 18px 34px rgba(124, 58, 237, .09);
}
.sdr-command-card span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #6d28d9;
  background: #f3e8ff;
  font-weight: 900;
}
.sdr-command-card strong { font-size: 16px; }
.sdr-command-card small { line-height: 1.35; }
.onboarding-hero {
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #f8f5ff 100%);
}
.setup-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 30px;
}
.setup-steps div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #8a94a6;
  font-size: 13px;
  font-weight: 900;
}
.setup-steps span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e5e7eb;
}
.setup-steps .active { color: #7c3aed; }
.setup-steps .active span {
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #4f46e5);
}
.onboarding-center {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}
.onboarding-center h2 {
  margin: 0 auto 10px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -.035em;
}
.launch-icon {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #2563eb);
  font-weight: 950;
  font-size: 24px;
  box-shadow: 0 18px 34px rgba(124, 58, 237, .18);
}
.onboarding-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.onboarding-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 930px;
  margin: 0 auto;
}
.onboarding-feature-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(17,24,39,.05);
}
.onboarding-feature-grid span {
  display: inline-flex;
  margin-bottom: 10px;
  color: #7c3aed;
  font-weight: 950;
}
.onboarding-feature-grid p { color: var(--muted); margin-bottom: 0; }
.sdr-mini-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.sdr-mini-flow span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  color: #5b21b6;
  background: #f5f3ff;
  font-weight: 900;
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .main { padding: 18px; }
  .topbar, .top-actions { align-items: flex-start; flex-direction: column; }
  .grid.cols-2, .grid.cols-4, .form-grid, .inbox-layout, .lead-summary, .lead-search, .inbox-detail-grid, .lead-profile-metrics, .lead-workspace, .agent-rules-shell, .rule-examples, .agent-overview, .agent-section, .agent-rules-layout, .site-chat-layout, .site-chat-options, .client-layout, .client-stats, .appearance-editor { grid-template-columns: 1fr; }
  .site-chat-hero { align-items: flex-start; flex-direction: column; }
  .section-copy { position: static; }
  .rule-row, .rule-row-v2 { grid-template-columns: 1fr; }
  .lead-profile-hero { flex-direction: column; }
  .profile-actions { justify-content: flex-start; }
  .lead-toolbar { flex-direction: column; align-items: stretch; }
  .thread-header { flex-direction: column; }
  .thread-status { justify-items: start; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .kanban { grid-template-columns: 1fr; overflow-x: visible; }
}

/* UI refresh */
:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #d9e0ea;
  --soft: #f8fafc;
  --green: #10976a;
  --green-strong: #047857;
  --blue: #2563eb;
  --purple: #7c3aed;
  --red: #dc2626;
  --yellow: #b7791f;
  --shadow: 0 14px 34px rgba(17, 24, 39, .07);
}

body { background: linear-gradient(180deg, #f7f8fb 0, #eef2f7 100%); font-size: 14px; }
.app-shell { grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px; background: #0f172a; border-right: 1px solid rgba(255,255,255,.08); }
.brand { padding: 8px 8px 14px; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { border-radius: 10px; background: linear-gradient(135deg, #10b981, #0ea5e9); box-shadow: 0 10px 24px rgba(16,185,129,.18); }
.brand strong { letter-spacing: -.01em; }
.nav { gap: 4px; }
.nav-item { min-height: 40px; padding: 9px 10px; border-radius: 10px; color: #b8c2d6; }
.nav-item span { width: 25px; height: 25px; border-radius: 8px; font-size: 11px; background: rgba(255,255,255,.07); color: #dbeafe; }
.nav-item.active { background: #1f2937; box-shadow: inset 3px 0 0 #10b981; color: #fff; }
.nav-item:hover { background: #182235; }
.main { padding: 22px 24px 36px; }
.topbar { position: sticky; top: 0; z-index: 20; margin: -22px -24px 22px; padding: 18px 24px; background: rgba(247,248,251,.92); border-bottom: 1px solid rgba(217,224,234,.85); backdrop-filter: blur(10px); }
.eyebrow { letter-spacing: .06em; color: var(--green-strong); }
h1 { font-size: 28px; letter-spacing: -.025em; }
h2 { font-size: 17px; letter-spacing: -.01em; }
.card { border-color: #dce3ed; border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.card h2 + .muted, .card-head + .muted { margin-top: -6px; }
.btn { min-height: 38px; border-radius: 10px; padding: 0 13px; background: var(--green); box-shadow: 0 8px 18px rgba(16,151,106,.12); }
.btn:hover { filter: brightness(.97); transform: translateY(-1px); }
.btn.secondary { background: #fff; box-shadow: none; }
.btn.compact { min-height: 32px; border-radius: 8px; }
.user-pill { border-radius: 10px; background: #fff; }
label { font-size: 12px; color: #526071; }
input, select, textarea { min-height: 42px; border-color: #d8e0eb; border-radius: 10px; background: #fff; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 96px; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: rgba(16,151,106,.55); box-shadow: 0 0 0 3px rgba(16,151,106,.10); }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; padding: 0; accent-color: var(--green); flex: 0 0 auto; }
input[type="color"] { min-height: 42px; padding: 4px; cursor: pointer; }
.checkline { justify-content: flex-start; min-height: 42px; font-size: 13px; }
.badge { min-height: 22px; padding: 0 8px; font-size: 11px; }
.alert { border-radius: 10px; }
.card-head { align-items: center; border-bottom: 1px solid #eef2f7; padding-bottom: 12px; margin-bottom: 14px; }
.empty-col { border-radius: 10px; background: #fbfcfe; }

.site-chat-hero { border-radius: 14px; padding: 18px 20px; align-items: center; }
.site-chat-hero h2 { font-size: 22px; margin: 0 0 5px; }
.site-chat-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 18px; }
.site-chat-layout > .card:last-child { grid-column: 2; }
.client-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 18px; }
.client-layout > .card:last-child { grid-column: 2; }
.chat-list { gap: 10px; }
.chat-row { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 12px; border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.chat-row:hover, .chat-row.active { border-color: #b8c7d9; box-shadow: 0 10px 24px rgba(17,24,39,.06); transform: translateY(-1px); }
.avatar { border-radius: 12px; background: #e9fbf3; color: #047857; }
.site-chat-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.site-chat-options .checkline { background: #fbfcfe; border-radius: 12px; }
.install-code { min-height: 126px; border-radius: 12px; background: #0f172a; color: #d1fae5; border-color: #0f172a; }
.install-notes { border-radius: 12px; background: #f9fafb; }
.appearance-editor { border-radius: 14px; background: #fbfcfe; padding: 16px; grid-template-columns: minmax(0, 1fr) 300px; }
.flow-editor { border: 1px solid #dbe4ef; border-radius: 14px; padding: 16px; background: #f8fbff; display: grid; gap: 14px; }
.flow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.flow-steps span { border: 1px solid #dbe4ef; border-radius: 10px; background: #fff; padding: 10px; color: #42526b; font-size: 12px; font-weight: 800; }

.lead-summary { grid-template-columns: 1.25fr repeat(4, minmax(150px, 1fr)); gap: 14px; }
.summary-card { border-radius: 14px; padding: 16px; }
.summary-card.primary { background: linear-gradient(135deg, #10976a, #0f766e); }
.lead-toolbar { border-radius: 14px; padding: 14px; }
.kanban { gap: 14px; }
.kanban-col { border-radius: 14px; background: #eef2f7; padding: 12px; }
.lead-card { border-radius: 12px; padding: 13px; }
.lead-title { color: #0f172a; }

.inbox-layout { grid-template-columns: 430px minmax(0, 1fr); gap: 18px; }
.conversation-row { border-radius: 12px; padding: 12px; background: #fff; }
.conversation-row.active { border-color: rgba(16,151,106,.45); background: #f0fdf4; }
.thread-body { max-height: 58vh; }
.message { border-radius: 12px; }

.crm-hero { border-radius: 16px; border-color: #cfe9df; }
.crm-hero h2 { letter-spacing: -.025em; }
.crm-hero-actions .btn { white-space: nowrap; }
.task-item, .rank-row, .pipeline-strip a { border-radius: 12px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.task-item:hover, .rank-row:hover, .pipeline-strip a:hover { box-shadow: 0 12px 28px rgba(17,24,39,.06); transform: translateY(-1px); }
.rank-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
.pipeline-strip { grid-template-columns: repeat(6, minmax(150px, 1fr)); overflow-x: auto; padding-bottom: 4px; }

.agent-tabs { position: sticky; top: 78px; z-index: 10; background: rgba(247,248,251,.9); padding: 8px 0; }
.agent-tabs a { border-radius: 999px; padding: 9px 13px; }
.agent-section { grid-template-columns: 280px minmax(0, 1fr); gap: 18px; }
.section-copy { border-radius: 12px; }
.rule-group-v2, .rule-row-v2, .knowledge-item { border-radius: 12px; }

@media (min-width: 1500px) {
  .main { padding-left: 32px; padding-right: 32px; }
  .topbar { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; }
}

@media (max-width: 1180px) {
  .site-chat-layout, .client-layout, .inbox-layout, .agent-section, .lead-summary, .flow-steps, .crm-hero { grid-template-columns: 1fr; }
  .site-chat-layout > .card:last-child, .client-layout > .card:last-child { grid-column: auto; }
  .section-copy { position: static; }
  .crm-hero-actions { justify-content: flex-start; }
}

@media (max-width: 860px) {
  .sidebar { height: auto; position: static; }
  .topbar { position: static; margin: 0 0 18px; padding: 0; background: transparent; border-bottom: 0; }
  .main { padding: 18px; }
  .appearance-editor { grid-template-columns: 1fr; }
  .task-item, .rank-row { grid-template-columns: 36px minmax(0, 1fr); }
  .rank-row .badge { grid-column: 2; justify-self: start; }
}

/* Chip Talks premium layer */
:root {
  --ct-bg: #f5f7fb;
  --ct-panel: #ffffff;
  --ct-ink: #07122d;
  --ct-muted: #667085;
  --ct-line: #dfe6f0;
  --ct-purple: #8b16ff;
  --ct-blue: #2563eb;
  --ct-green: #12a66f;
  --ct-sidebar: #0b1224;
  --ct-soft-purple: #f4edff;
  --shadow: 0 16px 38px rgba(15, 23, 42, .075);
}

body {
  background:
    radial-gradient(circle at top left, rgba(139, 22, 255, .08), transparent 26rem),
    linear-gradient(180deg, #f8faff 0%, var(--ct-bg) 44%, #eef3fb 100%);
  color: var(--ct-ink);
}

.app-shell {
  grid-template-columns: 238px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, #111a32 0%, var(--ct-sidebar) 100%);
  padding: 18px 14px;
}

.brand {
  margin-bottom: 14px;
  padding: 8px 8px 16px;
}

.brand-mark {
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ct-purple), var(--ct-blue));
  box-shadow: 0 14px 30px rgba(139, 22, 255, .22);
}

.brand small {
  color: #b8c5df;
}

.nav {
  gap: 5px;
}

.nav-item {
  min-height: 42px;
  border-radius: 12px;
  color: #c4cee3;
  font-weight: 800;
}

.nav-item span {
  color: #e9ddff;
  background: rgba(255,255,255,.075);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(139, 22, 255, .32), rgba(37, 99, 235, .18));
  box-shadow: inset 3px 0 0 #a855f7;
}

.main {
  padding: 24px 28px 42px;
}

.topbar {
  margin: -24px -28px 18px;
  padding: 18px 28px;
  background: rgba(248, 250, 255, .88);
}

.eyebrow {
  color: var(--ct-purple);
  letter-spacing: .05em;
}

h1 {
  color: var(--ct-ink);
  font-size: 30px;
}

.card,
.summary-card,
.task-item,
.rank-row,
.pipeline-strip a,
.conversation-row,
.lead-card,
.rule-group-v2,
.rule-row-v2,
.knowledge-item {
  border-color: var(--ct-line);
  border-radius: 14px;
}

.card {
  background: rgba(255, 255, 255, .96);
}

.btn {
  background: linear-gradient(135deg, var(--ct-purple), var(--ct-blue));
  color: #fff;
  border-radius: 11px;
  box-shadow: 0 12px 24px rgba(139, 22, 255, .16);
}

.btn.secondary {
  background: #fff;
  color: var(--ct-ink);
  border-color: var(--ct-line);
  box-shadow: none;
}

.user-pill {
  color: #344054;
  border-color: var(--ct-line);
}

.connect-banner {
  margin-bottom: 18px;
  border: 1px solid rgba(139, 22, 255, .18);
  background: linear-gradient(135deg, #7c1dff 0%, #2563eb 100%);
}

.crm-hero {
  border: 0;
  border-radius: 18px;
  padding: 24px;
  color: #fff;
  background:
    radial-gradient(circle at right top, rgba(255,255,255,.18), transparent 20rem),
    linear-gradient(135deg, #121a35 0%, #24115a 48%, #1251cc 100%);
}

.crm-hero .eyebrow,
.crm-hero .muted {
  color: rgba(255,255,255,.78);
}

.crm-hero h2 {
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  max-width: 760px;
}

.crm-hero .btn.secondary {
  color: #fff;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
}

.sdr-command-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.sdr-command-card {
  min-height: 138px;
  border-radius: 16px;
  background: #fff;
}

.sdr-command-card span {
  color: #fff;
  background: linear-gradient(135deg, var(--ct-purple), var(--ct-blue));
}

.sdr-command-card strong {
  color: var(--ct-ink);
}

.grid.cols-4.crm-metrics {
  gap: 14px;
}

.metric {
  min-height: 112px;
}

.metric strong {
  font-size: 32px;
}

.status-card.is-safe {
  border-color: #f9d7a9;
  background: #fff8ed;
}

.task-icon {
  color: #7c3aed;
  background: var(--ct-soft-purple);
}

.badge-blue,
.badge-gray,
.badge-green {
  border: 1px solid transparent;
}

.onboarding-hero {
  border: 0;
  border-radius: 18px;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(139, 22, 255, .12), transparent 24rem),
    linear-gradient(180deg, #fff 0%, #f8f4ff 100%);
}

.setup-steps {
  border-bottom: 1px solid #ebe6f7;
  padding-bottom: 18px;
}

.setup-steps div {
  min-width: 0;
}

.setup-steps strong {
  white-space: nowrap;
}

.launch-icon {
  background: linear-gradient(135deg, var(--ct-purple), var(--ct-blue));
}

.onboarding-feature-grid article {
  border-radius: 16px;
}

.login-page {
  background:
    radial-gradient(circle at 50% 10%, rgba(139, 22, 255, .16), transparent 24rem),
    linear-gradient(180deg, #f8faff 0%, #eef3fb 100%);
}

.login-card {
  border: 0;
  border-radius: 18px;
  padding: 28px;
}

.login-card h1 {
  font-size: 40px;
}

@media (max-width: 1200px) {
  .sdr-command-grid,
  .grid.cols-4.crm-metrics,
  .onboarding-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-hero {
    grid-template-columns: 1fr;
  }
}

/* Template builder - 20260821 */
.page-templates .main > .topbar,
.page-templates .main > .connect-banner,
.page-templates .main > .ai-off-banner { display: none; }

.template-builder-topline {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -8px 0 18px;
  padding: 0 4px;
}

.template-builder-topline .eyebrow { margin-bottom: 3px; }
.template-builder-topline h2 { margin: 0; font-size: 28px; }
.template-safe-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #ccebdd;
  border-radius: 10px;
  background: #effaf5;
  color: #087f5b;
  font-weight: 800;
}
.template-safe-pill span {
  width: 21px; height: 21px; display: grid; place-items: center;
  border-radius: 50%; background: #0f9f6e; color: #fff; font-size: 12px;
}

.template-builder-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .72fr);
  gap: 18px;
  align-items: start;
}

.template-form-panel,
.template-preview-panel {
  min-width: 0;
}

.template-form-panel {
  display: grid;
  gap: 14px;
}

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

.template-section {
  padding: 18px;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .045);
}

.template-section h3 {
  margin: 0 0 12px;
  color: #07152d;
  font-size: 15px;
  line-height: 1.2;
}

.template-media-picker {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #cfe8df;
  border-radius: 12px;
  background: #f4fbf8;
}

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

.template-media-copy {
  display: grid;
  gap: 4px;
}

.template-media-copy strong {
  color: #075e54;
  font-size: 13px;
}

.template-media-copy span,
.template-upload-box small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.template-upload-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px dashed #83cbb8;
  border-radius: 10px;
  background: #fff;
  color: #075e54;
  cursor: pointer;
  transition: .16s ease;
}

.template-upload-box:hover {
  border-color: #0f9f6e;
  background: #effcf7;
}

.template-upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.template-upload-box span:not(.template-upload-icon) {
  display: grid;
  gap: 2px;
}

.template-upload-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #d8f5e9;
  color: #087f5b;
  font-size: 22px;
  font-weight: 400;
}

.template-image-url-field {
  margin: 0;
}

.template-media-status {
  margin: 0;
  font-size: 12px;
}

.template-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.template-section-head h3 {
  margin: 0;
}

.template-var-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.template-var-row button {
  height: 30px;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  background: #f4f8ff;
  color: #2463c7;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.template-var-row button:hover {
  border-color: #9dc0ff;
  background: #eaf2ff;
}

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

.template-switch-grid label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #24324a;
  font-weight: 780;
}

.template-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.template-preview-sticky {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.template-preview-head,
.template-rules-card {
  padding: 18px;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .045);
}

.template-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.template-preview-head h2 {
  margin: 0 0 4px;
}

.wa-preview {
  overflow: hidden;
  border: 1px solid #dfe7f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 44px rgba(15, 23, 42, .08);
}

.wa-phone-bar {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: linear-gradient(135deg, #075e54, #0f9f6e);
  color: #fff;
}
.wa-phone-back { font-size: 27px; line-height: 1; }
.wa-phone-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.95); color: #087f5b; font-size: 10px; font-weight: 900; }
.wa-phone-title { display: grid; gap: 2px; min-width: 0; }
.wa-phone-title strong { font-size: 13px; }
.wa-phone-title small { color: rgba(255,255,255,.78); font-size: 10px; }
.wa-phone-actions { margin-left: auto; display: flex; gap: 12px; font-size: 16px; white-space: nowrap;
}

.wa-chat-area {
  min-height: 290px;
  padding: 22px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  background:
    radial-gradient(circle at 12px 12px, rgba(15, 23, 42, .045) 1.5px, transparent 1.5px),
    linear-gradient(135deg, rgba(234, 224, 213, .85), rgba(238, 230, 218, .9));
  background-size: 28px 28px, auto;
}

.wa-message {
  width: min(310px, 100%);
  position: relative;
  padding: 12px 12px 22px;
  border-radius: 10px 10px 2px 10px;
  background: #d9fdd3;
  color: #10212b;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.wa-media {
  min-height: 128px;
  margin: -2px -2px 11px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #d0e9dd;
  color: #397261;
  font-size: 12px;
  font-weight: 800;
}

.wa-media img {
  width: 100%;
  height: 100%;
  min-height: 128px;
  display: block;
  object-fit: cover;
}

.wa-media[hidden] {
  display: none;
}

.wa-message strong {
  display: none;
  margin-bottom: 7px;
  font-size: 13px;
  color: #0b4d35;
}

.wa-message p {
  margin: 0;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.45;
}

.wa-message small {
  display: none;
  margin-top: 9px;
  color: #60756e;
  font-size: 11px;
}

.wa-message a {
  margin-top: 10px;
  padding: 9px 10px;
  display: block;
  border-top: 1px solid rgba(6, 95, 70, .15);
  color: #067a52;
  text-align: center;
  font-weight: 900;
  text-decoration: none;
}

.wa-message time {
  position: absolute;
  right: 11px;
  bottom: 6px;
  color: #6b8178;
  font-size: 10px;
}

.wa-preview-meta {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-top: 1px solid #e7edf5;
  color: #64748b;
  font-size: 12px;
}

.wa-composer {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 14px 12px;
  padding: 0 14px;
  border: 1px solid #dfe5e1;
  border-radius: 999px;
  background: #fff;
  color: #9aa8a3;
  font-size: 12px;
}
.wa-composer span { flex: 1; }
.wa-composer b { color: #6c7e77; font-size: 14px; font-weight: 400; }
.wa-composer i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #0f9f6e; color: #fff; font-style: normal; font-size: 10px; }

.template-rules-card h3 {
  margin: 0 0 10px;
}

.template-rules-card ul {
  margin: 0;
  padding-left: 18px;
  color: #52627a;
  line-height: 1.5;
  font-size: 13px;
}

.template-table-card {
  margin-top: 18px;
}

.template-manager-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: 4px 2px;
}

.template-breadcrumb { display: flex; gap: 10px; align-items: center; margin: 2px 0 12px; color: #64748b; font-size: 14px; }
.template-breadcrumb span { color: #0f8f78; }
.template-breadcrumb b { color: #94a3b8; font-weight: 500; }
.template-breadcrumb strong { color: #172033; }

.template-manager-hero h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.template-manager-hero p { margin: 0; }
.template-manager-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.template-manager-actions .btn[disabled],
.template-row-actions .btn[disabled] { opacity: .52; cursor: not-allowed; }

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

.template-stat-grid article {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid #dfe7f1;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15,23,42,.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-stat-grid article.is-green { border-left-color: #0f9f6e; }
.template-stat-grid article.is-purple { border-left-color: #8b5cf6; }
.template-stat-grid article.is-yellow { border-left-color: #eab308; }
.template-stat-grid span { color: #64748b; font-size: 12px; font-weight: 800; }
.template-stat-grid strong { display: block; color: #07152d; font-size: 28px; line-height: 1; margin: 5px 0 4px; }
.template-stat-grid small { color: #64748b; font-size: 12px; }
.template-stat-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #eaf2ff; color: #2563eb; font-size: 25px; font-style: normal; }
.template-stat-grid .is-green .template-stat-icon { background: #e6f8ec; color: #0f9f6e; }
.template-stat-grid .is-purple .template-stat-icon { background: #f0eaff; color: #7c3aed; }
.template-stat-grid .is-yellow .template-stat-icon { background: #fff3df; color: #d97706; }

.template-filter-card { margin-bottom: 18px; padding: 14px; }
.template-filter-form { display: grid; grid-template-columns: minmax(260px, 1fr) 190px 170px auto auto; gap: 10px; align-items: center; }
.template-filter-form input, .template-filter-form select { min-height: 42px; }
.template-manager-table-card { padding: 0; overflow: hidden; }
.template-manager-table-card .card-head { padding: 18px 20px; margin: 0; border-bottom: 1px solid #e5eaf1; }
.template-manager-table-card .card-head h2 { margin: 0 0 4px; }
.template-manager-table-card .card-head p { margin: 0; }
.template-table-wrap { overflow-x: auto; }
.template-manager-table { min-width: 920px; }
.template-manager-table th { padding: 13px 16px; background: #f8fafc; }
.template-manager-table td { padding: 15px 16px; vertical-align: middle; }
.template-manager-table td strong, .template-manager-table td small { display: block; }
.template-manager-table td small { margin-top: 4px; color: #64748b; font-size: 12px; }
.template-status-note { color: #64748b; font-size: 12px; }
.template-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.template-more { display: inline-grid; place-items: center; width: 28px; color: #475569; font-size: 22px; line-height: 1; }
.template-manager-safe-note { display: flex; align-items: center; gap: 10px; margin: 14px 20px 20px; padding: 13px 16px; border: 1px solid #bfe8d4; border-radius: 8px; background: #effaf5; color: #087f5b; font-size: 14px; font-weight: 700; }
.template-manager-safe-note span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #d5f3e3; color: #0f9f6e; font-size: 11px; }
.template-empty-state { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 32px; text-align: center; }
.template-empty-state h3, .template-empty-state p { margin: 0; }
.template-empty-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: #e7f8f0; color: #0f9f6e; font-size: 32px; font-weight: 300; }

@media (max-width: 900px) {
  .template-manager-hero { align-items: flex-start; flex-direction: column; }
  .template-manager-actions { justify-content: flex-start; }
  .template-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-filter-form { grid-template-columns: 1fr 1fr; }
  .template-filter-form input { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .template-stat-grid, .template-filter-form { grid-template-columns: 1fr; }
  .template-filter-form input { grid-column: auto; }
}

@media (max-width: 1180px) {
  .template-builder-shell {
    grid-template-columns: 1fr;
  }
  .template-preview-sticky {
    position: static;
  }
}

@media (max-width: 720px) {
  .template-switch-grid,
  .template-builder-shell .form-grid {
    grid-template-columns: 1fr;
  }
  .template-actions {
    flex-direction: column;
  }
}

/* Top navigation and atendimento rebuild */
.app-shell {
  display: block;
  min-height: 100vh;
}
.app-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 0 28px;
  color: #fff;
  background: linear-gradient(90deg, #9b19ff 0%, #6d39ff 45%, #1f66f2 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}
.top-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.top-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  box-shadow: none;
}
.top-brand small {
  display: none;
}
.top-brand strong {
  font-size: 18px;
}
.top-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.top-menu-group {
  position: relative;
}
.top-menu-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: 9px;
  color: rgba(255,255,255,.88);
  font-weight: 800;
  white-space: nowrap;
}
.top-menu-link span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,.12);
  font-size: 11px;
}
.top-menu-group.active .top-menu-link,
.top-menu-link:hover {
  color: #fff;
  background: rgba(255,255,255,.16);
}
.top-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  display: none;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}
.top-menu-group:hover .top-submenu {
  display: grid;
}
.top-submenu a {
  padding: 10px 11px;
  border-radius: 9px;
  color: #334155;
  font-weight: 750;
}
.top-submenu a.active,
.top-submenu a:hover {
  color: #6d28d9;
  background: #f5f3ff;
}
.topnav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topnav-actions .user-pill,
.topnav-actions .btn.secondary {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  color: #fff;
}
.main {
  padding: 22px;
}
.topbar {
  position: static;
  margin: 0 0 18px;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}
.topbar .top-actions {
  display: none;
}
.page-inbox {
  background: #f4f6fb;
}
.page-inbox .main {
  padding: 0;
}
.page-inbox .topbar,
.page-inbox .connect-banner,
.page-inbox .ai-off-banner {
  display: none;
}
.page-inbox .alert {
  margin: 10px 18px;
}
.support-topbar {
  height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  margin: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.support-topbar h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}
.support-topbar p {
  margin: 3px 0 0;
}
.support-live-cards {
  gap: 8px;
}
.support-live-cards span {
  min-width: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: none;
}
.support-live-cards span.live {
  color: #047857;
  border-color: #bbf7d0;
  background: #ecfdf5;
}
.support-live-cards strong {
  font-size: 16px;
}
.support-tabs {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 18px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  box-shadow: none;
}
.support-tabs a {
  min-height: 36px;
  border-radius: 8px;
}
.support-tabs a.active {
  background: linear-gradient(135deg, #8b16ff, #6d39ff);
}
.page-inbox .inbox-layout {
  height: calc(100vh - 188px);
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}
.page-inbox .support-queue {
  height: 100%;
  padding: 12px;
  border: 0;
  border-right: 1px solid #e5e7eb;
  border-radius: 0;
  box-shadow: none;
  overflow-y: auto;
}
.support-queue .inbox-head {
  display: none;
}
.inbox-filter {
  grid-template-columns: 1fr auto;
}
.support-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}
.support-search input {
  min-height: 38px;
  border-radius: 999px;
  background: #f1f5f9;
}
.support-priority {
  display: grid;
  gap: 1px;
  margin: 0 -12px 10px;
}
.support-priority div {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.support-priority div + div {
  background: #fffbeb;
  color: #92400e;
}
.support-priority strong {
  margin-left: auto;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #f97316;
}
.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f97316;
}
.priority-dot.mid {
  background: #eab308;
}
.conversation-list {
  gap: 8px;
}
.conversation-row {
  min-height: 86px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  border-radius: 12px;
  background: #fff;
}
.conversation-row.active {
  border-color: #86efac;
  background: #ecfdf5;
}
.page-inbox .inbox-detail-grid {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 0;
  align-items: stretch;
}
.page-inbox .inbox-thread-card {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
.thread-header {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid #e5e7eb;
}
.thread-avatar {
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}
.thread-title h2 {
  margin: 0;
  font-size: 17px;
}
.thread-title p {
  margin: 3px 0 0;
}
.mini-score {
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 800;
}
.thread-actions-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.thread-actions-top > small {
  display: none;
}
.page-inbox .thread-body {
  min-height: 0;
  height: auto;
  flex: 1;
  padding: 22px 16px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 20px 20px, rgba(120, 113, 108, .08) 0 2px, transparent 3px),
    radial-gradient(circle at 48px 44px, rgba(120, 113, 108, .06) 0 2px, transparent 3px),
    #eee7dd;
  background-size: 68px 68px;
}
.page-inbox .message {
  max-width: 54%;
  border: 1px solid rgba(203, 213, 225, .8);
  border-radius: 14px;
}
.page-inbox .message.inbound {
  background: #fff;
}
.page-inbox .message.outbound {
  background: #dbeafe;
}
.page-inbox .inbox-thread-card > .grid {
  margin: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}
.page-inbox .reply-box textarea {
  min-height: 58px;
  border-radius: 14px;
}
.lead-side-panel {
  height: 100%;
  max-height: none;
  position: static;
  border: 0;
  border-left: 1px solid #e5e7eb;
  border-radius: 0;
  box-shadow: none;
  overflow-y: auto;
}
.lead-side-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 0 18px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}
.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}
.lead-side-head h2 {
  margin: 0;
}
.lead-side-head p {
  margin: 0;
}
.lead-ops-strip {
  justify-content: center;
}
.page-inbox .schedule-box {
  display: none;
}

@media (max-width: 1120px) {
  .app-topnav {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }
  .top-menu {
    justify-content: flex-start;
    overflow-x: auto;
  }
  .topnav-actions {
    display: none;
  }
  .page-inbox .inbox-layout,
  .page-inbox .inbox-detail-grid {
    height: auto;
    grid-template-columns: 1fr;
  }
  .page-inbox .message {
    max-width: 100%;
  }
}

.support-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}
.support-topbar h2 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -.02em;
}
.support-live-cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.support-live-cards span {
  min-width: 108px;
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--ct-line, var(--line));
  border-radius: 14px;
  background: #fff;
  color: var(--ct-muted, var(--muted));
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
  font-size: 12px;
  font-weight: 800;
}
.support-live-cards strong {
  color: var(--ct-ink, var(--ink));
  font-size: 24px;
  line-height: 1;
}
.support-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--ct-line, var(--line));
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}
.support-tabs a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 9px;
  color: var(--ct-muted, var(--muted));
  font-weight: 850;
}
.support-tabs a.active {
  background: linear-gradient(135deg, #8b5cf6, #2563eb);
  color: #fff;
}
.support-queue {
  padding: 14px;
  align-self: stretch;
}
.support-queue .inbox-head {
  margin-bottom: 10px;
}
.support-queue h2 {
  margin: 0;
}
.inbox-layout {
  grid-template-columns: 360px minmax(0, 1fr);
}
.inbox-detail-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
}
.inbox-thread-card {
  min-height: calc(100vh - 230px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.inbox-thread-card > h2,
.inbox-thread-card > .alert,
.inbox-thread-card > .grid,
.inbox-thread-card > .thread-header {
  margin-left: 18px;
  margin-right: 18px;
}
.thread-header {
  padding-top: 18px;
}
.thread-body {
  flex: 1;
  min-height: 430px;
  max-height: none;
  padding: 20px 18px;
  border-top: 1px solid var(--ct-line, var(--line));
  border-bottom: 1px solid var(--ct-line, var(--line));
  background:
    radial-gradient(circle at 20% 20%, rgba(148, 163, 184, .12) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(148, 163, 184, .10) 0 2px, transparent 3px),
    #f4efe7;
  background-size: 56px 56px, 72px 72px, auto;
}
.message {
  max-width: min(620px, 82%);
  border: 1px solid rgba(148, 163, 184, .35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.message.inbound {
  border-left: 0;
  background: #fff;
}
.message.outbound {
  border-left: 0;
  background: #dbeafe;
}
.reply-box {
  padding: 14px 0 18px;
}
.reply-box textarea {
  min-height: 76px;
}
.lead-side-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.lead-side-panel > h2 {
  margin-bottom: 8px;
}
.lead-ops-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 0;
  margin: 10px 0;
  border-top: 1px solid var(--ct-line, var(--line));
  border-bottom: 1px solid var(--ct-line, var(--line));
}
.schedule-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ct-line, var(--line));
}
.conversation-row {
  min-height: 82px;
}
.conversation-row .badge {
  margin-right: 4px;
}

@media (max-width: 1180px) {
  .support-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .support-live-cards {
    justify-content: flex-start;
  }
  .inbox-detail-grid {
    grid-template-columns: 1fr;
  }
  .lead-side-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 860px) {
  .support-tabs,
  .support-live-cards {
    width: 100%;
  }
  .support-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }
  .support-live-cards {
    display: grid;
    grid-template-columns: 1fr;
  }
  .inbox-layout,
  .inbox-detail-grid {
    grid-template-columns: 1fr;
  }
  .thread-body {
    min-height: 320px;
  }
  .message {
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    margin: 0 0 16px;
    padding: 0;
  }

  .connect-banner,
  .crm-hero-actions,
  .top-actions {
    align-items: stretch;
  }

  .connect-banner a,
  .btn {
    width: 100%;
  }

  .sdr-command-grid,
  .grid.cols-4.crm-metrics,
  .onboarding-feature-grid,
  .setup-steps,
  .sdr-mini-flow {
    grid-template-columns: 1fr;
  }
}

/* Approved support mockup layer - 20260801 */
body.page-inbox {
  --ct-ink: #07152d;
  --ct-muted: #63718a;
  --ct-line: #dfe7f1;
  --ct-soft: #f6f9fc;
  --ct-green: #079669;
  --ct-green-2: #18b981;
  --ct-blue: #2368f5;
  --ct-navy: #061b2b;
  background: #f6f8fb;
  color: var(--ct-ink);
  overflow: hidden;
}

.page-inbox .app-topnav {
  height: 72px;
  padding: 0 28px;
  grid-template-columns: 270px 1fr auto;
  background:
    radial-gradient(circle at 3% 20%, rgba(32, 201, 151, .28), transparent 22%),
    linear-gradient(100deg, #061827 0%, #07283d 42%, #0a4363 100%);
  border: 0;
  box-shadow: 0 16px 36px rgba(2, 18, 38, .16);
}

.page-inbox .top-brand {
  color: #fff;
  gap: 14px;
}

.page-inbox .brand-mark {
  width: 42px;
  height: 36px;
  border-radius: 12px;
  color: transparent;
  background: linear-gradient(135deg, #15c48f, #0673c8);
  box-shadow: 0 10px 24px rgba(10, 116, 153, .32);
  position: relative;
}

.page-inbox .brand-mark::before,
.page-inbox .brand-mark::after {
  content: "";
  position: absolute;
  background: rgba(2, 27, 45, .72);
}

.page-inbox .brand-mark::before {
  width: 20px;
  height: 12px;
  left: 11px;
  top: 10px;
  border-radius: 5px;
}

.page-inbox .brand-mark::after {
  width: 8px;
  height: 8px;
  left: 14px;
  top: 20px;
  border-radius: 1px 1px 8px 1px;
  transform: rotate(38deg);
}

.page-inbox .top-brand strong {
  font-size: 27px;
  letter-spacing: -.04em;
}

.page-inbox .top-brand small {
  display: none;
}

.page-inbox .top-menu {
  justify-content: center;
  gap: 14px;
}

.page-inbox .top-menu-link {
  min-height: 46px;
  padding: 0 18px;
  color: rgba(255, 255, 255, .9);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
}

.page-inbox .top-menu-link span {
  background: transparent;
  color: inherit;
  font-size: 13px;
}

.page-inbox .top-menu-group.active .top-menu-link,
.page-inbox .top-menu-link:hover {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .1);
  color: #fff;
}

.page-inbox .top-submenu {
  top: 58px;
}

.page-inbox .topnav-actions {
  gap: 12px;
}

.page-inbox .user-pill {
  min-height: 42px;
  padding: 0 18px;
  color: #e8fff8;
  border-color: rgba(255, 255, 255, .14);
  background: rgba(3, 98, 85, .4);
}

.page-inbox .topnav-actions .btn {
  width: auto;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.page-inbox .main {
  height: calc(100vh - 72px);
  padding: 0;
  overflow: hidden;
}

.page-inbox .topbar,
.page-inbox .connect-banner,
.page-inbox .ai-off-banner,
.page-inbox .alert.success {
  display: none;
}

.page-inbox .support-topbar {
  height: 84px;
  margin: 0;
  padding: 0 26px;
  border-bottom: 1px solid var(--ct-line);
  background: #fff;
}

.page-inbox .support-topbar h2 {
  font-size: 26px;
  margin: 0;
}

.page-inbox .support-topbar h2::after {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 1px solid #b8c5d8;
  border-radius: 50%;
  color: #7d8ba3;
  font-size: 12px;
  font-weight: 900;
}

.page-inbox .support-topbar .muted {
  display: none;
}

.page-inbox .support-live-cards span {
  min-width: 88px;
  min-height: 42px;
  padding: 8px 14px;
  align-content: center;
  text-align: center;
  border-radius: 9px;
  box-shadow: none;
}

.page-inbox .support-live-cards .live {
  min-width: 108px;
  color: #0b6b50;
  border-color: #bdebd5;
  background: #f2fff8;
}

.page-inbox .support-live-cards strong {
  font-size: 19px;
}

.page-inbox .support-live-cards .live strong::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: #18b981;
}

.page-inbox .support-tabs {
  height: 52px;
  margin: 0;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--ct-line);
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.page-inbox .support-tabs a {
  min-width: 116px;
  min-height: 36px;
  border: 1px solid var(--ct-line);
  border-radius: 8px;
  color: #0f3b4b;
  background: #fff;
}

.page-inbox .support-tabs a.active {
  border-color: transparent;
  background: linear-gradient(135deg, #09976d, #057c68);
  color: #fff;
  box-shadow: 0 10px 22px rgba(6, 124, 104, .22);
}

.page-inbox .inbox-layout {
  height: calc(100vh - 208px);
  display: grid;
  grid-template-columns: 345px minmax(0, 1fr);
  gap: 0;
}

.page-inbox .card {
  border-color: var(--ct-line);
  border-radius: 0;
  box-shadow: none;
}

.page-inbox .support-queue {
  padding: 0;
  border-width: 0 1px 0 0;
  background: #fff;
  overflow: hidden;
}

.page-inbox .support-queue .inbox-head {
  display: none;
}

.page-inbox .inbox-filter {
  display: none;
}

.page-inbox .support-search {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 12px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--ct-line);
}

.page-inbox .support-search input {
  height: 42px;
  padding-left: 38px;
  border-radius: 10px;
  background: #f8fafc;
}

.page-inbox .support-search::before {
  content: "Q";
  position: absolute;
  margin: 28px 0 0 28px;
  color: #8b9ab0;
  font-weight: 900;
}

.page-inbox .support-search .btn {
  width: 44px;
  min-height: 42px;
  padding: 0;
  color: transparent;
  position: relative;
}

.page-inbox .support-search .btn::after {
  content: "";
  width: 16px;
  height: 16px;
  border-top: 2px solid #63718a;
  border-bottom: 2px solid #63718a;
  position: absolute;
  inset: 12px 13px;
}

.page-inbox .support-priority {
  display: grid;
  border-bottom: 1px solid var(--ct-line);
}

.page-inbox .support-priority div {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 900;
  text-transform: none;
  color: #1f2a44;
  background: #fff;
}

.page-inbox .support-priority div:first-child {
  background: #fff7ed;
  color: #d23c00;
}

.page-inbox .support-priority div:nth-child(2) {
  background: #fffbea;
  color: #9a6700;
}

.page-inbox .support-priority strong {
  margin-left: auto;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: currentColor;
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, .01);
}

.page-inbox .conversation-list {
  height: calc(100vh - 330px);
  padding: 12px 10px 18px;
  overflow-y: auto;
}

.page-inbox .conversation-row {
  min-height: 96px;
  margin: 0 0 8px;
  padding: 14px 12px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
}

.page-inbox .conversation-row.active {
  border-color: #b7ebd4;
  background: #effdf6;
}

.page-inbox .conversation-row:hover {
  border-color: #cbd8e7;
  background: #f9fbfd;
}

.page-inbox .conversation-row .avatar,
.page-inbox .thread-avatar,
.page-inbox .profile-avatar {
  background: linear-gradient(135deg, #17a835, #08976d);
  color: #fff;
  box-shadow: 0 10px 24px rgba(8, 151, 109, .18);
}

.page-inbox .conversation-main strong {
  font-size: 14px;
}

.page-inbox .conversation-main small {
  color: #53627a;
  line-height: 1.4;
}

.page-inbox .conversation-meta {
  color: #7c8aa1;
}

.page-inbox .dot.open {
  background: #079669;
}

.page-inbox .inbox-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 322px;
  gap: 0;
  min-width: 0;
}

.page-inbox .inbox-thread-card {
  min-height: auto;
  height: calc(100vh - 208px);
  border-width: 0 1px 0 0;
  background: #fff;
}

.page-inbox .thread-header {
  min-height: 76px;
  margin: 0 !important;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--ct-line);
  background: #fff;
}

.page-inbox .thread-title h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.page-inbox .thread-title .muted {
  color: #53627a;
}

.page-inbox .mini-score {
  margin-left: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  color: #086548;
  background: #e9fbf1;
  font-weight: 900;
}

.page-inbox .thread-status {
  align-items: center;
  gap: 12px;
}

.page-inbox .thread-status > .badge,
.page-inbox .thread-status > small {
  display: none;
}

.page-inbox .thread-actions-top .actions {
  gap: 10px;
}

.page-inbox .thread-actions-top .btn {
  width: auto;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 16px;
}

.page-inbox .thread-actions-top .btn.secondary {
  color: #2368f5;
  border-color: #87b4ff;
  background: #fff;
}

.page-inbox .thread-actions-top .btn:not(.secondary) {
  background: linear-gradient(135deg, #09976d, #057c68);
}

.page-inbox .thread-body {
  min-height: 0;
  height: calc(100vh - 208px - 76px - 170px);
  padding: 28px;
  overflow-y: auto;
  border: 0;
  background-color: #fbf6ee;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(47, 54, 64, .045) 0 2px, transparent 2px),
    radial-gradient(circle at 44px 48px, rgba(47, 54, 64, .04) 0 2px, transparent 2px),
    linear-gradient(45deg, transparent 48%, rgba(47, 54, 64, .025) 49%, rgba(47, 54, 64, .025) 51%, transparent 52%);
  background-size: 66px 66px, 82px 82px, 48px 48px;
}

.page-inbox .message {
  max-width: min(460px, 74%);
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #e2e9f2;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(9, 30, 66, .05);
}

.page-inbox .message.inbound {
  margin-right: auto;
  background: #fff;
}

.page-inbox .message.outbound {
  margin-left: auto;
  color: #073f31;
  background: #dcf8df;
  border-color: #c2efcb;
}

.page-inbox .message .muted {
  margin-bottom: 8px;
  font-size: 12px;
  color: #4d8be8;
}

.page-inbox .inbox-thread-card > .grid {
  height: 170px;
  margin: 0 !important;
  padding: 14px 26px 18px;
  border-top: 1px solid var(--ct-line);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-inbox .inbox-thread-card > .grid > .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.page-inbox .inbox-thread-card > .grid > .actions .btn {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  color: #314059;
  border-color: #dfe7f1;
  background: #fff;
}

.page-inbox .inbox-thread-card > .grid > .actions .ai-chip {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #0ea5e9, #079669);
}

.page-inbox .reply-box {
  position: relative;
  padding: 0;
  display: grid !important;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.page-inbox .reply-box .field {
  margin: 0;
}

.page-inbox .reply-box label {
  display: none;
}

.page-inbox .reply-box textarea {
  min-height: 74px;
  border-radius: 14px;
  padding: 16px;
  resize: none;
  background: #fff;
}

.page-inbox .reply-box .send-btn {
  width: 96px;
  min-height: 44px;
  border-radius: 9px;
  background: linear-gradient(135deg, #09976d, #057c68);
}

.page-inbox .lead-side-panel {
  height: calc(100vh - 208px);
  max-height: none;
  position: static;
  padding: 0;
  overflow-y: auto;
  background: #fff;
}

.page-inbox .lead-side-tabs {
  height: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--ct-line);
}

.page-inbox .lead-side-tabs span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8190a6;
  font-size: 12px;
  font-weight: 900;
}

.page-inbox .lead-side-tabs span.active {
  color: #079669;
  border-bottom: 3px solid #079669;
}

.page-inbox .lead-side-head {
  padding: 28px 18px 18px;
  text-align: center;
}

.page-inbox .profile-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  font-size: 20px;
}

.page-inbox .lead-side-head h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.page-inbox .lead-ops-strip {
  justify-content: center;
  margin: 0 18px 18px;
  padding: 0 0 16px;
  border-top: 0;
}

.page-inbox .lead-profile-block {
  padding: 0 18px 16px;
  border-bottom: 1px solid var(--ct-line);
}

.page-inbox .lead-profile-block h3 {
  margin: 18px 0 10px;
  color: #3f4e65;
  font-size: 13px;
  text-transform: uppercase;
}

.page-inbox .insight-card,
.page-inbox .lead-profile-block > p,
.page-inbox .bant-grid div {
  border: 1px solid #e7edf5;
  border-radius: 8px;
  background: #f8fafc;
}

.page-inbox .insight-card {
  padding: 12px;
}

.page-inbox .insight-card strong,
.page-inbox .insight-card span {
  display: block;
}

.page-inbox .insight-card span {
  margin-top: 4px;
  color: #68778f;
  font-size: 12px;
}

.page-inbox .lead-profile-block > p {
  margin: 0 0 8px;
  padding: 10px 12px;
  color: #314059;
}

.page-inbox .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-inbox .tag-row span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #086548;
  background: #e8f9ef;
  font-size: 12px;
  font-weight: 800;
}

.page-inbox .bant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.page-inbox .bant-grid div {
  min-height: 56px;
  padding: 10px;
}

.page-inbox .bant-grid small {
  display: block;
  color: #7b8aa1;
  font-size: 11px;
}

.page-inbox .bant-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.page-inbox .lead-edit-form {
  padding: 16px 18px 24px;
}

.page-inbox .lead-edit-form textarea {
  min-height: 74px;
}

.page-inbox .lead-edit-form .btn {
  min-height: 42px;
  border-radius: 9px;
  background: linear-gradient(135deg, #09976d, #057c68);
}

.page-inbox .badge {
  border-radius: 999px;
  font-size: 11px;
}

@media (max-width: 1240px) {
  body.page-inbox {
    overflow: auto;
  }

  .page-inbox .app-topnav {
    height: auto;
    min-height: 72px;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .page-inbox .main,
  .page-inbox .inbox-layout,
  .page-inbox .inbox-thread-card,
  .page-inbox .lead-side-panel {
    height: auto;
    overflow: visible;
  }

  .page-inbox .inbox-layout,
  .page-inbox .inbox-detail-grid {
    grid-template-columns: 1fr;
  }

  .page-inbox .thread-body {
    height: 56vh;
  }

  .page-inbox .conversation-list {
    height: auto;
    max-height: 420px;
  }
}

/* Atendimento queue polish - 20260801 */
.page-inbox .conversation-list {
  height: calc(100vh - 284px);
  padding: 0;
  background: #fff;
}

.page-inbox .support-priority {
  display: none;
}

.page-inbox .priority-group {
  border-bottom: 1px solid #e8eef6;
}

.page-inbox .priority-group-head {
  height: 50px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 0 18px;
  color: #111c33;
  font-size: 14px;
  font-weight: 900;
  background: #fff;
}

.page-inbox .priority-high .priority-group-head {
  background: #fff8ee;
}

.page-inbox .priority-medium .priority-group-head {
  background: #fffcef;
}

.page-inbox .priority-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
}

.page-inbox .priority-dot.high {
  background: #ef4444;
}

.page-inbox .priority-dot.mid {
  background: #f5b400;
}

.page-inbox .priority-group-head em {
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-style: normal;
  font-size: 13px;
  font-weight: 950;
}

.page-inbox .priority-high .priority-group-head em {
  background: #ef4444;
}

.page-inbox .priority-medium .priority-group-head em {
  background: #f5b400;
}

.page-inbox .priority-group-head .chevron {
  color: #8da0b8;
  font-size: 15px;
  transform: translateY(-1px);
}

.page-inbox .priority-group-list {
  padding: 12px 10px;
}

.page-inbox .priority-group + .priority-group .priority-group-list {
  padding-top: 10px;
}

.page-inbox .conversation-row {
  min-height: 86px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 8px;
  gap: 12px;
  margin: 0;
  padding: 12px 12px;
  border: 1px solid transparent;
  border-radius: 0;
  border-bottom-color: #edf2f7;
  box-shadow: none;
}

.page-inbox .priority-group-list .conversation-row:first-of-type {
  border-radius: 10px 10px 0 0;
}

.page-inbox .priority-group-list .conversation-row:last-of-type {
  border-bottom-color: transparent;
  border-radius: 0 0 10px 10px;
}

.page-inbox .priority-group-list .conversation-row:only-of-type {
  border-radius: 10px;
}

.page-inbox .conversation-row.active {
  border-color: #aeeccc;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(19, 178, 116, .08), rgba(19, 178, 116, .03)),
    #f2fff8;
  box-shadow: 0 10px 22px rgba(8, 151, 109, .08);
}

.page-inbox .conversation-row:not(.active):hover {
  border-radius: 10px;
  background: #f8fbfd;
}

.page-inbox .conversation-row .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 950;
}

.page-inbox .conversation-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.page-inbox .conversation-title-line,
.page-inbox .conversation-bottom-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-inbox .conversation-title-line strong {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111c33;
  font-size: 14px;
  font-weight: 950;
}

.page-inbox .conversation-title-line small {
  color: #7f8ca3;
  font-size: 12px;
  white-space: nowrap;
}

.page-inbox .conversation-main > small {
  max-width: 185px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #465775;
  font-size: 13px;
}

.page-inbox .conversation-bottom-line {
  min-height: 21px;
}

.page-inbox .conversation-bottom-line .badge {
  padding: 3px 9px;
  color: #314059;
  background: #eef3f8;
}

.page-inbox .unread-pill {
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: #079669;
  font-size: 12px;
  font-weight: 950;
}

.page-inbox .conversation-meta {
  align-self: center;
  justify-self: end;
}

.page-inbox .conversation-meta small {
  display: none;
}

.page-inbox .conversation-meta .dot {
  width: 8px;
  height: 8px;
}

.page-inbox .empty-priority {
  margin: 0;
  padding: 16px 10px 20px;
  color: #8c9ab0;
  text-align: center;
  font-size: 12px;
}

.page-inbox .lead-edit-form .field small.muted {
  display: block;
  margin-top: 5px;
  color: #7f8ca3;
  font-size: 11px;
}

/* Support micro polish - 20260801 */
.page-inbox,
.page-inbox input,
.page-inbox select,
.page-inbox textarea,
.page-inbox button {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.page-inbox .top-menu-link {
  gap: 9px;
  font-weight: 760;
  letter-spacing: 0;
}

.page-inbox .top-menu-link .nav-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .92);
  font-size: 18px;
  line-height: 1;
}

.page-inbox .top-menu-link .nav-label {
  display: inline-flex;
  align-items: center;
}

.page-inbox .top-menu-group:not(:first-child) .top-menu-link .nav-label::after {
  content: "⌄";
  margin-left: 8px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}

.page-inbox .live-pill,
.page-inbox .notify-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #e8fff8;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(9, 99, 89, .44);
  font-size: 13px;
  font-weight: 840;
}

.page-inbox .live-pill {
  gap: 9px;
  padding: 0 14px;
}

.page-inbox .live-pill i {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 999px;
  background: #16c772;
  box-shadow: 0 0 0 4px rgba(22, 199, 114, .14);
}

.page-inbox .notify-pill {
  width: 42px;
  position: relative;
  color: transparent;
  background: rgba(255, 255, 255, .06);
}

.page-inbox .notify-pill::before {
  content: "◦";
  color: #fff;
  font-size: 24px;
  transform: translateY(-2px);
}

.page-inbox .notify-pill::after {
  content: "5";
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  font-size: 11px;
  font-weight: 950;
}

.page-inbox .user-pill {
  min-width: 42px;
  width: 42px;
  padding: 0;
  justify-content: center;
  overflow: hidden;
  color: transparent;
  border-radius: 50%;
  background: linear-gradient(135deg, #1dbd50, #0c8d3d);
}

.page-inbox .user-pill::before {
  content: "RA";
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.page-inbox .topnav-actions .btn.secondary {
  display: none;
}

.page-inbox .support-topbar {
  padding-left: 40px;
}

.page-inbox .support-topbar h2 {
  color: #111827;
  font-weight: 850;
  letter-spacing: -.01em;
}

.page-inbox .support-live-cards span {
  min-width: 82px;
  color: #4f5f78;
  font-size: 12px;
  font-weight: 740;
}

.page-inbox .support-live-cards strong {
  color: #111827;
  font-weight: 850;
}

.page-inbox .support-tabs {
  padding-left: 358px;
  position: relative;
}

.page-inbox .support-tabs::before {
  content: "";
  position: absolute;
  left: 345px;
  top: 0;
  width: 1px;
  height: 52px;
  background: #e6edf5;
}

.page-inbox .support-tabs a {
  min-width: 128px;
  font-weight: 820;
}

.page-inbox .support-search input,
.page-inbox .field input,
.page-inbox .field select,
.page-inbox .field textarea {
  border-color: #dfe8f2;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
}

.page-inbox .support-search input::placeholder,
.page-inbox textarea::placeholder {
  color: #9aa8bc;
}

.page-inbox .support-search::before {
  content: "⌕";
  margin-top: 26px;
  font-size: 24px;
  font-weight: 400;
}

.page-inbox .support-search .btn::after {
  border-top-width: 1px;
  border-bottom-width: 1px;
}

.page-inbox .support-search .btn::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 13px;
  width: 6px;
  height: 16px;
  border-top: 1px solid #63718a;
  border-bottom: 1px solid #63718a;
}

.page-inbox .priority-group-head {
  letter-spacing: 0;
  font-weight: 850;
}

.page-inbox .priority-group-head strong {
  font-weight: 850;
}

.page-inbox .priority-group-head .chevron {
  transform: rotate(180deg);
}

.page-inbox .conversation-row {
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.page-inbox .conversation-row.active,
.page-inbox .conversation-row:not(.active):hover {
  transform: translateY(-1px);
}

.page-inbox .conversation-title-line strong {
  font-weight: 860;
  letter-spacing: 0;
}

.page-inbox .conversation-main > small {
  line-height: 1.35;
}

.page-inbox .thread-header {
  padding-left: 26px;
  padding-right: 24px;
}

.page-inbox .thread-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.page-inbox .thread-title h2 {
  font-weight: 860;
}

.page-inbox .mini-score {
  color: #067a52;
  border: 1px solid #bcebd2;
  background: #ecfbf3;
}

.page-inbox .btn {
  gap: 7px;
  font-weight: 820;
  letter-spacing: 0;
}

.page-inbox .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-weight: 900;
}

.page-inbox .thread-actions-top .btn {
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.page-inbox .thread-actions-top .btn.secondary {
  color: #2266e8;
  background: #fff;
}

.page-inbox .thread-body {
  padding: 28px 34px;
}

.page-inbox .message {
  padding: 13px 16px 12px;
  font-size: 14px;
  line-height: 1.55;
}

.page-inbox .message p:last-child {
  margin-bottom: 0;
}

.page-inbox .message.outbound {
  background: linear-gradient(180deg, #e7fbe6, #dcf8df);
}

.page-inbox .message.outbound::after {
  content: "✓✓";
  display: block;
  margin-top: 4px;
  color: #078765;
  font-size: 12px;
  text-align: right;
}

.page-inbox .inbox-thread-card > .grid {
  padding-left: 26px;
  padding-right: 26px;
}

.page-inbox .inbox-thread-card > .grid > .actions {
  padding-bottom: 2px;
}

.page-inbox .inbox-thread-card > .grid > .actions .btn {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #dde7f2;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.page-inbox .shortcut-chip .btn-icon {
  width: 18px;
  color: #0c8d6b;
}

.page-inbox .inbox-thread-card > .grid > .actions .ai-chip {
  color: #0b67e8;
  border: 1px solid #d7e7ff;
  background: #f7fbff;
}

.page-inbox .reply-box .field {
  position: relative;
}

.page-inbox .reply-box .field::after {
  content: "⌕   ☺   ◉   ▧   ✦";
  position: absolute;
  left: 18px;
  bottom: 13px;
  color: #74839b;
  font-size: 19px;
  letter-spacing: 11px;
  pointer-events: none;
}

.page-inbox .reply-box textarea {
  min-height: 86px;
  padding: 18px 18px 42px;
  color: #1f2a44;
}

.page-inbox .reply-box::before {
  content: "Ctrl  +  Enter para enviar";
  position: absolute;
  right: 120px;
  bottom: 15px;
  color: #7f8ca3;
  font-size: 12px;
  pointer-events: none;
}

.page-inbox .reply-box .send-btn {
  align-self: end;
  margin-bottom: 12px;
  box-shadow: 0 12px 24px rgba(7, 124, 104, .2);
}

.page-inbox .lead-side-head {
  padding-top: 30px;
}

.page-inbox .lead-side-head h2 {
  color: #111827;
  font-weight: 880;
}

.page-inbox .lead-profile-block h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #31506a;
  font-weight: 900;
  letter-spacing: 0;
}

.page-inbox .lead-profile-block h3:nth-of-type(1)::before {
  content: "⌁";
  color: #079669;
}

.page-inbox .lead-profile-block h3:nth-of-type(2)::before {
  content: "☏";
  color: #0d70d6;
}

.page-inbox .lead-profile-block h3:nth-of-type(3)::before {
  content: "◇";
  color: #079669;
}

.page-inbox .lead-profile-block h3:nth-of-type(4)::before {
  content: "▣";
  color: #0d70d6;
}

.page-inbox .insight-card,
.page-inbox .lead-profile-block > p,
.page-inbox .bant-grid div {
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .035);
}

.page-inbox .tag-row span {
  font-weight: 760;
}

/* Spacing and accordion fixes - 20260801 */
.page-inbox .app-topnav {
  grid-template-columns: 260px minmax(0, 1fr) 180px;
  gap: 14px;
  min-width: 0;
}

.page-inbox .top-brand {
  min-width: 0;
}

.page-inbox .top-brand strong {
  font-size: 26px;
  white-space: nowrap;
}

.page-inbox .top-menu {
  min-width: 0;
  gap: 6px;
  justify-content: center;
  overflow: hidden;
}

.page-inbox .top-menu-group {
  min-width: 0;
  flex: 0 1 auto;
}

.page-inbox .top-menu-link {
  min-height: 42px;
  padding: 0 10px;
  gap: 7px;
  font-size: 13px;
  white-space: nowrap;
}

.page-inbox .top-menu-link .nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .08);
  font-size: 10px;
  font-weight: 900;
}

.page-inbox .top-menu-group:not(:first-child) .top-menu-link .nav-label::after {
  content: "";
  margin: 0;
}

.page-inbox .topnav-actions {
  min-width: 0;
  justify-content: flex-end;
  gap: 8px;
}

.page-inbox .live-pill {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.page-inbox .notify-pill,
.page-inbox .user-pill {
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
}

.page-inbox .support-tabs {
  padding-left: 358px;
  overflow: hidden;
}

.page-inbox .support-tabs a {
  flex: 0 0 128px;
}

.page-inbox .priority-group-head {
  cursor: pointer;
  user-select: none;
}

.page-inbox .priority-group-head .chevron {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: rotate(180deg);
  transition: transform .16s ease;
}

.page-inbox .priority-group.collapsed .priority-group-head .chevron {
  transform: rotate(90deg);
}

.page-inbox .priority-group.collapsed .priority-group-list {
  display: none;
}

.page-inbox .conversation-list {
  height: calc(100vh - 284px);
  overflow-y: auto;
  overflow-x: hidden;
}

.page-inbox .priority-group-list {
  padding: 10px;
}

.page-inbox .conversation-row {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 10px;
  gap: 12px;
  min-height: 88px;
  padding: 12px;
  overflow: hidden;
}

.page-inbox .conversation-main,
.page-inbox .conversation-title-line,
.page-inbox .conversation-bottom-line {
  min-width: 0;
}

.page-inbox .conversation-row .badge,
.page-inbox .conversation-bottom-line .badge {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 !important;
  line-height: 1.2;
  white-space: nowrap;
}

.page-inbox .conversation-bottom-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  overflow: hidden;
}

.page-inbox .conversation-main > small {
  max-width: 100%;
}

.page-inbox .conversation-title-line small {
  margin-left: 8px;
}

.page-inbox .inbox-thread-card > .grid {
  height: 170px;
  overflow: hidden;
}

.page-inbox .inbox-thread-card > .grid > .actions {
  height: 42px;
  max-width: 100%;
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.page-inbox .inbox-thread-card > .grid > .actions form {
  flex: 0 0 auto;
}

.page-inbox .inbox-thread-card > .grid > .actions .btn {
  width: auto;
  min-width: max-content;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.page-inbox .btn-icon {
  width: auto;
  min-width: 15px;
  font-size: 10px;
  letter-spacing: 0;
}

.page-inbox .reply-box {
  height: 96px;
  grid-template-columns: minmax(0, 1fr) 98px;
}

.page-inbox .reply-box .field::after {
  content: "anexar   emoji   audio   imagem   ia";
  left: 18px;
  bottom: 12px;
  font-size: 11px;
  letter-spacing: 0;
  word-spacing: 12px;
}

.page-inbox .reply-box::before {
  right: 118px;
  bottom: 14px;
  font-size: 11px;
}

.page-inbox .reply-box textarea {
  min-height: 86px;
  max-height: 86px;
}

.page-inbox .reply-box .send-btn {
  width: 98px;
  margin-bottom: 11px;
}

.page-inbox .lead-side-panel {
  overflow-x: hidden;
}

.page-inbox .lead-side-tabs span {
  min-width: 0;
}

.page-inbox .lead-profile-block h3::before {
  content: "" !important;
}

@media (max-width: 1500px) {
  .page-inbox .app-topnav {
    grid-template-columns: 240px minmax(0, 1fr) 150px;
  }

  .page-inbox .top-menu-link {
    padding: 0 8px;
    font-size: 12px;
  }

  .page-inbox .top-menu-link .nav-icon {
    display: none;
  }

  .page-inbox .live-pill {
    font-size: 12px;
  }
}

/* Clean top menu - 20260801 */
.page-inbox .app-topnav,
.app-topnav {
  height: 74px;
  display: grid;
  grid-template-columns: 260px minmax(560px, 1fr) 230px;
  align-items: center;
  gap: 18px;
  overflow: visible;
}

.page-inbox .top-brand,
.top-brand {
  min-width: 240px;
  height: 74px;
  display: flex;
  align-items: center;
}

.page-inbox .top-menu,
.top-menu {
  min-width: 0;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: visible;
  white-space: nowrap;
}

.page-inbox .top-menu-group,
.top-menu-group {
  position: relative;
  flex: 0 0 auto;
}

.page-inbox .top-menu-link,
.top-menu-link {
  width: auto;
  min-width: 92px;
  max-width: none;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  line-height: 1;
  white-space: nowrap;
}

.page-inbox .top-menu-link .nav-icon,
.top-menu-link .nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .08);
  font-size: 10px;
  font-weight: 900;
}

.page-inbox .top-menu-link .nav-label,
.top-menu-link .nav-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-size: 13px;
  font-weight: 820;
}

.page-inbox .top-menu-group:not(:first-child) .top-menu-link .nav-label::after,
.top-menu-group:not(:first-child) .top-menu-link .nav-label::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid rgba(255, 255, 255, .72);
  border-bottom: 1.5px solid rgba(255, 255, 255, .72);
  transform: rotate(45deg) translateY(-2px);
}

.page-inbox .top-menu-group.active .top-menu-link,
.top-menu-group.active .top-menu-link {
  background: rgba(255, 255, 255, .13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}

.page-inbox .top-submenu,
.top-submenu {
  top: 54px;
  left: 50%;
  min-width: 210px;
  transform: translateX(-50%) translateY(8px);
  padding: 8px;
  border: 1px solid rgba(220, 228, 238, .95);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(4, 18, 38, .18);
  z-index: 1000;
}

.page-inbox .top-menu-group:hover .top-submenu,
.top-menu-group:hover .top-submenu {
  display: grid;
}

.page-inbox .top-submenu a,
.top-submenu a {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #23324a;
  font-size: 13px;
  font-weight: 760;
}

.page-inbox .top-submenu a:hover,
.top-submenu a:hover,
.page-inbox .top-submenu a.active,
.top-submenu a.active {
  color: #067a5a;
  background: #edfdf5;
}

.page-inbox .topnav-actions,
.topnav-actions {
  min-width: 210px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.page-inbox .notify-pill,
.notify-pill {
  display: none !important;
}

.page-inbox .live-pill,
.live-pill {
  width: auto;
  min-width: 104px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
}

.page-inbox .user-pill,
.user-pill {
  width: auto;
  min-width: 42px;
  max-width: 120px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  background: linear-gradient(135deg, #19b84b, #087a3b);
}

.page-inbox .user-pill::before,
.user-pill::before {
  content: "";
}

.page-inbox .topnav-actions .btn.secondary,
.topnav-actions .btn.secondary {
  width: auto;
  min-height: 40px;
  display: inline-flex;
  padding: 0 14px;
}

@media (max-width: 1320px) {
  .page-inbox .app-topnav,
  .app-topnav {
    grid-template-columns: 230px minmax(0, 1fr) 190px;
  }

  .page-inbox .top-menu-link,
  .top-menu-link {
    min-width: auto;
    padding: 0 9px;
  }

  .page-inbox .top-menu-link .nav-icon,
  .top-menu-link .nav-icon {
    display: none;
  }

  .page-inbox .top-menu-link .nav-label,
  .top-menu-link .nav-label {
    font-size: 12px;
  }
}

/* Final Chip Talks brand pass: keep the approved navigation style last. */
header.app-topnav,
body.page-inbox header.app-topnav {
  background: #062b3a !important;
  border-bottom: 1px solid #0b4355 !important;
}

header.app-topnav .top-brand,
body.page-inbox header.app-topnav .top-brand {
  gap: 10px !important;
  color: #ffffff !important;
}

header.app-topnav .top-brand .brand-mark,
body.page-inbox header.app-topnav .top-brand .brand-mark {
  position: relative !important;
  width: 38px !important;
  height: 32px !important;
  display: block !important;
  flex: 0 0 38px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #0f9f6e, #0cc7a1) !important;
  font-size: 0 !important;
  box-shadow: none !important;
}

header.app-topnav .top-brand .brand-mark::before,
body.page-inbox header.app-topnav .top-brand .brand-mark::before {
  content: "" !important;
  position: absolute !important;
  left: 9px !important;
  top: 7px !important;
  width: 19px !important;
  height: 14px !important;
  border: 3px solid #062b3a !important;
  border-radius: 7px !important;
  background: transparent !important;
}

header.app-topnav .top-brand .brand-mark::after,
body.page-inbox header.app-topnav .top-brand .brand-mark::after {
  content: "" !important;
  position: absolute !important;
  left: 12px !important;
  top: 20px !important;
  width: 7px !important;
  height: 7px !important;
  border-left: 3px solid #062b3a !important;
  border-bottom: 3px solid #062b3a !important;
  transform: skew(-25deg) !important;
}

header.app-topnav .top-brand .brand-mark i,
body.page-inbox header.app-topnav .top-brand .brand-mark i {
  position: absolute !important;
  z-index: 1 !important;
  left: 14px !important;
  top: 13px !important;
  width: 9px !important;
  height: 3px !important;
  border-radius: 3px !important;
  background: #0f9f6e !important;
  box-shadow: 0 6px 0 #0f9f6e !important;
}

header.app-topnav .top-brand strong,
body.page-inbox header.app-topnav .top-brand strong {
  color: #ffffff !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 760 !important;
  letter-spacing: -0.2px !important;
}

header.app-topnav .top-brand small,
body.page-inbox header.app-topnav .top-brand small {
  display: none !important;
}

header.app-topnav nav.top-menu.clean-menu,
body.page-inbox header.app-topnav nav.top-menu.clean-menu {
  gap: 4px !important;
  align-items: stretch !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  position: relative !important;
  min-height: 42px !important;
  padding: 0 15px !important;
  border-radius: 8px 8px 0 0 !important;
  color: #f1f5f9 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover {
  color: #ffffff !important;
  background: #0b4355 !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-group.is-active > .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.is-active > .top-menu-link {
  color: #ffffff !important;
  background: #0b4355 !important;
  box-shadow: inset 0 -3px 0 #14b889 !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon {
  color: #9be8cf !important;
  font-size: 15px !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-chevron,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-chevron {
  color: #9be8cf !important;
  margin-left: 5px !important;
}

header.app-topnav .live-pill,
body.page-inbox header.app-topnav .live-pill {
  color: #eafff7 !important;
  background: #0b4355 !important;
  border: 1px solid #176579 !important;
}

header.app-topnav .user-pill,
body.page-inbox header.app-topnav .user-pill {
  color: #ffffff !important;
  background: #0f9f6e !important;
  border: 0 !important;
}

/* Approved Chip Talks navigation style */
header.app-topnav,
body.page-inbox header.app-topnav {
  background: #062b3a !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: 0 5px 18px rgba(6,43,58,.12) !important;
}

header.app-topnav .top-brand,
body.page-inbox header.app-topnav .top-brand {
  gap: 11px !important;
}

header.app-topnav .top-brand .brand-mark,
body.page-inbox header.app-topnav .top-brand .brand-mark {
  position: relative !important;
  width: 38px !important;
  height: 32px !important;
  display: block !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #0f9f6e, #0cc7a1) !important;
  box-shadow: 0 5px 12px rgba(15,159,110,.22) !important;
  font-size: 0 !important;
}

header.app-topnav .top-brand .brand-mark::before,
body.page-inbox header.app-topnav .top-brand .brand-mark::before {
  content: "" !important;
  position: absolute !important;
  left: 8px !important;
  top: 7px !important;
  width: 22px !important;
  height: 14px !important;
  border-radius: 5px !important;
  background: #062b3a !important;
}

header.app-topnav .top-brand .brand-mark::after,
body.page-inbox header.app-topnav .top-brand .brand-mark::after {
  content: "" !important;
  position: absolute !important;
  left: 11px !important;
  top: 18px !important;
  width: 7px !important;
  height: 7px !important;
  transform: skew(-28deg) !important;
  background: #062b3a !important;
}

header.app-topnav .top-brand .brand-mark i,
body.page-inbox header.app-topnav .top-brand .brand-mark i {
  position: absolute !important;
  z-index: 1 !important;
  left: 14px !important;
  top: 12px !important;
  width: 10px !important;
  height: 2px !important;
  border-radius: 2px !important;
  background: #0f9f6e !important;
  box-shadow: 0 4px 0 #0f9f6e !important;
}

header.app-topnav .top-brand strong,
body.page-inbox header.app-topnav .top-brand strong {
  color: #f8fafc !important;
  font-size: 20px !important;
  font-weight: 760 !important;
  letter-spacing: -.02em !important;
}

header.app-topnav .top-brand small,
body.page-inbox header.app-topnav .top-brand small { display: none !important; }

header.app-topnav nav.top-menu.clean-menu .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 13px !important;
  border-radius: 8px !important;
  color: #f1f5f9 !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-label,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label {
  color: #f1f5f9 !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon {
  width: 22px !important;
  height: 22px !important;
  border: 0 !important;
  background: transparent !important;
  color: #e2f7ef !important;
  font-size: 16px !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link {
  background: #0b4355 !important;
  border-color: transparent !important;
  box-shadow: inset 0 -3px 0 #14b889 !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link {
  background: #0b4355 !important;
  border-color: transparent !important;
}

header.app-topnav .live-pill,
body.page-inbox header.app-topnav .live-pill {
  height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(20,184,137,.35) !important;
  border-radius: 10px !important;
  background: #0b4355 !important;
  color: #f1f5f9 !important;
  font-weight: 750 !important;
}

header.app-topnav .user-pill,
body.page-inbox header.app-topnav .user-pill {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #16a675 !important;
  color: #fff !important;
  font-size: 0 !important;
}

header.app-topnav .user-pill::before,
body.page-inbox header.app-topnav .user-pill::before {
  content: attr(data-initials) !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

header.app-topnav .topnav-actions .btn.secondary,
body.page-inbox header.app-topnav .topnav-actions .btn.secondary {
  min-height: 38px !important;
  border-color: rgba(255,255,255,.18) !important;
  background: transparent !important;
  color: #f8fafc !important;
}

/* Final menu icon alignment */
header.app-topnav nav.top-menu.clean-menu .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link { gap: 8px !important; }
header.app-topnav nav.top-menu.clean-menu .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon {
  width: 22px !important; height: 22px !important; display: inline-grid !important;
  place-items: center !important; border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 7px !important; color: #c8f4e2 !important;
  background: rgba(255,255,255,.08) !important; font-size: 9px !important;
  font-weight: 900 !important; letter-spacing: .02em !important;
}
header.app-topnav nav.top-menu.clean-menu .nav-chevron,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-chevron {
  color: rgba(255,255,255,.65) !important; font-size: 11px !important; line-height: 1 !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover .nav-icon,
header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .nav-icon {
  color: #fff !important; border-color: rgba(255,255,255,.4) !important;
  background: rgba(15,159,110,.55) !important;
}

/* Functional top menu polish - template workspace */
header.app-topnav nav.top-menu.clean-menu .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  gap: 8px !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon {
  width: 22px !important;
  height: 22px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 7px !important;
  color: #c8f4e2 !important;
  background: rgba(255,255,255,.08) !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-chevron,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-chevron {
  color: rgba(255,255,255,.65) !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover .nav-icon,
header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .nav-icon {
  color: #fff !important;
  border-color: rgba(255,255,255,.4) !important;
  background: rgba(15,159,110,.55) !important;
}

@media (max-width: 1180px) {
  header.app-topnav nav.top-menu.clean-menu .nav-icon,
  body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon {
    display: none !important;
  }
}

/* Stable interface pass - 20260821 */
header.app-topnav,
body.page-inbox header.app-topnav {
  grid-template-columns: minmax(230px, 270px) minmax(520px, 1fr) auto !important;
  gap: 22px !important;
  overflow: visible !important;
}

header.app-topnav nav.top-menu.clean-menu,
body.page-inbox header.app-topnav nav.top-menu.clean-menu {
  justify-content: center !important;
  gap: 8px !important;
  overflow: visible !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link {
  color: #fff !important;
  background: rgba(255, 255, 255, .10) !important;
  border-color: rgba(255, 255, 255, .12) !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link {
  color: #fff !important;
  background: rgba(18, 185, 129, .18) !important;
  border-color: rgba(18, 185, 129, .24) !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-label,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label {
  position: static !important;
  display: block !important;
  white-space: nowrap !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-label::before,
header.app-topnav nav.top-menu.clean-menu .nav-label::after,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label::before,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label::after {
  display: none !important;
  content: none !important;
}

header.app-topnav nav.top-menu.clean-menu .top-submenu,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-submenu {
  top: 56px !important;
  left: 50% !important;
  min-width: 230px !important;
  padding: 8px !important;
  border: 1px solid #dfe7f1 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 22px 52px rgba(15, 23, 42, .18) !important;
  gap: 3px !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-group::after,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group::after {
  top: 40px !important;
  height: 24px !important;
}

header.app-topnav nav.top-menu.clean-menu .top-submenu a,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-submenu a {
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 11px !important;
  color: #24324a !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
}

header.app-topnav nav.top-menu.clean-menu .top-submenu a.active,
header.app-topnav nav.top-menu.clean-menu .top-submenu a:hover,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-submenu a.active,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-submenu a:hover {
  color: #047857 !important;
  background: #ecfdf5 !important;
}

header.app-topnav .topnav-actions,
body.page-inbox header.app-topnav .topnav-actions {
  min-width: 184px !important;
  width: auto !important;
  gap: 10px !important;
}

header.app-topnav .live-pill,
body.page-inbox header.app-topnav .live-pill {
  height: 38px !important;
  min-width: 102px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 12px !important;
}

header.app-topnav .user-pill,
body.page-inbox header.app-topnav .user-pill {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  overflow: hidden !important;
  padding: 0 !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important;
}

header.app-topnav .user-pill::before,
body.page-inbox header.app-topnav .user-pill::before {
  content: attr(data-initials);
  font-size: 13px;
  font-weight: 900;
}

body.page-inbox .support-tabs {
  padding-left: 357px !important;
  padding-right: 24px !important;
  display: flex !important;
  gap: 8px !important;
}

body.page-inbox .support-tabs a {
  min-width: 128px !important;
  border-radius: 10px !important;
  font-weight: 850 !important;
}

body.page-inbox .conversation-list {
  background: #fff !important;
}

body.page-inbox .priority-group-head {
  grid-template-columns: 10px minmax(0, 1fr) 28px 18px !important;
  padding: 0 18px !important;
}

body.page-inbox .priority-group-head strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.page-inbox .priority-group-head .chevron {
  transform: rotate(180deg) !important;
  transition: transform .16s ease !important;
}

body.page-inbox .priority-group.collapsed .priority-group-head .chevron {
  transform: rotate(90deg) !important;
}

body.page-inbox .conversation-row {
  grid-template-columns: 44px minmax(0, 1fr) 12px !important;
  min-height: 92px !important;
  padding: 14px 12px !important;
  gap: 14px !important;
  align-items: center !important;
}

body.page-inbox .conversation-title-line {
  min-height: 20px !important;
  gap: 8px !important;
}

body.page-inbox .conversation-title-line strong {
  line-height: 1.15 !important;
}

body.page-inbox .conversation-main > small {
  display: block !important;
  line-height: 1.35 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.page-inbox .conversation-bottom-line {
  margin-top: 2px !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

body.page-inbox .conversation-bottom-line .badge,
body.page-inbox .unread-pill {
  flex: 0 0 auto !important;
  line-height: 1 !important;
}

body.page-inbox .thread-actions-top .actions,
body.page-inbox .inbox-thread-card > .grid > .actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
}

body.page-inbox .inbox-thread-card > .grid > .actions .btn {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

body.page-inbox .reply-box {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 12px !important;
}

body.page-inbox .reply-box .field {
  min-width: 0 !important;
}

body.page-inbox .reply-box textarea {
  min-height: 78px !important;
}

@media (max-width: 1460px) {
  header.app-topnav,
  body.page-inbox header.app-topnav {
    grid-template-columns: 220px minmax(470px, 1fr) auto !important;
    gap: 14px !important;
  }
  header.app-topnav nav.top-menu.clean-menu .top-menu-link,
  body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
    padding: 0 10px !important;
  }
  header.app-topnav nav.top-menu.clean-menu .nav-label,
  body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label {
    font-size: 13px !important;
  }
}

/* Final Chip Talks brand pass: keep the approved navigation style last. */
header.app-topnav, body.page-inbox header.app-topnav {
  background: #062b3a !important;
  border-bottom: 1px solid #0b4355 !important;
}
header.app-topnav .top-brand, body.page-inbox header.app-topnav .top-brand { gap: 10px !important; color: #fff !important; }
header.app-topnav .top-brand .brand-mark, body.page-inbox header.app-topnav .top-brand .brand-mark {
  position: relative !important; width: 38px !important; height: 32px !important; display: block !important;
  flex: 0 0 38px !important; border-radius: 10px !important; background: linear-gradient(135deg,#0f9f6e,#0cc7a1) !important; font-size: 0 !important;
}
header.app-topnav .top-brand .brand-mark::before, body.page-inbox header.app-topnav .top-brand .brand-mark::before {
  content: "" !important; position: absolute !important; left: 9px !important; top: 7px !important; width: 19px !important; height: 14px !important;
  border: 3px solid #062b3a !important; border-radius: 7px !important; background: transparent !important;
}
header.app-topnav .top-brand .brand-mark::after, body.page-inbox header.app-topnav .top-brand .brand-mark::after {
  content: "" !important; position: absolute !important; left: 12px !important; top: 20px !important; width: 7px !important; height: 7px !important;
  border-left: 3px solid #062b3a !important; border-bottom: 3px solid #062b3a !important; transform: skew(-25deg) !important;
}
header.app-topnav .top-brand .brand-mark i, body.page-inbox header.app-topnav .top-brand .brand-mark i {
  position: absolute !important; z-index: 1 !important; left: 14px !important; top: 13px !important; width: 9px !important; height: 3px !important;
  border-radius: 3px !important; background: #0f9f6e !important; box-shadow: 0 6px 0 #0f9f6e !important;
}
header.app-topnav .top-brand strong, body.page-inbox header.app-topnav .top-brand strong {
  color: #fff !important; font-size: 20px !important; line-height: 1 !important; font-weight: 760 !important; letter-spacing: -.2px !important;
}
header.app-topnav .top-brand small, body.page-inbox header.app-topnav .top-brand small { display: none !important; }
header.app-topnav nav.top-menu.clean-menu, body.page-inbox header.app-topnav nav.top-menu.clean-menu { gap: 4px !important; align-items: stretch !important; }
header.app-topnav nav.top-menu.clean-menu .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  position: relative !important; min-height: 42px !important; padding: 0 15px !important; border-radius: 8px 8px 0 0 !important;
  color: #f1f5f9 !important; background: transparent !important; box-shadow: none !important; font-size: 15px !important; font-weight: 650 !important; white-space: nowrap !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link {
  color: #fff !important; background: #0b4355 !important; border-color: transparent !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-group.active > .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active > .top-menu-link {
  color: #fff !important; background: #0b4355 !important; border-color: transparent !important; box-shadow: inset 0 -3px 0 #14b889 !important;
}
header.app-topnav nav.top-menu.clean-menu .nav-icon, body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon { color: #9be8cf !important; font-size: 15px !important; }
header.app-topnav nav.top-menu.clean-menu .nav-chevron, body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-chevron { color: #9be8cf !important; margin-left: 5px !important; }
header.app-topnav .live-pill, body.page-inbox header.app-topnav .live-pill { color: #eafff7 !important; background: #0b4355 !important; border-color: #176579 !important; }
header.app-topnav .user-pill, body.page-inbox header.app-topnav .user-pill { color: #fff !important; background: #0f9f6e !important; border: 0 !important; } /* CENTER_NAV_TARGET */

/* Center the brand, navigation labels and controls on the same vertical axis. */
header.app-topnav, body.page-inbox header.app-topnav { min-height: 78px !important; height: 78px !important; padding-top: 0 !important; padding-bottom: 0 !important; }
header.app-topnav .top-brand, body.page-inbox header.app-topnav .top-brand { height: 78px !important; display: flex !important; align-items: center !important; }
header.app-topnav nav.top-menu.clean-menu, body.page-inbox header.app-topnav nav.top-menu.clean-menu { height: 78px !important; align-items: center !important; }
header.app-topnav nav.top-menu.clean-menu .top-menu-group, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group { height: 78px !important; display: flex !important; align-items: center !important; }
header.app-topnav nav.top-menu.clean-menu .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link { height: 46px !important; min-height: 46px !important; align-self: center !important; line-height: 1 !important; }
header.app-topnav .topnav-actions, body.page-inbox header.app-topnav .topnav-actions { height: 78px !important; align-items: center !important; } /* ICONS_TARGET */

/* Center the brand, navigation labels and controls on the same vertical axis. */
header.app-topnav, body.page-inbox header.app-topnav {
  min-height: 78px !important;
  height: 78px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
header.app-topnav .top-brand, body.page-inbox header.app-topnav .top-brand {
  height: 78px !important;
  display: flex !important;
  align-items: center !important;
}
header.app-topnav nav.top-menu.clean-menu, body.page-inbox header.app-topnav nav.top-menu.clean-menu {
  height: 78px !important;
  align-items: center !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-group, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group {
  height: 78px !important;
  display: flex !important;
  align-items: center !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  height: 46px !important;
  min-height: 46px !important;
  align-self: center !important;
  line-height: 1 !important;
}
header.app-topnav .topnav-actions, body.page-inbox header.app-topnav .topnav-actions {
  height: 78px !important;
  align-items: center !important;
}

/* Final visual guardrail - 20260821 */
header.app-topnav,
body.page-inbox header.app-topnav {
  display: grid !important;
  grid-template-columns: 250px minmax(560px, 1fr) 204px !important;
  align-items: center !important;
  gap: 18px !important;
  overflow: visible !important;
}

header.app-topnav .top-brand,
body.page-inbox header.app-topnav .top-brand {
  min-width: 0 !important;
}

header.app-topnav nav.top-menu.clean-menu,
body.page-inbox header.app-topnav nav.top-menu.clean-menu {
  height: 74px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: visible !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  transition: background .16s ease, border-color .16s ease, color .16s ease !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link {
  background: rgba(255, 255, 255, .10) !important;
  border-color: rgba(255, 255, 255, .12) !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link {
  background: rgba(18, 185, 129, .18) !important;
  border-color: rgba(18, 185, 129, .26) !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-label,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label {
  display: block !important;
  position: static !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-label::before,
header.app-topnav nav.top-menu.clean-menu .nav-label::after,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label::before,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label::after {
  display: none !important;
  content: none !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-group::after,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group::after {
  top: 39px !important;
  height: 28px !important;
}

header.app-topnav nav.top-menu.clean-menu .top-submenu,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-submenu {
  top: 56px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  min-width: 230px !important;
  padding: 8px !important;
  border: 1px solid #dfe7f1 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 22px 52px rgba(15, 23, 42, .18) !important;
}

header.app-topnav .topnav-actions,
body.page-inbox header.app-topnav .topnav-actions {
  height: 74px !important;
  min-width: 0 !important;
  width: auto !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
}

header.app-topnav .topnav-actions .btn.secondary,
body.page-inbox header.app-topnav .topnav-actions .btn.secondary {
  display: inline-flex !important;
  width: auto !important;
}

header.app-topnav .user-pill,
body.page-inbox header.app-topnav .user-pill {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  font-size: 0 !important;
}

body.page-inbox .support-tabs {
  display: flex !important;
  gap: 8px !important;
  padding-left: 357px !important;
  overflow: hidden !important;
}

body.page-inbox .support-tabs a {
  min-width: 128px !important;
  width: auto !important;
}

body.page-inbox .priority-group-head {
  grid-template-columns: 10px minmax(0, 1fr) 28px 18px !important;
  padding: 0 18px !important;
}

body.page-inbox .priority-group.collapsed .priority-group-list {
  display: none !important;
}

body.page-inbox .conversation-row {
  grid-template-columns: 44px minmax(0, 1fr) 12px !important;
  min-height: 92px !important;
  padding: 14px 12px !important;
  gap: 14px !important;
}

body.page-inbox .conversation-main > small {
  max-width: 100% !important;
  display: block !important;
}

body.page-inbox .conversation-bottom-line {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  min-height: 23px !important;
}

body.page-inbox .conversation-bottom-line .badge,
body.page-inbox .unread-pill {
  position: static !important;
  white-space: nowrap !important;
}

body.page-inbox .inbox-thread-card > .grid > .actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 0 16px !important;
}

body.page-inbox .inbox-thread-card > .grid > .actions .btn {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

body.page-inbox .reply-box {
  grid-template-columns: minmax(0, 1fr) 98px !important;
  align-items: end !important;
  gap: 12px !important;
  height: auto !important;
}

body.page-inbox .reply-box textarea {
  min-height: 82px !important;
}

body.page-inbox .reply-box .send-btn {
  width: 98px !important;
}

@media (max-width: 1460px) {
  header.app-topnav,
  body.page-inbox header.app-topnav {
    grid-template-columns: 220px minmax(470px, 1fr) 112px !important;
  }
  header.app-topnav .topnav-actions .btn.secondary,
  body.page-inbox header.app-topnav .topnav-actions .btn.secondary,
  header.app-topnav .live-pill,
  body.page-inbox header.app-topnav .live-pill {
    display: none !important;
  }
}

@media (max-width: 1180px) {
  header.app-topnav,
  body.page-inbox header.app-topnav {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
  header.app-topnav nav.top-menu.clean-menu,
  body.page-inbox header.app-topnav nav.top-menu.clean-menu {
    justify-content: flex-start !important;
    overflow-x: auto !important;
    height: auto !important;
  }
  body.page-inbox .support-tabs {
    padding-left: 16px !important;
    overflow-x: auto !important;
  }
}

@media (max-width: 1180px) {
  header.app-topnav,
  body.page-inbox header.app-topnav {
    grid-template-columns: 1fr !important;
    height: auto !important;
    padding: 12px 16px !important;
  }
  header.app-topnav nav.top-menu.clean-menu,
  body.page-inbox header.app-topnav nav.top-menu.clean-menu {
    justify-content: flex-start !important;
    overflow-x: auto !important;
    height: auto !important;
    padding-bottom: 4px !important;
  }
  header.app-topnav .topnav-actions,
  body.page-inbox header.app-topnav .topnav-actions {
    display: none !important;
  }
  body.page-inbox .support-tabs {
    padding-left: 16px !important;
    overflow-x: auto !important;
  }
}

/* Stable top menu - 20260801 */
.app-topnav,
.page-inbox .app-topnav {
  grid-template-columns: 250px minmax(0, 1fr) 170px !important;
  gap: 16px !important;
  padding-left: 28px !important;
  padding-right: 24px !important;
  overflow: visible !important;
}

.top-brand,
.page-inbox .top-brand {
  min-width: 0 !important;
}

.top-brand strong,
.page-inbox .top-brand strong {
  font-size: 26px !important;
  line-height: 1 !important;
}

.top-menu,
.page-inbox .top-menu {
  width: 100% !important;
  min-width: 0 !important;
  height: 74px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scrollbar-width: none !important;
}

.top-menu::-webkit-scrollbar,
.page-inbox .top-menu::-webkit-scrollbar {
  display: none !important;
}

.top-menu-group,
.page-inbox .top-menu-group {
  flex: 0 0 auto !important;
  position: relative !important;
  min-width: 0 !important;
}

.top-menu-link,
.page-inbox .top-menu-link {
  min-width: 0 !important;
  width: auto !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

.top-menu-link .nav-icon,
.page-inbox .top-menu-link .nav-icon {
  display: none !important;
}

.top-menu-link .nav-label,
.page-inbox .top-menu-link .nav-label {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.top-menu-link .nav-label::after,
.page-inbox .top-menu-link .nav-label::after,
.top-menu-group:not(:first-child) .top-menu-link .nav-label::after,
.page-inbox .top-menu-group:not(:first-child) .top-menu-link .nav-label::after {
  content: "" !important;
  display: none !important;
  border: 0 !important;
  margin: 0 !important;
}

.top-menu-group.active .top-menu-link,
.page-inbox .top-menu-group.active .top-menu-link {
  padding-left: 14px !important;
  padding-right: 14px !important;
  background: rgba(255, 255, 255, .13) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12) !important;
}

.top-submenu,
.page-inbox .top-submenu {
  top: 54px !important;
  z-index: 5000 !important;
}

.topnav-actions,
.page-inbox .topnav-actions {
  min-width: 0 !important;
  width: 170px !important;
  height: 74px !important;
  gap: 8px !important;
}

.live-pill,
.page-inbox .live-pill {
  min-width: 98px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
}

.user-pill,
.page-inbox .user-pill {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  color: transparent !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  position: relative !important;
}

.user-pill::before,
.page-inbox .user-pill::before {
  content: "JN" !important;
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

.topnav-actions .btn.secondary,
.page-inbox .topnav-actions .btn.secondary {
  display: none !important;
}

@media (max-width: 1180px) {
  .app-topnav,
  .page-inbox .app-topnav {
    grid-template-columns: 220px minmax(0, 1fr) 120px !important;
  }

  .topnav-actions,
  .page-inbox .topnav-actions {
    width: 120px !important;
  }

  .live-pill,
  .page-inbox .live-pill {
    display: none !important;
  }
}

/* Final top menu pills - 20260801 */
body.page-inbox header.app-topnav,
header.app-topnav {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  height: 74px !important;
  padding: 0 28px !important;
  overflow: visible !important;
}

body.page-inbox header.app-topnav .top-brand,
header.app-topnav .top-brand {
  flex: 0 0 250px !important;
  width: 250px !important;
  min-width: 250px !important;
  height: 74px !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu,
header.app-topnav nav.top-menu.clean-menu {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 720px !important;
  height: 74px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group,
header.app-topnav nav.top-menu.clean-menu .top-menu-group {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  position: relative !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link,
header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  line-height: 40px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
  background: transparent !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link,
header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover {
  background: rgba(255, 255, 255, .14) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12) !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label,
header.app-topnav nav.top-menu.clean-menu .nav-label {
  display: block !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  color: rgba(255, 255, 255, .95) !important;
  font-size: 14px !important;
  font-weight: 820 !important;
  line-height: 40px !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label::before,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label::after,
header.app-topnav nav.top-menu.clean-menu .nav-label::before,
header.app-topnav nav.top-menu.clean-menu .nav-label::after {
  content: none !important;
  display: none !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon,
header.app-topnav nav.top-menu.clean-menu .nav-icon {
  display: none !important;
}

body.page-inbox header.app-topnav .topnav-actions,
header.app-topnav .topnav-actions {
  flex: 0 0 148px !important;
  width: 148px !important;
  min-width: 148px !important;
  height: 74px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

body.page-inbox header.app-topnav .live-pill,
header.app-topnav .live-pill {
  flex: 0 0 auto !important;
  min-width: 96px !important;
  height: 38px !important;
}

body.page-inbox header.app-topnav .user-pill,
header.app-topnav .user-pill {
  flex: 0 0 40px !important;
}

@media (max-width: 1360px) {
  body.page-inbox header.app-topnav,
  header.app-topnav {
    gap: 14px !important;
  }

  body.page-inbox header.app-topnav .top-brand,
  header.app-topnav .top-brand {
    flex-basis: 220px !important;
    width: 220px !important;
    min-width: 220px !important;
  }

  body.page-inbox header.app-topnav nav.top-menu.clean-menu,
  header.app-topnav nav.top-menu.clean-menu {
    max-width: 620px !important;
    gap: 5px !important;
  }

  body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link,
  header.app-topnav nav.top-menu.clean-menu .top-menu-link {
    padding: 0 9px !important;
  }

  body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label,
  header.app-topnav nav.top-menu.clean-menu .nav-label {
    font-size: 13px !important;
  }
}

/* Final approved navigation override */
header.app-topnav, body.page-inbox header.app-topnav { background: #062b3a !important; }
header.app-topnav .top-brand .brand-mark, body.page-inbox header.app-topnav .top-brand .brand-mark {
  position: relative !important; width: 38px !important; height: 32px !important; display: block !important;
  border-radius: 10px !important; background: linear-gradient(135deg,#0f9f6e,#0cc7a1) !important; font-size: 0 !important;
}
header.app-topnav .top-brand .brand-mark::before, body.page-inbox header.app-topnav .top-brand .brand-mark::before {
  content: "" !important; position: absolute !important; left: 8px !important; top: 7px !important; width: 22px !important; height: 14px !important;
  border-radius: 5px !important; background: #062b3a !important;
}
header.app-topnav .top-brand .brand-mark::after, body.page-inbox header.app-topnav .top-brand .brand-mark::after {
  content: "" !important; position: absolute !important; left: 11px !important; top: 18px !important; width: 7px !important; height: 7px !important;
  transform: skew(-28deg) !important; background: #062b3a !important;
}
header.app-topnav .top-brand .brand-mark i, body.page-inbox header.app-topnav .top-brand .brand-mark i {
  position: absolute !important; z-index: 1 !important; left: 14px !important; top: 12px !important; width: 10px !important; height: 2px !important;
  border-radius: 2px !important; background: #0f9f6e !important; box-shadow: 0 4px 0 #0f9f6e !important;
}
header.app-topnav .top-brand strong, body.page-inbox header.app-topnav .top-brand strong { color: #f8fafc !important; font-size: 20px !important; font-weight: 760 !important; letter-spacing: -.02em !important; }
header.app-topnav .top-brand small, body.page-inbox header.app-topnav .top-brand small { display: none !important; }
header.app-topnav nav.top-menu.clean-menu .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  min-height: 42px !important; height: 42px !important; padding: 0 13px !important; border-radius: 8px !important; color: #f1f5f9 !important;
}
header.app-topnav nav.top-menu.clean-menu .nav-label, body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label { color: #f1f5f9 !important; font-size: 15px !important; font-weight: 650 !important; letter-spacing: 0 !important; }
header.app-topnav nav.top-menu.clean-menu .nav-icon, body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon { width: 22px !important; height: 22px !important; border: 0 !important; background: transparent !important; color: #e2f7ef !important; font-size: 16px !important; }
header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link { background: #0b4355 !important; border-color: transparent !important; box-shadow: inset 0 -3px 0 #14b889 !important; }
header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover, header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link { background: #0b4355 !important; border-color: transparent !important; }
header.app-topnav .live-pill, body.page-inbox header.app-topnav .live-pill { height: 38px !important; padding: 0 14px !important; border: 1px solid rgba(20,184,137,.35) !important; border-radius: 10px !important; background: #0b4355 !important; color: #f1f5f9 !important; font-weight: 750 !important; }
header.app-topnav .user-pill, body.page-inbox header.app-topnav .user-pill { width: 38px !important; min-width: 38px !important; height: 38px !important; padding: 0 !important; display: grid !important; place-items: center !important; border: 0 !important; border-radius: 50% !important; background: #16a675 !important; color: #fff !important; font-size: 0 !important; }
header.app-topnav .user-pill::before, body.page-inbox header.app-topnav .user-pill::before { content: attr(data-initials) !important; font-size: 13px !important; font-weight: 850 !important; }

/* Menu hover and submenu usability - 20260801 */
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link,
header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link {
  background: transparent !important;
  box-shadow: none !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link,
header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link {
  color: #fff !important;
  background: rgba(255, 255, 255, .14) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12) !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .nav-label,
header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .nav-label {
  color: #fff !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .nav-label::before,
header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .nav-label::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 14px !important;
  right: 14px !important;
  bottom: -14px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: #18b981 !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group::after,
header.app-topnav nav.top-menu.clean-menu .top-menu-group::after {
  content: "" !important;
  position: absolute !important;
  left: -8px !important;
  right: -8px !important;
  top: 40px !important;
  height: 22px !important;
  display: block !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-submenu,
header.app-topnav nav.top-menu.clean-menu .top-submenu {
  top: 48px !important;
  margin-top: 0 !important;
  transform: translateX(-50%) !important;
}

body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-submenu,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-submenu:hover,
header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-submenu,
header.app-topnav nav.top-menu.clean-menu .top-submenu:hover {
  display: grid !important;
}

/* Thread header and search fixes - 20260801 */
body.page-inbox .thread-header {
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: center !important;
  overflow: visible !important;
}

body.page-inbox .thread-title {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "name score"
    "channel score" !important;
  column-gap: 14px !important;
  row-gap: 3px !important;
  align-items: center !important;
}

body.page-inbox .thread-title h2 {
  grid-area: name !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

body.page-inbox .thread-title p.muted {
  grid-area: channel !important;
  min-width: 0 !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

body.page-inbox .thread-title .mini-score {
  grid-area: score !important;
  align-self: center !important;
  justify-self: start !important;
  margin: 0 !important;
  padding: 6px 11px !important;
  min-width: 52px !important;
  text-align: center !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  position: static !important;
  transform: none !important;
}

body.page-inbox .support-search {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 44px !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 16px 14px !important;
  margin: 0 !important;
  overflow: visible !important;
}

body.page-inbox .support-search::before {
  content: "" !important;
  position: absolute !important;
  left: 30px !important;
  top: 29px !important;
  width: 12px !important;
  height: 12px !important;
  margin: 0 !important;
  border: 1.7px solid #94a3b8 !important;
  border-radius: 50% !important;
  background: transparent !important;
  z-index: 2 !important;
}

body.page-inbox .support-search::after {
  content: "" !important;
  position: absolute !important;
  left: 41px !important;
  top: 41px !important;
  width: 7px !important;
  height: 1.7px !important;
  border-radius: 99px !important;
  background: #94a3b8 !important;
  transform: rotate(45deg) !important;
  z-index: 2 !important;
}

body.page-inbox .support-search input {
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 14px 0 42px !important;
  border-radius: 10px !important;
  line-height: 42px !important;
}

body.page-inbox .support-search .btn {
  width: 44px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  position: relative !important;
  color: transparent !important;
}

body.page-inbox .support-search .btn::before,
body.page-inbox .support-search .btn::after {
  content: "" !important;
  position: absolute !important;
  left: 13px !important;
  right: 13px !important;
  height: 1.5px !important;
  border: 0 !important;
  border-radius: 99px !important;
  background: #64748b !important;
}

body.page-inbox .support-search .btn::before {
  top: 16px !important;
}

body.page-inbox .support-search .btn::after {
  top: 25px !important;
  width: 12px !important;
  right: auto !important;
}

/* Empty conversation state - 20260801 */
body.page-inbox .support-tabs {
  height: 52px !important;
  padding: 8px 24px 8px 357px !important;
  align-items: center !important;
  background: #fff !important;
  border-bottom: 1px solid #dfe7f1 !important;
  overflow: hidden !important;
}

body.page-inbox .support-tabs a {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.page-inbox .empty-thread-card {
  display: grid !important;
  grid-template-rows: 1fr !important;
  height: calc(100vh - 208px) !important;
  min-height: 0 !important;
  background:
    linear-gradient(45deg, rgba(15, 23, 42, .035) 12%, transparent 12%, transparent 88%, rgba(15, 23, 42, .035) 88%),
    #fbf6ee !important;
  background-size: 54px 54px !important;
}

body.page-inbox .empty-thread-card .thread-body {
  display: none !important;
}

body.page-inbox .empty-conversation-state {
  align-self: center !important;
  justify-self: center !important;
  max-width: 420px !important;
  padding: 28px !important;
  display: grid !important;
  justify-items: center !important;
  gap: 10px !important;
  text-align: center !important;
  color: #64748b !important;
}

body.page-inbox .empty-conversation-state span {
  width: 54px !important;
  height: 54px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 18px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #079669, #0a74c8) !important;
  box-shadow: 0 18px 34px rgba(7, 150, 105, .2) !important;
  font-weight: 950 !important;
}

body.page-inbox .empty-conversation-state h2 {
  margin: 4px 0 0 !important;
  color: #0f172a !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
}

body.page-inbox .empty-conversation-state p {
  margin: 0 !important;
  color: #64748b !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

/* Module shell pages - 20260801 */
.module-hero {
  margin: 0 0 18px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, .12), rgba(37, 99, 235, .10)),
    #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
}

.module-hero h2 {
  margin: 3px 0 8px;
  color: #07152d;
  font-size: 30px;
  line-height: 1.05;
}

.module-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: #52627a;
  line-height: 1.55;
}

.module-safe-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: #067647;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.module-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.module-metrics article {
  min-height: 108px;
  padding: 18px;
  display: grid;
  gap: 5px;
  align-content: center;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045);
}

.module-metrics span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-metrics strong {
  color: #07152d;
  font-size: 25px;
  line-height: 1.1;
}

.module-metrics small {
  color: #64748b;
  font-size: 12px;
}

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

.module-main,
.module-side {
  display: grid;
  gap: 14px;
}

.module-card {
  padding: 20px;
}

.module-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.module-card-head h3,
.module-side h3 {
  margin: 0;
  color: #07152d;
  font-size: 18px;
}

.module-card-head p,
.module-safe-card p {
  margin: 5px 0 0;
  color: #64748b;
  line-height: 1.5;
}

.module-card-head span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 900;
}

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

.module-checklist div {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #25324a;
  font-size: 13px;
  font-weight: 760;
}

.module-checklist i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}

.module-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.module-actions a {
  padding: 13px;
  display: grid;
  gap: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #07152d;
  text-decoration: none;
  transition: .16s ease;
}

.module-actions a:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, .35);
  background: #ecfdf5;
}

.module-actions small {
  color: #64748b;
}

.module-safe-card {
  border-color: #fed7aa;
  background: #fff7ed;
}

.module-safe-card h3 {
  color: #9a3412;
}

@media (max-width: 1050px) {
  .module-metrics,
  .module-layout,
  .module-checklist {
    grid-template-columns: 1fr;
  }
  .module-hero {
    flex-direction: column;
  }
}

/* Stable product top navigation - 20260801 modules */
header.app-topnav,
body.page-inbox header.app-topnav {
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) 190px !important;
  align-items: center !important;
  gap: 18px !important;
  min-height: 74px !important;
  height: 74px !important;
  padding: 0 26px !important;
  overflow: visible !important;
}

header.app-topnav .top-brand,
body.page-inbox header.app-topnav .top-brand {
  width: auto !important;
  min-width: 0 !important;
  flex: none !important;
  height: 74px !important;
}

header.app-topnav nav.top-menu.clean-menu,
body.page-inbox header.app-topnav nav.top-menu.clean-menu {
  width: 100% !important;
  max-width: none !important;
  height: 74px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  overflow: visible !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-group,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group {
  position: relative !important;
  flex: 0 1 auto !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-label,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label {
  display: block !important;
  color: rgba(255, 255, 255, .9) !important;
  font-size: 14px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
}

header.app-topnav nav.top-menu.clean-menu .nav-label::before,
header.app-topnav nav.top-menu.clean-menu .nav-label::after,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label::before,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label::after {
  content: none !important;
  display: none !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .top-menu-link {
  background: rgba(255, 255, 255, .09) !important;
  border-color: rgba(255, 255, 255, .12) !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link {
  background: rgba(255, 255, 255, .16) !important;
  border-color: rgba(255, 255, 255, .18) !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-group::after,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group::after {
  content: "" !important;
  position: absolute !important;
  left: -10px !important;
  right: -10px !important;
  top: 40px !important;
  height: 24px !important;
  display: block !important;
}

header.app-topnav nav.top-menu.clean-menu .top-submenu,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-submenu {
  top: 52px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  z-index: 9000 !important;
}

header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-submenu,
header.app-topnav nav.top-menu.clean-menu .top-submenu:hover,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-submenu,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-submenu:hover {
  display: grid !important;
}

header.app-topnav .topnav-actions,
body.page-inbox header.app-topnav .topnav-actions {
  width: auto !important;
  min-width: 0 !important;
  height: 74px !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

header.app-topnav .topnav-actions .btn.secondary,
body.page-inbox header.app-topnav .topnav-actions .btn.secondary {
  display: inline-flex !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 14px !important;
}

header.app-topnav .user-pill,
body.page-inbox header.app-topnav .user-pill {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
}

@media (max-width: 1320px) {
  header.app-topnav,
  body.page-inbox header.app-topnav {
    grid-template-columns: 210px minmax(0, 1fr) 104px !important;
    gap: 10px !important; /* END_NAV_TARGET */
  }
  header.app-topnav .topnav-actions .btn.secondary,
  body.page-inbox header.app-topnav .topnav-actions .btn.secondary,
  header.app-topnav .live-pill,
  body.page-inbox header.app-topnav .live-pill {
    display: none !important;
  }
  header.app-topnav nav.top-menu.clean-menu,
  body.page-inbox header.app-topnav nav.top-menu.clean-menu {
    gap: 4px !important;
  }
  header.app-topnav nav.top-menu.clean-menu .top-menu-link,
  body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
    padding: 0 8px !important;
  }
  header.app-topnav nav.top-menu.clean-menu .nav-label,
  body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-label {
    font-size: 13px !important;
  }
}

/* Final Chip Talks brand pass: keep the approved navigation style last. */
header.app-topnav, body.page-inbox header.app-topnav {
  background: #062b3a !important;
  border-bottom: 1px solid #0b4355 !important;
}
header.app-topnav .top-brand, body.page-inbox header.app-topnav .top-brand { gap: 10px !important; color: #fff !important; }
header.app-topnav .top-brand .brand-mark, body.page-inbox header.app-topnav .top-brand .brand-mark {
  position: relative !important; width: 38px !important; height: 32px !important; display: block !important;
  flex: 0 0 38px !important; border-radius: 10px !important; background: linear-gradient(135deg,#0f9f6e,#0cc7a1) !important; font-size: 0 !important;
}
header.app-topnav .top-brand .brand-mark::before, body.page-inbox header.app-topnav .top-brand .brand-mark::before {
  content: "" !important; position: absolute !important; left: 9px !important; top: 7px !important; width: 19px !important; height: 14px !important;
  border: 3px solid #062b3a !important; border-radius: 7px !important; background: transparent !important;
}
header.app-topnav .top-brand .brand-mark::after, body.page-inbox header.app-topnav .top-brand .brand-mark::after {
  content: "" !important; position: absolute !important; left: 12px !important; top: 20px !important; width: 7px !important; height: 7px !important;
  border-left: 3px solid #062b3a !important; border-bottom: 3px solid #062b3a !important; transform: skew(-25deg) !important;
}
header.app-topnav .top-brand .brand-mark i, body.page-inbox header.app-topnav .top-brand .brand-mark i {
  position: absolute !important; z-index: 1 !important; left: 14px !important; top: 13px !important; width: 9px !important; height: 3px !important;
  border-radius: 3px !important; background: #0f9f6e !important; box-shadow: 0 6px 0 #0f9f6e !important;
}
header.app-topnav .top-brand strong, body.page-inbox header.app-topnav .top-brand strong {
  color: #fff !important; font-size: 20px !important; line-height: 1 !important; font-weight: 760 !important; letter-spacing: -.2px !important;
}
header.app-topnav .top-brand small, body.page-inbox header.app-topnav .top-brand small { display: none !important; }
header.app-topnav nav.top-menu.clean-menu, body.page-inbox header.app-topnav nav.top-menu.clean-menu { gap: 4px !important; align-items: stretch !important; }
header.app-topnav nav.top-menu.clean-menu .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link {
  position: relative !important; min-height: 42px !important; padding: 0 15px !important; border-radius: 8px 8px 0 0 !important;
  color: #f1f5f9 !important; background: transparent !important; box-shadow: none !important; font-size: 15px !important; font-weight: 650 !important; white-space: nowrap !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover,
header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:hover .top-menu-link {
  color: #fff !important; background: #0b4355 !important; border-color: transparent !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-group.active > .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active > .top-menu-link {
  color: #fff !important; background: #0b4355 !important; border-color: transparent !important; box-shadow: inset 0 -3px 0 #14b889 !important;
}
header.app-topnav nav.top-menu.clean-menu .nav-icon, body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon { color: #9be8cf !important; font-size: 15px !important; }
header.app-topnav nav.top-menu.clean-menu .nav-chevron, body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-chevron { color: #9be8cf !important; margin-left: 5px !important; }
header.app-topnav .live-pill, body.page-inbox header.app-topnav .live-pill { color: #eafff7 !important; background: #0b4355 !important; border-color: #176579 !important; }
header.app-topnav .user-pill, body.page-inbox header.app-topnav .user-pill { color: #fff !important; background: #0f9f6e !important; border: 0 !important; } /* CENTER_NAV_TARGET_END */

/* Final vertical alignment for the approved header composition. */
header.app-topnav, body.page-inbox header.app-topnav { min-height: 78px !important; height: 78px !important; padding-top: 0 !important; padding-bottom: 0 !important; }
header.app-topnav .top-brand, body.page-inbox header.app-topnav .top-brand { height: 78px !important; display: flex !important; align-items: center !important; }
header.app-topnav nav.top-menu.clean-menu, body.page-inbox header.app-topnav nav.top-menu.clean-menu { height: 78px !important; align-items: center !important; }
header.app-topnav nav.top-menu.clean-menu .top-menu-group, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group { height: 78px !important; display: flex !important; align-items: center !important; }
header.app-topnav nav.top-menu.clean-menu .top-menu-link, body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link { height: 46px !important; min-height: 46px !important; align-self: center !important; line-height: 1 !important; }
header.app-topnav .topnav-actions, body.page-inbox header.app-topnav .topnav-actions { height: 78px !important; align-items: center !important; } /* ICONS_TARGET_END */

/* Reference-style line icons for the primary navigation. */
header.app-topnav nav.top-menu.clean-menu .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon {
  width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 22px !important;
  color: #f1f5f9 !important;
}
header.app-topnav nav.top-menu.clean-menu .nav-icon svg,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .nav-icon svg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link:hover .nav-icon,
header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .nav-icon,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group.active .nav-icon { color: #9be8cf !important; } /* SHADOW_TARGET_END */

/* Flat navigation: only the active item and hover receive a surface. */
header.app-topnav nav.top-menu.clean-menu .top-menu-group:not(.active) > .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:not(.active) > .top-menu-link {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-group:not(.active) > .top-menu-link:hover,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:not(.active) > .top-menu-link:hover,
header.app-topnav nav.top-menu.clean-menu .top-menu-group:not(.active):hover > .top-menu-link,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-group:not(.active):hover > .top-menu-link {
  background: #0b4355 !important;
  border-color: transparent !important;
  box-shadow: none !important; /* FLAT_MENU_TARGET_END */
}

/* Remove the inherited pill background from icon, label and chevron spans. */
header.app-topnav nav.top-menu.clean-menu .top-menu-link > span,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link > span {
  background: transparent !important;
  box-shadow: none !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-link > .nav-label,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link > .nav-label {
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
}
header.app-topnav nav.top-menu.clean-menu .top-menu-link > .nav-chevron,
body.page-inbox header.app-topnav nav.top-menu.clean-menu .top-menu-link > .nav-chevron {
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important; /* BANNERS_TARGET_END */
}

/* Compact status notices: keep the account workspace visually primary. */
.connect-banner,
.ai-off-banner {
  min-height: 0 !important;
  margin: 0 0 10px !important;
  padding: 8px 12px !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}
.connect-banner {
  border: 1px solid #c9d9e3 !important;
  color: #4a6578 !important;
  background: #f4f8fa !important;
}
.connect-banner span { color: #24495f !important; font-weight: 750 !important; }
.connect-banner a {
  min-height: 26px !important;
  padding: 0 9px !important;
  border: 1px solid #b8d2df !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #176579 !important;
  font-size: 12px !important;
}
.ai-off-banner {
  border: 1px solid #e5d8c6 !important;
  color: #77644e !important;
  background: #fcfaf7 !important;
}
.ai-off-banner span { color: #6d5a45 !important; font-weight: 750 !important; }
.ai-off-banner a { color: #6d5a45 !important; font-weight: 700 !important; }

/* Template test workspace - approved UI concept */
.test-template-page { display: grid; gap: 18px; }
.test-template-heading { display: flex; align-items: center; justify-content: space-between; }
.test-template-breadcrumb { color: #6b7a8e; font-size: 13px; font-weight: 700; }
.test-template-breadcrumb span { margin: 0 7px; color: #a8b3c1; }
.test-template-title-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.test-template-title-row h2 { margin: 0; color: #10243b; font-size: 30px; line-height: 1.1; }
.safe-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1px solid #bfe8d8; border-radius: 999px; background: #effbf6; color: #07805b; font-size: 12px; font-weight: 850; }
.test-template-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr); gap: 18px; align-items: stretch; }
.test-template-form, .test-template-preview { padding: 0; overflow: hidden; box-shadow: 0 14px 36px rgba(15, 35, 55, .055); }
.test-template-form form { display: grid; height: 100%; }
.test-step { padding: 22px 24px; border-bottom: 1px solid #e7edf3; }
.test-step h3, .test-template-preview > h3, .send-status h3 { margin: 0 0 16px; color: #10243b; font-size: 17px; line-height: 1.2; }
.test-step .field + .field { margin-top: 14px; }
.test-step label { color: #43566b; font-size: 13px; }
.test-step input, .test-step select { min-height: 43px; border-color: #cdd9e5; color: #1c2e44; background: #fff; }
.test-step input:focus, .test-step select:focus { border-color: #0b9c73; box-shadow: 0 0 0 3px rgba(11, 156, 115, .12); outline: none; }
.test-step small { color: #6b7a8e; font-size: 12px; line-height: 1.45; }
.test-vars-step { padding-bottom: 20px; }
.template-param-list { display: grid; gap: 10px; }
.template-param-row { display: grid; grid-template-columns: 30px 42px 150px minmax(0, 1fr); align-items: center; gap: 8px; }
.param-index { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid #c9def8; border-radius: 50%; color: #1769c2; background: #f1f7ff; font-weight: 850; }
.param-token { color: #5d738b; font-size: 12px; font-weight: 800; }
.template-param-row label { font-size: 12px; }
.template-param-row input { min-width: 0; }
.test-form-actions { display: flex; gap: 12px; padding: 20px 24px; margin-top: auto; }
.test-form-actions .btn { min-height: 43px; flex: 1; }
.test-submit { background: #0b9c73; box-shadow: 0 9px 18px rgba(11, 156, 115, .15); }
.test-submit:hover { background: #07845f; }
.test-submit:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }
.test-template-preview { background: #fff; }
.test-template-preview > h3 { padding: 22px 24px 0; margin-bottom: 16px; }
.whatsapp-preview-shell { margin: 0 24px; min-height: 260px; display: grid; place-items: center; padding: 22px; border: 1px solid #d9e1e8; border-radius: 10px; background: #efe9e2; background-image: radial-gradient(rgba(78, 94, 104, .06) 1px, transparent 1px); background-size: 16px 16px; }
.whatsapp-preview-card { width: min(100%, 420px); position: relative; padding: 20px 22px 16px 62px; border-radius: 14px 14px 14px 4px; background: #fff; box-shadow: 0 10px 26px rgba(32, 49, 62, .12); color: #23364b; }
.whatsapp-preview-icon { position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #0b9c73; color: #fff; font-size: 27px; line-height: 0; }
.whatsapp-preview-card strong { display: block; margin-bottom: 12px; font-size: 16px; }
.whatsapp-preview-card p { margin: 0; color: #3f5368; font-size: 14px; line-height: 1.55; }
.preview-time { margin-top: 10px; color: #8b98a7; font-size: 11px; text-align: right; }
.preview-cta { display: flex; align-items: center; justify-content: center; min-height: 40px; margin-top: 14px; border-radius: 7px; background: #0b9c73; color: #fff; font-size: 14px; font-weight: 850; }
.preview-caption { margin: 10px 24px 18px; color: #758397; font-size: 12px; text-align: center; }
.send-status { padding: 18px 24px 0; border-top: 1px solid #e7edf3; }
.status-waiting { display: inline-flex; align-items: center; min-height: 29px; padding: 0 10px; border: 1px solid #b9d4f7; border-radius: 7px; background: #f0f7ff; color: #236bc2; font-size: 12px; font-weight: 850; }
.status-checklist { display: grid; margin-top: 12px; border: 1px solid #dce5ed; border-radius: 9px; overflow: hidden; }
.status-checklist > div { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-bottom: 1px solid #e7edf3; }
.status-checklist > div:last-child { border-bottom: 0; }
.status-checklist i { width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; border-radius: 50%; background: #0b9c73; color: #fff; font-size: 12px; font-style: normal; font-weight: 900; }
.status-checklist b, .status-checklist small { display: block; }
.status-checklist b { color: #23364b; font-size: 12px; }
.status-checklist small { margin-top: 2px; color: #758397; font-size: 11px; }
.test-safety-note { margin: 18px 24px 22px; padding: 10px 12px; border: 1px solid #bed8f7; border-radius: 8px; background: #f3f8ff; color: #2464ad; font-size: 12px; line-height: 1.45; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* Inbox: final layout pass keeps the queue, thread and profile visually stable. */
body.page-inbox .inbox-layout {
  grid-template-columns: 360px minmax(0, 1fr) !important;
  min-height: 0;
}

body.page-inbox .support-queue,
body.page-inbox .inbox-detail-grid,
body.page-inbox .inbox-thread-card,
body.page-inbox .lead-side-panel {
  min-width: 0;
}

body.page-inbox .support-queue {
  display: flex;
  flex-direction: column;
}

body.page-inbox .conversation-list {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

body.page-inbox .priority-group-head {
  cursor: pointer;
  user-select: none;
  transition: background .15s ease;
}

body.page-inbox .priority-group-head:hover {
  background: #f3f7fb;
}

body.page-inbox .priority-group.collapsed .priority-group-list {
  display: none;
}

body.page-inbox .priority-group.collapsed .chevron {
  transform: rotate(180deg);
}

body.page-inbox .priority-group .chevron {
  transition: transform .15s ease;
}

body.page-inbox .conversation-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 14px;
  gap: 10px;
}

body.page-inbox .conversation-main {
  min-width: 0;
}

body.page-inbox .conversation-title-line,
body.page-inbox .conversation-bottom-line {
  min-width: 0;
}

body.page-inbox .conversation-title-line strong,
body.page-inbox .conversation-main > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-inbox .conversation-bottom-line {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
}

body.page-inbox .inbox-detail-grid {
  height: 100%;
}

body.page-inbox .inbox-thread-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

body.page-inbox .inbox-thread-card.empty-thread-card {
  display: grid;
  place-items: center;
  background: #fbfcfe;
}

body.page-inbox .empty-thread-card .thread-body {
  display: none;
}

body.page-inbox .empty-conversation-state {
  width: min(390px, 82%);
  margin: 0 auto;
  padding: 34px 24px;
  text-align: center;
}

body.page-inbox .empty-conversation-state span {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #0c9e73, #087e9f);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(8, 126, 159, .18);
}

body.page-inbox .empty-conversation-state h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

body.page-inbox .empty-conversation-state p {
  margin: 0;
  color: #6d7c91;
  line-height: 1.55;
}

body.page-inbox .thread-body {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

body.page-inbox .inbox-thread-card > .grid {
  flex: 0 0 auto;
  height: auto;
  max-height: 205px;
  overflow: auto;
}

body.page-inbox .lead-side-panel {
  height: 100%;
}

@media (max-width: 760px) {
  .test-template-layout { grid-template-columns: 1fr; }
  .test-template-preview { order: -1; }
}
@media (max-width: 620px) {
  .test-template-title-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .test-template-title-row h2 { font-size: 25px; }
  .test-step, .test-form-actions, .send-status { padding-left: 16px; padding-right: 16px; }
  .template-param-row { grid-template-columns: 30px 42px minmax(0, 1fr); }
  .template-param-row label { display: none; }
  .whatsapp-preview-shell { margin: 0 16px; padding: 12px; }
  .test-template-preview > h3 { padding-left: 16px; padding-right: 16px; }
  .preview-caption, .test-safety-note { margin-left: 16px; margin-right: 16px; }
  .test-form-actions { flex-direction: column; }
}

/* CHIP TALKS DESIGN SYSTEM v2: final cascade */
:root { --bg:#eef3f7; --ink:#0b2433; --muted:#6a7d8f; --line:#dce7ec; --green:#0f9f6e; --green-strong:#087955; --nav:#062b3a; --nav-hover:#0b4355; --shadow-soft:0 8px 24px rgba(6,43,58,.06); --shadow-card:0 12px 30px rgba(6,43,58,.06); }
html, body { background:var(--bg); color:var(--ink); }
.app-topnav { position:sticky; top:0; z-index:50; min-height:76px; height:76px; padding:0 clamp(18px,3vw,40px); display:flex; align-items:center; gap:22px; background:var(--nav); border-bottom:1px solid rgba(255,255,255,.08); box-shadow:0 6px 20px rgba(6,43,58,.12); }
.top-brand { flex:0 0 auto; display:flex; gap:12px; align-items:center; }
.top-brand .brand-mark { width:42px; height:42px; border-radius:12px; background:linear-gradient(135deg,#0f9f6e,#12c9a0); box-shadow:none; }
.top-brand strong { color:#f8fafc; font-size:21px; font-weight:760; }
.top-brand small { display:none; }
.top-menu { flex:1 1 auto; justify-content:center; display:flex; gap:5px; min-width:0; }
.top-menu-group { position:relative; display:flex; align-items:center; }
.top-menu-link { min-height:46px; padding:0 13px; display:flex; align-items:center; gap:9px; border-radius:10px; color:#e7f2f4; font-size:14px; font-weight:650; white-space:nowrap; transition:background .16s,color .16s; }
.top-menu-link:hover, .top-menu-group:hover > .top-menu-link { background:var(--nav-hover); color:#fff; }
.top-menu-group.active > .top-menu-link { background:var(--nav-hover); box-shadow:inset 0 -3px 0 #14b889; }
.nav-icon { width:21px; height:21px; display:grid; place-items:center; color:#b7ded1; background:none; border:0; }
.nav-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; }
.nav-chevron { color:#9be8cf; font-size:10px; margin-left:2px; }
.top-submenu { position:absolute; top:calc(100% - 2px); left:0; min-width:210px; padding:8px; display:none; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 16px 34px rgba(6,43,58,.14); }
.top-menu-group:hover .top-submenu, .top-submenu:hover { display:grid; gap:3px; }
.top-submenu a { padding:10px 12px; border-radius:8px; color:var(--ink); font-size:13px; font-weight:650; }
.top-submenu a:hover, .top-submenu a.active { background:#eefaf5; color:var(--green-strong); }
.topnav-actions { flex:0 0 auto; display:flex; align-items:center; gap:10px; }
.topnav-actions .user-pill { width:40px; height:40px; border-radius:50%; display:grid; place-items:center; padding:0; background:#0f9f6e; color:#fff; border:0; }
.topnav-actions .btn.secondary { min-height:40px; padding:0 13px; background:transparent; border-color:#2a5a6b; color:#f8fafc; }
.main { width:min(100% - 48px,1680px); margin:0 auto; padding:28px 0 52px; min-width:0; }
.card { border-radius:12px; box-shadow:var(--shadow-soft); border-color:var(--line); }
.btn { border-radius:9px; min-height:42px; }
.btn.secondary { background:#fff; border-color:#cbd9e2; color:#173b50; }
input, select, textarea { border-color:#cbd9e2; border-radius:8px; }
input:focus, select:focus, textarea:focus { outline:3px solid rgba(15,159,110,.12); border-color:#0f9f6e; }
.connect-banner, .ai-off-banner { margin-bottom:10px; padding:9px 12px; border-radius:9px; background:#f7fafb; border:1px solid #d7e5eb; color:#547083; font-size:12px; font-weight:600; }
.connect-banner a, .ai-off-banner a { float:right; color:var(--green-strong); font-weight:750; }
.sdr-metric-band, .template-manager-table-card, .template-form-panel, .template-preview-panel, .test-template-form, .test-template-preview, .account-settings-shell { border-radius:14px; box-shadow:var(--shadow-card); }
.template-stat-grid { gap:14px; }
.template-stat-grid article { border-radius:12px; box-shadow:var(--shadow-soft); border-color:var(--line); }
.template-filter-card { padding:16px; box-shadow:var(--shadow-soft); }
.template-row-actions { display:flex; flex-wrap:wrap; gap:7px; }
.template-preview-sticky, .test-template-preview { position:sticky; top:96px; }
body.page-inbox .main { width:100%; padding:0 0 30px; }
body.page-inbox .topbar { padding:24px 30px 18px; margin:0; border-bottom:1px solid var(--line); }
body.page-inbox .connect-banner, body.page-inbox .ai-off-banner { margin:10px 30px; }
body.page-inbox .inbox-layout { grid-template-columns:360px minmax(0,1fr); gap:0; min-height:calc(100vh - 220px); }
body.page-inbox .support-queue, body.page-inbox .inbox-thread-card, body.page-inbox .lead-side-panel { border-radius:0; border-top:0; border-bottom:0; box-shadow:none; }
body.page-inbox .inbox-detail-grid { grid-template-columns:minmax(0,1fr) 310px; gap:0; min-width:0; }
body.page-inbox .conversation-row { border:0; border-radius:0; padding:13px 16px; border-bottom:1px solid #edf2f5; }
body.page-inbox .conversation-row:hover { background:#f6fbf9; }
body.page-inbox .conversation-row.active { background:#edf9f4; box-shadow:inset 3px 0 0 var(--green); }
body.page-inbox .thread-body { background:#fbf8f2; padding:28px; }
body.page-inbox .message { max-width:min(78%,520px); padding:14px 16px; border-radius:12px; box-shadow:0 4px 14px rgba(6,43,58,.05); }
body.page-inbox .message.inbound { background:#fff; border:1px solid #e3e7e9; }
body.page-inbox .message.outbound { background:#dcf8e7; border:1px solid #bde8cd; margin-left:auto; }
.setup-guide-hero { display:flex; align-items:center; justify-content:space-between; gap:28px; padding:30px 32px; margin-bottom:14px; border:1px solid #d7e7e8; border-radius:16px; background:linear-gradient(135deg,#fff 0%,#effaf7 100%); box-shadow:0 14px 30px rgba(3,51,66,.06); }
.setup-guide-hero > div:first-child { max-width:720px; }
.setup-guide-hero h2 { margin:4px 0 10px; color:#06283a; font-size:32px; line-height:1.12; }
.setup-guide-hero p:not(.eyebrow) { margin:0; color:#587082; line-height:1.55; }
.setup-progress { min-width:190px; padding:18px; display:grid; gap:3px; border:1px solid #bee9d9; border-radius:14px; background:#fff; }
.setup-progress strong { color:#087e60; font-size:28px; line-height:1; }
.setup-progress span, .setup-progress small { color:#6e808a; font-size:12px; }
.setup-progress div { height:8px; overflow:hidden; margin-top:8px; border-radius:999px; background:#e8f0f0; }
.setup-progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#0ca678,#087799); }
.setup-safety-note { display:flex; align-items:center; gap:14px; padding:14px 18px; margin-bottom:18px; border:1px solid #efd9a5; border-radius:12px; background:#fffaf0; }
.setup-safety-note > span { width:32px; height:32px; flex:0 0 32px; display:grid; place-items:center; border-radius:50%; background:#fbe7b4; color:#8a6118; font-size:12px; font-weight:800; }
.setup-safety-note strong { display:block; color:#5b451a; }
.setup-safety-note p { margin:3px 0 0; color:#79653b; font-size:13px; }
.setup-safety-note .btn { margin-left:auto; white-space:nowrap; }
.setup-test-note { display:flex; align-items:center; gap:14px; padding:14px 18px; margin:-4px 0 18px; border:1px solid #bddcf7; border-radius:12px; background:#f3f9ff; }
.setup-test-note > span { width:32px; height:32px; flex:0 0 32px; display:grid; place-items:center; border-radius:50%; background:#ddecfb; color:#1769aa; font-size:12px; font-weight:800; }
.setup-test-note strong { display:block; color:#164f7c; }
.setup-test-note p { margin:3px 0 0; color:#52728b; font-size:13px; }
.setup-test-note .btn { margin-left:auto; white-space:nowrap; }
.ops-guidance { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:16px; padding:20px 24px; border-color:#c9e5dc; background:#fbfefd; }
.ops-guidance h2 { margin:3px 0 5px; font-size:20px; color:#0c3145; }
.ops-guidance p { margin:0; max-width:760px; }
.setup-next-card { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:20px 24px; margin-bottom:18px; border:1px solid #bee8d8; border-radius:14px; background:#fff; box-shadow:var(--shadow-soft); }
.setup-next-card h3 { margin:3px 0 6px; color:#06283a; font-size:20px; }
.setup-next-card p:not(.eyebrow) { margin:0; color:#597083; }
.setup-next-card .btn { white-space:nowrap; }
.setup-roadmap { padding:0; overflow:hidden; }
.setup-roadmap-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:22px 24px; border-bottom:1px solid var(--line); }
.setup-roadmap-heading h3 { margin:3px 0 0; color:#06283a; font-size:20px; }
.setup-roadmap-heading > span { padding:7px 10px; border-radius:999px; background:#edf7f4; color:#087a5a; font-size:12px; font-weight:700; }
.setup-step-list { padding:12px; display:grid; gap:10px; }
.setup-step { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:16px; padding:17px; border:1px solid #dce8eb; border-radius:12px; background:#fff; }
.setup-step.is-current { border-color:#11a47c; box-shadow:0 0 0 3px rgba(12,166,120,.1); }
.setup-step-number { width:36px; height:36px; display:grid; place-items:center; border-radius:50%; background:#edf3f5; color:#466172; font-size:12px; font-weight:800; }
.setup-step.is-complete .setup-step-number { background:#dcf7e9; color:#087854; }
.setup-step-heading { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.setup-step-heading h4 { margin:0; color:#102d3f; font-size:15px; }
.setup-step-copy p { margin:4px 0 0; color:#617888; font-size:13px; line-height:1.45; }
.setup-status { padding:4px 8px; border-radius:999px; background:#eef4f6; color:#597181; font-size:11px; font-weight:750; }
.setup-step.is-complete .setup-status { background:#e5f8ed; color:#087854; }
.setup-status.is-locked { background:#fff3dc; color:#8b641d; }
.setup-step .btn { min-height:36px; white-space:nowrap; }
.setup-guidance { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px 24px; margin-top:18px; }
.setup-guidance h3 { margin:0 0 5px; color:#102d3f; font-size:16px; }
.setup-guidance p { margin:0; max-width:830px; color:#617888; font-size:13px; line-height:1.5; }
.text-link { color:#087e60; font-size:13px; font-weight:750; white-space:nowrap; }
@media (max-width:1180px) { .top-menu-link { padding-left:9px; padding-right:9px; font-size:13px; } .main { width:min(100% - 32px,1680px); } body.page-inbox .inbox-layout { grid-template-columns:320px minmax(0,1fr); } body.page-inbox .inbox-detail-grid { grid-template-columns:minmax(0,1fr) 280px; } }
@media (max-width:900px) { .top-brand strong { display:none; } .top-menu { justify-content:flex-start; overflow-x:auto; } body.page-inbox .inbox-layout, body.page-inbox .inbox-detail-grid, .template-builder-shell, .test-template-layout, .dashboard-workspace { grid-template-columns:1fr; } .template-preview-sticky, .test-template-preview { position:static; } }
@media (max-width:640px) { .app-topnav { min-height:64px; height:64px; padding:0 12px; } .top-menu-link .nav-label { display:none; } .top-menu-link { padding:0 9px; } .main { width:min(100% - 20px,1680px); padding-top:18px; } body.page-inbox .topbar, body.page-inbox .support-topbar { padding-left:14px; padding-right:14px; } body.page-inbox .connect-banner, body.page-inbox .ai-off-banner { margin-left:14px; margin-right:14px; } }
@media (max-width:700px) { .setup-guide-hero, .setup-safety-note, .setup-test-note, .setup-next-card, .setup-guidance, .ops-guidance { align-items:flex-start; flex-direction:column; } .setup-safety-note .btn, .setup-test-note .btn { margin-left:0; } .setup-step { grid-template-columns:38px minmax(0,1fr); gap:12px; } .setup-step .btn { grid-column:2; justify-self:start; } .setup-roadmap-heading { align-items:flex-start; flex-direction:column; } .coexistence-roadmap-head { align-items:flex-start; flex-direction:column; } .coexistence-steps { grid-template-columns:1fr; } .coexistence-steps article { min-height:0; } .coexistence-steps article:not(:last-child)::after { top:auto; bottom:-8px; left:26px; right:auto; width:1px; height:16px; } }
