/* =========================================================
   Central de Atendimento — Design system inspirado no Octadesk
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg:           #ffffff;
  --bg-soft:      #f8fafc;
  --bg-muted:     #f1f5f9;
  --border:       #e5e7eb;
  --border-soft:  #f1f5f9;

  --text:         #1e293b;
  --text-2:       #475569;
  --text-3:       #64748b;
  --text-muted:   #94a3b8;

  --brand:        #1d4ed8;
  --brand-600:    #1e40af;
  --brand-700:    #1e3a8a;
  --brand-soft:   #eff6ff;

  --accent-pink:  #db2777;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red:   #b91c1c;
  --indigo-soft:  #e0e7ff;

  --radius:       10px;
  --radius-lg:    14px;
  --radius-pill:  9999px;
  --shadow-sm:    0 1px 2px rgba(15,23,42,.04);
  --shadow:       0 4px 12px rgba(15,23,42,.06);
  --shadow-pop:   0 12px 28px rgba(15,23,42,.18);

  --side-icons:   64px;
  --side-sub:     260px;
  --header-h:     0px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }

/* ============== Layout shell ============== */
.shell {
  display: grid;
  grid-template-columns: var(--side-icons) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ============== Sidebar de ícones (esquerda) ============== */
/* ============================================================
   ICONBAR — enterprise look
   ============================================================ */
html.iconbar-expanded { --side-icons: 248px; }

.iconbar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex; flex-direction: column;
  padding: 0;
  position: relative;
  transition: width .25s cubic-bezier(.4, 0, .2, 1);
  overflow: visible;
}

/* Header com logo + toggle */
.iconbar-header {
  display: flex; align-items: center; justify-content: center;
  padding: 18px 14px; min-height: 64px;
  position: relative;
  border-bottom: 1px solid #f1f5f9;
}
.iconbar-brand {
  display: flex; align-items: center; gap: 10px; overflow: hidden;
}
.iconbar .logo {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13.5px;
  letter-spacing: -.3px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15,23,42,.12), inset 0 1px 0 rgba(255,255,255,.08);
}
.brand-name {
  display: none;
  font-size: 15px; font-weight: 600; color: #0f172a;
  letter-spacing: -.2px;
}
html.iconbar-expanded .brand-name { display: inline; }

.iconbar-toggle {
  background: #fff;
  border: 1px solid #e2e8f0;
  width: 22px; height: 22px; border-radius: 50%;
  cursor: pointer; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  position: absolute;
  right: -11px; top: 32px;
  z-index: 10;
  transition: all .2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.iconbar-toggle svg { width: 12px; height: 12px; stroke-width: 2.5; }
.iconbar-toggle:hover {
  color: var(--brand); border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(29,78,216,.15);
}
html.iconbar-expanded .iconbar-toggle svg { transform: rotate(180deg); }

/* Nav body */
.iconbar-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 12px 8px;
  scrollbar-width: thin;
}
.iconbar-nav::-webkit-scrollbar { width: 4px; }
.iconbar-nav::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

.nav-section { margin-bottom: 18px; }
.nav-section:last-child { margin-bottom: 0; }

.nav-section-label {
  display: none;
  padding: 0 12px 8px;
  font-size: 10.5px; font-weight: 600;
  color: #94a3b8; text-transform: uppercase;
  letter-spacing: .8px;
}
html.iconbar-expanded .nav-section-label { display: block; }

/* Divider entre seções (só na retraída) */
.nav-section + .nav-section {
  position: relative;
  padding-top: 12px;
}
.nav-section + .nav-section::before {
  content: "";
  position: absolute; left: 14px; right: 14px; top: 0;
  height: 1px; background: #f1f5f9;
}
html.iconbar-expanded .nav-section + .nav-section::before { display: none; }

/* Items */
.iconbar a.ico, .iconbar button.ico {
  display: flex; align-items: center;
  gap: 12px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  margin-bottom: 2px;
  border: 0;
  background: transparent;
  color: #475569;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: all .15s ease;
  font-family: inherit;
  text-decoration: none;
  text-align: left;
}
.ico-icon {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  flex-shrink: 0;
  position: relative;
}
.iconbar a.ico svg, .iconbar button.ico svg {
  width: 18px; height: 18px;
  stroke-width: 1.7;
}
.ico-label {
  display: none;
  font-size: 13.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -.1px;
}
html.iconbar-expanded .ico-label { display: inline; }

/* Estado retraído: centraliza ícones */
html:not(.iconbar-expanded) .iconbar a.ico,
html:not(.iconbar-expanded) .iconbar button.ico {
  justify-content: center;
  padding: 0;
  width: 38px;
  margin: 2px auto;
}

/* Hover */
.iconbar a.ico:hover, .iconbar button.ico:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Active — left accent bar + tinted bg + bold text */
.iconbar a.ico.active {
  background: #eff6ff;
  color: var(--brand);
}
.iconbar a.ico.active .ico-label { font-weight: 600; }
.iconbar a.ico.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px; bottom: 8px;
  width: 3px;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
}
html:not(.iconbar-expanded) .iconbar a.ico.active::before { left: -8px; }

/* Tooltip flutuante (só quando retraída) */
.iconbar a.ico[data-tip]:hover::after,
.iconbar button.ico[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 16px);
  top: 50%; transform: translateY(-50%);
  background: #0f172a; color: #fff;
  padding: 8px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  z-index: 1000; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
html.iconbar-expanded .iconbar a.ico[data-tip]:hover::after,
html.iconbar-expanded .iconbar button.ico[data-tip]:hover::after {
  display: none;
}

/* Footer */
.iconbar-footer {
  border-top: 1px solid #f1f5f9;
  padding: 10px 8px 12px;
  display: flex; flex-direction: column; gap: 2px;
}

.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-top: 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.user-card:hover { background: #f1f5f9; }

.iconbar .me {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--brand) 0%, #6366f1 100%);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
  position: relative;
  flex-shrink: 0;
  letter-spacing: -.2px;
}
.iconbar .me::after {
  content: ""; position: absolute; bottom: -2px; right: -2px;
  width: 10px; height: 10px; background: #22c55e;
  border: 2px solid #fff; border-radius: 50%;
}

.user-info {
  display: none;
  flex-direction: column; min-width: 0; flex: 1;
}
html.iconbar-expanded .user-info { display: flex; }
.user-name {
  font-size: 13px; font-weight: 600; color: #0f172a;
  letter-spacing: -.1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-status-mini {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: #64748b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 2px;
}
.user-status-mini .status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.user-status-mini .status-dot.online { background: #22c55e; }
.user-status-mini .status-dot.paused { background: #f59e0b; }
.user-status-mini .status-dot.offline { background: #94a3b8; }
.user-status-mini span:nth-child(2) {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-chevron {
  display: none;
  width: 14px; height: 14px;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform .2s;
}
html.iconbar-expanded .user-chevron { display: block; }
.user-card:hover .user-chevron { color: var(--brand); }

/* Notification badge refinado */
.notif-badge {
  position: absolute;
  top: -3px; right: -5px;
  background: #ef4444; color: #fff;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(239,68,68,.3);
  line-height: 1;
}

/* ============== PAUSE MODAL ============== */
.pause-reasons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.pause-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: all .12s ease;
  text-align: left;
  font-family: inherit;
}
.pause-card:hover {
  border-color: var(--brand);
  background: #f8fafc;
}
.pause-card.selected {
  border-color: var(--brand);
  background: #eff6ff;
}
.pause-card.selected .pause-label { color: var(--brand); font-weight: 600; }
.pause-ico { font-size: 22px; flex-shrink: 0; }
.pause-label {
  font-size: 13px; color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pause-card-other { grid-column: 1 / -1; justify-content: center; }

/* ============== ICONBAR PROFILE POPOVER ============== */
.user-card { cursor: pointer; user-select: none; }
.user-card:focus { outline: 0; }

.ib-popover {
  position: fixed;
  bottom: 14px;
  left: calc(var(--side-icons) + 12px);
  width: 280px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .15), 0 2px 6px rgba(0, 0, 0, .04);
  z-index: 1000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
  overflow: hidden;
}
.ib-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ib-popover[hidden] { display: none; }

.ib-popover-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.ib-popover-header .me {
  width: 40px; height: 40px;
  border-radius: 9px; flex-shrink: 0;
}
.ib-pp-meta { min-width: 0; flex: 1; }
.ib-pp-meta strong {
  display: block; font-size: 13.5px; font-weight: 600; color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ib-pp-meta small {
  display: block; font-size: 11.5px; color: #64748b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ib-pp-section {
  padding: 6px;
  border-bottom: 1px solid #f1f5f9;
}
.ib-pp-section:last-child { border-bottom: 0; }
.ib-pp-section-label {
  display: block; padding: 8px 12px 4px;
  font-size: 10.5px; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .7px;
}

.ib-pp-status, .ib-pp-action {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0; background: transparent;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px; color: #1e293b;
  text-align: left;
  transition: background .12s;
}
.ib-pp-status:hover, .ib-pp-action:hover { background: #f1f5f9; }
.ib-pp-status.active { background: #eff6ff; color: var(--brand); font-weight: 600; }

.ib-pp-status .status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  flex-shrink: 0;
}
.ib-pp-status .status-dot.online { background: #22c55e; }
.ib-pp-status .status-dot.paused { background: #f59e0b; }
.ib-pp-status .status-dot.offline { background: #94a3b8; }

.ib-pp-status > span:nth-child(2) { flex: 1; }
.ib-pp-check {
  color: var(--brand); font-weight: 700; font-size: 14px;
}

.ib-pp-action svg {
  width: 16px; height: 16px; flex-shrink: 0;
  color: #64748b;
}
.ib-pp-action:hover svg { color: var(--brand); }
.ib-pp-state {
  margin-left: auto; font-size: 11px; color: #94a3b8; font-weight: 500;
}
.ib-pp-danger { color: #dc2626; }
.ib-pp-danger svg { color: #dc2626; }
.ib-pp-danger:hover { background: #fef2f2; }
.ib-pp-danger:hover svg { color: #b91c1c; }
#pause-custom-input:focus {
  outline: 0; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}
#cp-input:focus {
  outline: 0; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}

/* ============== Sub-sidebar (lista de seções) ============== */
.subnav {
  width: var(--side-sub);
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 22px 0 18px;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.subnav h1 {
  font-size: 22px; font-weight: 700;
  padding: 0 22px 14px;
  margin: 0;
}
.subnav-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-right: 14px;
}
.subnav-header h1 { flex: 1; }
.subnav-actions { display: flex; gap: 2px; }
.iconbtn {
  background: transparent; border: 0; cursor: pointer;
  width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3);
}
.iconbtn:hover { background: var(--bg-soft); color: var(--text); }
.iconbtn svg { width: 16px; height: 16px; }
.subnav .group-label {
  font-size: 13px; font-weight: 700; color: var(--text);
  padding: 14px 22px 6px;
}
.subnav a, .subnav .nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 22px;
  color: var(--text-2);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.subnav a:hover, .subnav .nav-item:hover { background: var(--bg-soft); }
.subnav a.active, .subnav .nav-item.active {
  color: var(--text);
  font-weight: 600;
  background: var(--bg-soft);
  border-left-color: var(--brand);
}
.subnav .count {
  background: transparent; color: var(--text-3);
  font-size: 13px; font-weight: 600;
}
.subnav a.active .count { color: var(--brand); }
.subnav .pill-soon {
  background: var(--indigo-soft); color: #4338ca;
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
}
.subnav .user {
  margin-top: auto; padding: 14px 22px;
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--border-soft);
}
.subnav .user .av {
  width: 32px; height: 32px; background: #fde68a; color: #92400e;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.subnav .user .meta { display: flex; flex-direction: column; line-height: 1.25; }
.subnav .user .meta strong { font-size: 13px; }
.subnav .user .meta small { font-size: 11px; color: var(--text-3); }

/* ============== Painel principal ============== */
.main { display: flex; flex-direction: column; overflow: hidden; }
.page {
  padding: 26px 32px;
  overflow-y: auto;
  height: 100%;
}
.breadcrumb {
  color: var(--text-muted); font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.breadcrumb span:not(.sep):last-child { color: var(--text-2); }
.breadcrumb .sep { color: var(--text-muted); }
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-header .title h1 {
  font-size: 28px; font-weight: 700; margin: 0;
  color: var(--text);
}
.page-header .title p {
  margin: 4px 0 0;
  color: var(--text-3); font-size: 14px;
}
.page-header .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============== Botões ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  font-weight: 600; font-size: 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary {
  background: #fff; color: var(--brand);
  border-color: var(--brand);
}
.btn-secondary:hover { background: var(--brand-soft); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); }
.btn-danger { background: #fff; color: var(--accent-red); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn[hidden], a[hidden], div[hidden] { display: none !important; }

/* ============== Cards ============== */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  margin: 0 0 16px;
  font-size: 16px; font-weight: 700; color: var(--text);
}
.card h3 { font-size: 14px; font-weight: 700; margin: 16px 0 10px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

/* ============== KPI cards ============== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.kpi .label {
  font-size: 12px; color: var(--text-3); font-weight: 500;
  text-transform: none;
}
.kpi .value {
  font-size: 28px; font-weight: 700; color: var(--text);
}
.kpi.alert.breach { background: #fef2f2; border-color: #fecaca; }
.kpi.alert.breach .value { color: var(--accent-red); }

/* ============== Tabelas ============== */
.grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.grid-table th {
  text-align: left;
  font-size: 12px; font-weight: 600;
  color: var(--text-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.grid-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.grid-table tr:hover td { background: var(--bg-soft); }
.grid-table tr.sla-breach { background: #fef2f2; }
.grid-table small { color: var(--text-3); font-size: 12px; }

/* ============== Badges ============== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600;
  background: var(--bg-muted); color: var(--text-2);
}
.badge.open     { background: #d1fae5; color: #065f46; }
.badge.assigned { background: #dbeafe; color: var(--brand); }
.badge.pending  { background: #fef3c7; color: #92400e; }
.badge.closed   { background: var(--bg-muted); color: var(--text-3); }
.badge.new { background: var(--accent-pink); color: #fff; }

.status-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--text-muted);
  margin-right: 6px; vertical-align: middle;
}
.status-dot.online  { background: var(--accent-green); }
.status-dot.paused  { background: var(--accent-amber); }
.status-dot.offline { background: var(--text-muted); }

/* ============== Forms — fields no estilo Linear/Vercel ============== */
form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--text-2);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 16px;
}
form label.inline {
  flex-direction: row; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-2); font-weight: 500;
  letter-spacing: 0;
}

/* Field — input grande, com presença visual real.
   Usamos :not([type=...]) negativos pra pegar TODOS os inputs textuais,
   incluindo os sem atributo type (default = text). */
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]):not(.conv-check),
select, textarea {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 15px; font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  letter-spacing: -0.005em;
  line-height: 1.2;
  box-sizing: border-box;
}
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]):not(.conv-check):hover,
select:hover:not(:focus), textarea:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft), 0 1px 2px rgba(15,23,42,.04);
}
input::placeholder, textarea::placeholder {
  color: #94a3b8; font-weight: 500; opacity: 1;
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--bg-soft); color: var(--text-muted); cursor: not-allowed;
  border-color: var(--border);
}
textarea {
  font-family: inherit; font-size: 15px;
  height: auto !important; min-height: 110px; padding: 14px 18px;
  resize: vertical; line-height: 1.5;
}
textarea.code, textarea[data-mono] { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; }

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

fieldset {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; margin: 18px 0;
  background: var(--bg-soft);
}
fieldset legend {
  font-size: 11px; color: var(--text-3); padding: 0 8px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.hint {
  font-size: 12px; color: var(--text-3); margin: 4px 0;
}
.hint code {
  background: var(--bg-muted); padding: 1px 6px; border-radius: 4px;
  font-size: 12px; color: var(--text);
}

/* ============== Filtros ============== */
.filters-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-bottom: 16px; align-items: flex-end;
}
.filters-row label { margin-bottom: 0; min-width: 180px; }

/* ============== Login v3 (minimal SaaS com mockup) ============== */
.login-overlay {
  position: fixed; inset: 0;
  background: #fafbfc;
  display: flex; flex-direction: column;
  z-index: 999;
  overflow: auto;
}

.login-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 36px; border-bottom: 1px solid #f1f5f9; background: #fff;
  flex-shrink: 0;
}
.login-top-brand { display: flex; align-items: center; gap: 10px; }
.login-top-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #1d4ed8, #6366f1);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12.5px; letter-spacing: -.3px;
}
.login-top-name {
  font-weight: 700; font-size: 15px; letter-spacing: -.2px; color: var(--text);
}
.login-top-help {
  font-size: 13px; color: var(--text-3); text-decoration: none;
}
.login-top-help:hover { color: var(--brand); }

.login-main {
  flex: 1; display: grid; grid-template-columns: 1fr 1.1fr;
  align-items: stretch; min-height: 0;
}

/* Lado esquerdo — formulário */
.login-form-side {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 64px; background: #fff;
}
.login-form-box { width: 100%; max-width: 380px; }

.login-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: #eff6ff; color: var(--brand);
  border-radius: 999px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .3px; margin-bottom: 18px;
}
.login-h1 {
  font-size: 30px; font-weight: 700; line-height: 1.15;
  letter-spacing: -.8px; margin: 0 0 10px; color: var(--text);
}
.login-sub {
  color: var(--text-3); font-size: 14px; line-height: 1.5;
  margin: 0 0 30px;
}

/* Form — usa #login-form.login-card, reseta padding/box */
.login-card {
  background: transparent !important;
  padding: 0 !important; border-radius: 0 !important;
  width: 100% !important;
  display: flex !important; flex-direction: column !important; gap: 0 !important;
  box-shadow: none !important;
}
.login-card > h1, .login-card > p.lead { display: none; } /* legado */

.login-field { margin-bottom: 14px; }
.login-field label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-2, #334155); margin-bottom: 8px;
}
.login-field input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1.5px solid var(--border, #e2e8f0); border-radius: 9px;
  font-size: 14px; transition: all .15s; background: #fff;
}
.login-field input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .08);
}

.login-pass-wrap { position: relative; }
.login-pass-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: transparent !important; border: 0 !important; cursor: pointer;
  color: var(--text-3, #94a3b8) !important; padding: 4px 8px !important;
  font-size: 11px !important; font-weight: 700 !important; letter-spacing: .4px;
  margin: 0 !important; border-radius: 4px !important;
}
.login-pass-toggle:hover { color: var(--brand) !important; }

.login-row-between {
  display: flex; justify-content: space-between; align-items: center;
  margin: 6px 0 22px;
}
.login-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2, #475569); cursor: pointer;
}
.login-remember input { width: 15px; height: 15px; accent-color: var(--brand); }
.login-forgot {
  font-size: 13px; color: var(--brand); font-weight: 600; text-decoration: none;
}

.login-btn-primary {
  width: 100%; height: 46px; border: 0 !important; cursor: pointer;
  background: #0f172a !important; color: #fff !important;
  border-radius: 9px !important;
  font-size: 14px !important; font-weight: 600 !important; letter-spacing: .2px;
  transition: all .15s;
  margin: 0 !important; padding: 0 !important;
}
.login-btn-primary:hover { background: #1e293b !important; transform: translateY(-1px); }

.login-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-3); font-size: 11.5px; letter-spacing: .5px;
  margin: 18px 0 12px; text-transform: uppercase;
}
.login-divider[hidden] { display: none; }
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border, #e2e8f0);
}

.login-btn-sso {
  display: block; width: 100%; height: 44px; line-height: 44px;
  background: #fff; color: var(--text); border: 1.5px solid var(--border);
  border-radius: 9px; font-size: 13.5px; font-weight: 600; text-align: center;
  text-decoration: none; transition: all .15s;
}
.login-btn-sso:hover { border-color: var(--brand); color: var(--brand); }

.login-err {
  color: var(--accent-red) !important; font-size: 12.5px !important;
  min-height: 16px !important; margin: 12px 0 0 !important; text-align: left !important;
}

.login-signup {
  text-align: center; margin: 24px 0 0; font-size: 13.5px; color: var(--text-3);
}
.login-signup a { color: var(--brand); font-weight: 600; text-decoration: none; }

/* Lado direito — depoimento + mockup */
.login-preview-side {
  background:
    radial-gradient(circle at 30% 20%, #eff6ff 0%, transparent 50%),
    linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  padding: 48px 56px 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.login-preview-quote { text-align: center; max-width: 460px; margin-bottom: 32px; }
.login-preview-quote h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -.5px;
  line-height: 1.3; margin: 0 0 10px; color: var(--text);
}
.login-preview-quote p { color: var(--text-3); font-size: 14px; margin: 0; }

.login-mockup {
  width: 100%; max-width: 440px; background: #fff;
  border-radius: 14px 14px 0 0;
  border: 1px solid var(--border); border-bottom: 0;
  box-shadow: 0 30px 60px rgba(15, 23, 42, .12);
  overflow: hidden;
}
.login-mockup-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid #f1f5f9; background: #f8fafc;
}
.login-mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.login-mockup-dot.red { background: #f87171; }
.login-mockup-dot.yellow { background: #fbbf24; }
.login-mockup-dot.green { background: #34d399; }
.login-mockup-title { margin-left: 8px; font-size: 11.5px; color: var(--text-3); }

.login-mockup-body { padding: 16px 18px; }
.login-mockup-msg {
  display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start;
}
.login-mockup-msg.me { flex-direction: row-reverse; }
.login-mockup-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #db2777, #f97316);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700;
}
.login-mockup-avatar.me {
  background: linear-gradient(135deg, var(--brand), #6366f1);
}
.login-mockup-bubble {
  background: #f1f5f9; padding: 10px 14px; border-radius: 12px;
  font-size: 13px; max-width: 75%; color: var(--text-2, #334155);
}
.login-mockup-bubble.me { background: var(--brand); color: #fff; }
.login-mockup-typing {
  display: flex; gap: 4px; padding: 6px 0; margin-left: 40px;
}
.login-mockup-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1;
  animation: login-typing 1.4s infinite;
}
.login-mockup-typing span:nth-child(2) { animation-delay: .2s; }
.login-mockup-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes login-typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); background: var(--brand); }
}

@media (max-width: 900px) {
  .login-main { grid-template-columns: 1fr; }
  .login-preview-side { display: none; }
  .login-form-side { padding: 36px 24px; }
}

/* =================== /equipe — v9 Enterprise SaaS =================== */
:root {
  --eq9-bg: #f7f7f5;
  --eq9-panel: #ffffff;
  --eq9-border: #e4e4e7;
  --eq9-border-soft: #f4f4f5;
  --eq9-text: #18181b;
  --eq9-text-2: #3f3f46;
  --eq9-text-3: #71717a;
  --eq9-text-4: #a1a1aa;
  --eq9-brand: #2563eb;
  --eq9-brand-soft: #dbeafe;
  --eq9-green: #16a34a;
  --eq9-green-soft: #dcfce7;
  --eq9-amber: #d97706;
  --eq9-amber-soft: #fef3c7;
  --eq9-violet: #7c3aed;
  --eq9-violet-soft: #ede9fe;
  --eq9-red: #dc2626;
  --eq9-red-soft: #fee2e2;
}

/* === HEADER === */
.eq9-header { background: var(--eq9-panel); border-bottom: 1px solid var(--eq9-border); padding: 18px 32px 0; }
.eq9-header-top { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 16px; }
.eq9-h-left h1 { font-size: 22px; font-weight: 600; letter-spacing: -.4px; display: flex; align-items: center; gap: 10px; color: var(--eq9-text); }
.eq9-h-sub { color: var(--eq9-text-3); font-size: 13px; margin-top: 4px; }
.eq9-h-sub strong { color: var(--eq9-text); font-weight: 600; }
.eq9-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--eq9-green); position: relative; }
.eq9-live-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: var(--eq9-green); opacity: .25; animation: eq9-ping 2s ease-in-out infinite; }
@keyframes eq9-ping { 50% { transform: scale(1.6); opacity: 0; } }

.eq9-h-actions { display: flex; gap: 8px; align-items: center; }
.eq9-btn { padding: 7px 14px; border-radius: 6px; border: 1px solid var(--eq9-border); background: var(--eq9-panel); font-size: 13px; font-weight: 500; cursor: pointer; color: var(--eq9-text-2); display: inline-flex; align-items: center; gap: 6px; transition: all .12s; }
.eq9-btn:hover:not(:disabled) { background: var(--eq9-bg); border-color: #d4d4d8; }
.eq9-btn:disabled { opacity: .5; cursor: not-allowed; }
.eq9-btn-primary { background: var(--eq9-text); color: var(--eq9-panel); border-color: var(--eq9-text); }
.eq9-btn-primary:hover:not(:disabled) { background: #27272a; }
.eq9-icon-btn { width: 32px; padding: 0; justify-content: center; color: var(--eq9-text-3); }

/* Tabs */
.eq9-tabs { display: flex; gap: 4px; }
.eq9-tab { background: transparent; border: 0; padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--eq9-text-3); cursor: pointer; position: relative; }
.eq9-tab:hover { color: var(--eq9-text); }
.eq9-tab.active { color: var(--eq9-text); font-weight: 600; }
.eq9-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 8px; right: 8px; height: 2px; background: var(--eq9-text); border-radius: 2px; }
.eq9-tab-num { margin-left: 5px; font-size: 11px; color: var(--eq9-text-4); font-weight: 600; background: var(--eq9-bg); padding: 1px 6px; border-radius: 999px; }

/* === KPI ROW === */
.eq9-kpis { padding: 20px 32px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--eq9-border); border-bottom: 1px solid var(--eq9-border); }
.eq9-kpi { background: var(--eq9-panel); padding: 16px 18px; }
.eq9-kpi-lbl { font-size: 11.5px; color: var(--eq9-text-3); font-weight: 500; letter-spacing: .2px; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.eq9-dot { width: 7px; height: 7px; border-radius: 50%; }
.eq9-dot-green { background: var(--eq9-green); }
.eq9-dot-amber { background: var(--eq9-amber); }
.eq9-dot-violet { background: var(--eq9-violet); }
.eq9-dot-gray { background: var(--eq9-text-4); }
.eq9-kpi-val { font-size: 24px; font-weight: 600; letter-spacing: -.4px; font-variant-numeric: tabular-nums; color: var(--eq9-text); }
.eq9-kpi-meta { font-size: 11.5px; color: var(--eq9-text-3); margin-top: 3px; }

/* === BODY 3 cols === */
.eq9-body { display: grid; grid-template-columns: 240px 1fr 320px; min-height: calc(100vh - 360px); }
.eq9-side { background: var(--eq9-panel); border-right: 1px solid var(--eq9-border); padding: 18px 14px; overflow-y: auto; }
.eq9-side-grp { margin-bottom: 22px; }
.eq9-side-head { font-size: 11px; font-weight: 600; color: var(--eq9-text-3); text-transform: uppercase; letter-spacing: .8px; padding: 0 4px 10px; display: flex; justify-content: space-between; align-items: center; }
.eq9-side-head a { color: var(--eq9-brand); text-decoration: none; font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer; }
.eq9-side-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; font-size: 13px; color: var(--eq9-text-2); cursor: pointer; margin-bottom: 1px; }
.eq9-side-item:hover { background: var(--eq9-bg); }
.eq9-side-item.active { background: var(--eq9-text); color: var(--eq9-panel); }
.eq9-side-item.active .eq9-side-cnt { color: rgba(255,255,255,.7); }
.eq9-side-item input { accent-color: var(--eq9-brand); width: 13px; height: 13px; cursor: pointer; }
.eq9-side-ico { width: 10px; height: 10px; border-radius: 3px; }
.eq9-side-lbl { flex: 1; }
.eq9-side-cnt { color: var(--eq9-text-4); font-size: 12px; font-variant-numeric: tabular-nums; }

/* MAIN */
.eq9-main { background: var(--eq9-bg); overflow-y: auto; }
.eq9-toolbar { background: var(--eq9-panel); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--eq9-border); }
.eq9-tb-left { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--eq9-text-3); }
.eq9-tb-left strong { color: var(--eq9-text); font-weight: 600; }
.eq9-tb-right { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--eq9-text-3); }
.eq9-tb-right strong { color: var(--eq9-text); }

/* Grupos */
.eq9-grp { background: var(--eq9-panel); margin: 16px 24px; border: 1px solid var(--eq9-border); border-radius: 8px; }
.eq9-grp-head { padding: 14px 18px; border-bottom: 1px solid var(--eq9-border-soft); display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.eq9-grp-name { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--eq9-text); }
.eq9-grp-swatch { width: 10px; height: 10px; border-radius: 3px; }
.eq9-grp-sub { color: var(--eq9-text-3); font-size: 12px; font-weight: 500; }
.eq9-grp-stats { display: flex; gap: 16px; font-size: 12.5px; color: var(--eq9-text-3); }
.eq9-grp-stats span { display: inline-flex; align-items: center; gap: 5px; }
.eq9-grp-stats strong { color: var(--eq9-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.eq9-gd { width: 6px; height: 6px; border-radius: 50%; }

/* Tabela de agentes */
.eq9-ag-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eq9-ag-table thead th { text-align: left; padding: 10px 18px; font-size: 11px; font-weight: 600; color: var(--eq9-text-3); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--eq9-border-soft); background: var(--eq9-bg); }
.eq9-ag-table thead th.right { text-align: right; }
.eq9-ag-table tbody td { padding: 11px 18px; border-bottom: 1px solid var(--eq9-border-soft); vertical-align: middle; color: var(--eq9-text); }
.eq9-ag-table tbody td.right { text-align: right; }
.eq9-ag-table tbody tr:hover { background: var(--eq9-bg); }
.eq9-ag-table tbody tr:last-child td { border: 0; }
.eq9-ag-table tbody td .right { text-align: right; }

.eq9-agent { display: flex; align-items: center; gap: 10px; }
.eq9-av { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 600; }
.eq9-ag-name { font-weight: 500; color: var(--eq9-text); }
.eq9-ag-handle { color: var(--eq9-text-4); font-size: 12px; }

.eq9-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.eq9-sdot { width: 6px; height: 6px; border-radius: 50%; }
.eq9-status-online { background: var(--eq9-green-soft); color: var(--eq9-green); }
.eq9-status-online .eq9-sdot { background: var(--eq9-green); }
.eq9-status-busy { background: var(--eq9-amber-soft); color: var(--eq9-amber); }
.eq9-status-busy .eq9-sdot { background: var(--eq9-amber); animation: eq9-pulse 1.5s ease-in-out infinite; }
.eq9-status-paused { background: var(--eq9-violet-soft); color: var(--eq9-violet); }
.eq9-status-paused .eq9-sdot { background: var(--eq9-violet); }
.eq9-status-offline { background: var(--eq9-bg); color: var(--eq9-text-3); }
.eq9-status-offline .eq9-sdot { background: var(--eq9-text-4); }
.eq9-status-alert { background: var(--eq9-red-soft); color: var(--eq9-red); }
.eq9-status-alert .eq9-sdot { background: var(--eq9-red); animation: eq9-pulse 1s ease-in-out infinite; }
@keyframes eq9-pulse { 50% { transform: scale(.5); opacity: .5; } }

.eq9-ctx { color: var(--eq9-text-3); font-size: 12.5px; }
.eq9-ctx strong { color: var(--eq9-text); font-weight: 500; }
.eq9-mono { font-variant-numeric: tabular-nums; }
.eq9-pct { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.eq9-pct-bar { width: 64px; height: 4px; background: var(--eq9-bg); border-radius: 2px; overflow: hidden; }
.eq9-pct-bar > div { height: 100%; background: var(--eq9-green); }
.eq9-pct-bar.warn > div { background: var(--eq9-amber); }
.eq9-pct-bar.crit > div { background: var(--eq9-red); }
.eq9-pct-val { font-size: 12px; color: var(--eq9-text-2); font-variant-numeric: tabular-nums; min-width: 32px; }

.eq9-row-more { color: var(--eq9-text-4); text-decoration: none; padding: 2px 6px; border-radius: 4px; }
.eq9-row-more:hover { color: var(--eq9-brand); background: var(--eq9-brand-soft); }

.eq9-empty { background: var(--eq9-panel); margin: 16px 24px; padding: 48px 32px; text-align: center; border: 1px dashed var(--eq9-border); border-radius: 8px; }
.eq9-empty h2 { font-size: 16px; color: var(--eq9-text); margin-bottom: 6px; font-weight: 600; }
.eq9-empty p { color: var(--eq9-text-3); font-size: 13px; }

/* RIGHT (timeline) */
.eq9-right { background: var(--eq9-panel); border-left: 1px solid var(--eq9-border); display: flex; flex-direction: column; overflow: hidden; }
.eq9-right-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--eq9-border); }
.eq9-right-head h3 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--eq9-text); }
.eq9-right-head .eq9-sub { color: var(--eq9-text-3); font-size: 12px; margin-top: 4px; }
.eq9-right-tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--eq9-border); }
.eq9-right-tab { background: transparent; border: 0; padding: 10px 8px; font-size: 12.5px; color: var(--eq9-text-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.eq9-right-tab.active { color: var(--eq9-text); border-bottom-color: var(--eq9-text); font-weight: 600; }
.eq9-rt-n { margin-left: 4px; font-size: 11px; background: var(--eq9-red-soft); color: var(--eq9-red); padding: 1px 5px; border-radius: 999px; }
.eq9-feed { flex: 1; overflow-y: auto; padding: 4px 20px 16px; }
.eq9-ev { padding: 12px 0; border-bottom: 1px solid var(--eq9-border-soft); display: flex; gap: 11px; }
.eq9-ev:last-child { border: 0; }
.eq9-ev-ico { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.eq9-ev-green { background: var(--eq9-green-soft); color: var(--eq9-green); }
.eq9-ev-amber { background: var(--eq9-amber-soft); color: var(--eq9-amber); }
.eq9-ev-violet { background: var(--eq9-violet-soft); color: var(--eq9-violet); }
.eq9-ev-red { background: var(--eq9-red-soft); color: var(--eq9-red); }
.eq9-ev-blue { background: var(--eq9-brand-soft); color: var(--eq9-brand); }
.eq9-ev-gray { background: var(--eq9-bg); color: var(--eq9-text-3); }
.eq9-ev-info { flex: 1; min-width: 0; }
.eq9-ev-ttl { font-size: 13px; color: var(--eq9-text); font-weight: 500; }
.eq9-ev-ttl strong { font-weight: 600; }
.eq9-ev-time { font-size: 11px; color: var(--eq9-text-4); margin-top: 4px; }

/* CHART STRIP */
.eq9-chart { background: var(--eq9-panel); border-top: 1px solid var(--eq9-border); padding: 18px 32px; display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: center; }
.eq9-chart-info h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--eq9-text-3); }
.eq9-legend { margin-top: 6px; font-size: 12px; color: var(--eq9-text-3); display: flex; gap: 18px; align-items: center; }
.eq9-legend span { display: inline-flex; align-items: center; gap: 6px; }
.eq9-ld { width: 9px; height: 9px; border-radius: 2px; }
.eq9-bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; margin-top: 10px; }
.eq9-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.eq9-bar { width: 100%; background: var(--eq9-text); border-radius: 2px 2px 0 0; min-height: 3px; opacity: .85; }
.eq9-bar.warn { background: var(--eq9-amber); opacity: 1; }
.eq9-bar-col small { font-size: 10px; color: var(--eq9-text-4); font-variant-numeric: tabular-nums; }
.eq9-recommend { padding: 14px 18px; background: var(--eq9-bg); border: 1px solid var(--eq9-border); border-radius: 8px; font-size: 12.5px; color: var(--eq9-text-2); line-height: 1.5; }
.eq9-recommend strong { color: var(--eq9-text); }
.eq9-recommend a { color: var(--eq9-brand); text-decoration: none; font-weight: 500; }

/* === Tabs: Atendentes/Equipes/Permissões === */
.eq9-section { padding-bottom: 60px; }
.eq9-mgmt-card { background: var(--eq9-panel); margin: 24px 32px; padding: 24px 28px; border: 1px solid var(--eq9-border); border-radius: 8px; }
.eq9-mgmt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 12px; }
.eq9-mgmt-head h2 { font-size: 17px; font-weight: 600; margin: 0; color: var(--eq9-text); }
.eq9-mgmt-hint { margin: 0 0 18px; padding: 12px 16px; background: var(--eq9-brand-soft); border-left: 3px solid var(--eq9-brand); border-radius: 6px; font-size: 12.5px; color: var(--eq9-text-2); line-height: 1.5; }

.eq9-mgmt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eq9-mgmt-table thead th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 600; color: var(--eq9-text-3); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--eq9-border); }
.eq9-mgmt-table thead th.right { text-align: right; }
.eq9-mgmt-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--eq9-border-soft); color: var(--eq9-text); }
.eq9-mgmt-table tbody td.right { text-align: right; }
.eq9-mgmt-table tbody tr:hover { background: var(--eq9-bg); }

.eq9-groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.eq9-group-card { background: var(--eq9-bg); border: 1px solid var(--eq9-border); border-radius: 8px; padding: 18px 20px; }
.eq9-group-card h3 { font-size: 15px; margin: 0 0 6px; color: var(--eq9-text); font-weight: 600; }
.eq9-group-card p { margin: 0 0 14px; font-size: 12.5px; color: var(--eq9-text-3); min-height: 18px; }
.eq9-group-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--eq9-text-3); padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--eq9-border); }

/* Members modal */
.eq9-members-scroll { max-height: 260px; overflow: auto; border: 1px solid var(--eq9-border); border-radius: 8px; padding: 4px; }
.eq9-member-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.eq9-member-row:hover { background: var(--eq9-border-soft); }
.eq9-member-row input { width: 14px; height: 14px; accent-color: var(--eq9-brand); }

/* =================== Supervisão de agentes (legacy) =================== */
.sup-wrap { max-width: 1480px; margin: 0 auto; padding: 28px 28px 60px; }

.sup-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 18px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.sup-crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-3); margin-bottom: 6px;
}
.sup-crumbs a { color: var(--brand); text-decoration: none; }
.sup-head h1 {
  font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin: 0;
  position: relative; padding-bottom: 6px;
}
.sup-head h1::after {
  content: ""; position: absolute; bottom: 0; left: 0; width: 60px; height: 2.5px;
  background: var(--brand); border-radius: 2px;
}

.sup-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sup-act-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: #fff; border: 1.5px solid var(--border); color: var(--text-2);
  cursor: pointer; transition: all .12s;
}
.sup-act-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.sup-act-btn:disabled { opacity: .5; cursor: not-allowed; }
.sup-act-btn.danger:hover:not(:disabled) { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.sup-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 6px;
  background: var(--brand); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.sup-act-btn:disabled .sup-count { background: #cbd5e1; }

.sup-summary-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 28px; margin-bottom: 18px;
  display: flex; gap: 36px; align-items: center;
  border-left: 4px solid var(--brand);
}
.sup-summary-left { display: flex; flex-direction: column; gap: 2px; }
.sup-summary-left small { font-size: 11.5px; color: var(--text-3); letter-spacing: .4px; text-transform: uppercase; }
.sup-summary-left strong { font-size: 14px; font-weight: 600; color: var(--text-2); }
.sup-total { font-size: 36px; font-weight: 800; color: var(--text); line-height: 1; margin-top: 4px; }
.sup-summary-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; flex: 1; max-width: 480px; }
.sup-stat { font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.sup-stat strong { color: var(--text); }
.sup-dot {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block;
}
.sup-dot.orange { background: #f59e0b; }
.sup-dot.green { background: #16a34a; }
.sup-dot.purple { background: #a855f7; }
.sup-dot.gray { background: #94a3b8; }

.sup-toolbar {
  display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
}
.sup-search-wrap { display: flex; flex: 1; max-width: 380px; }
.sup-search-wrap input {
  flex: 1; height: 38px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: 10px 0 0 10px;
  font-size: 13px; background: #fff; border-right: 0;
}
.sup-search-wrap input:focus { outline: none; border-color: var(--brand); }
.sup-search-btn {
  width: 42px; border: 1.5px solid var(--border); border-left: 0;
  background: #0f172a; color: #fff; cursor: pointer;
  border-radius: 0 10px 10px 0; font-size: 14px;
}
.sup-filter-tabs {
  display: flex; gap: 4px; background: #fff; padding: 3px;
  border: 1px solid var(--border); border-radius: 10px;
}
.sup-filter {
  background: transparent; border: 0; padding: 7px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--text-3);
  cursor: pointer; border-radius: 7px;
}
.sup-filter:hover { color: var(--text); }
.sup-filter.active { background: var(--brand); color: #fff; }

.sup-table-wrap {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow: auto; box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.sup-table { width: 100%; border-collapse: collapse; min-width: 1200px; }
.sup-table thead th {
  background: #f8fafc; padding: 12px 14px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--text-3);
  letter-spacing: .5px; text-transform: uppercase;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.sup-table tbody td {
  padding: 11px 14px; border-bottom: 1px solid #f1f5f9;
  font-size: 13px; color: var(--text-2); vertical-align: middle;
}
.sup-table tbody tr:hover td { background: #f8fafc; }
.sup-table tbody tr.row-paused td { background: linear-gradient(90deg, #fdf4ff 0%, #fff 30%); }
.sup-col-check { width: 32px; text-align: center; }
.sup-col-check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand); }
.sup-agent-cell { display: flex; align-items: center; gap: 10px; }
.sup-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.sup-agent-name { font-weight: 600; color: var(--text); }
.sup-equipe { font-weight: 600; font-size: 12.5px; color: var(--text-2); }
.sup-chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 4px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
}
.sup-chip.chip-green { background: #dcfce7; color: #15803d; }
.sup-chip.chip-orange { background: #ffedd5; color: #c2410c; }
.sup-chip.chip-purple { background: #f3e8ff; color: #7e22ce; }
.sup-chip.chip-gray { background: #f1f5f9; color: var(--text-3); }

.sup-origin {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; background: #ecfdf5; color: #15803d;
  border-radius: 4px; font-size: 11.5px; font-weight: 600;
}
.sup-mono { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 12.5px; }
.sup-mono strong { font-size: 13.5px; color: var(--text); font-weight: 700; }
.sup-row-act {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  background: #f1f5f9; color: var(--text-3); text-decoration: none;
  font-size: 14px; transition: all .12s;
}
.sup-row-act:hover { background: var(--brand); color: #fff; }

.sup-empty {
  background: #fff; border: 1.5px dashed var(--border);
  border-radius: 14px; padding: 48px 32px; text-align: center;
  color: var(--text-3); margin-top: 18px;
}
.sup-empty h2 { font-size: 18px; color: var(--text); margin: 0 0 8px; }

/* Tabs principais */
.sup-nav-tabs {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 18px;
  padding: 0 2px;
}
.sup-nav-tab {
  background: transparent; border: 0; padding: 11px 18px;
  font-size: 13.5px; font-weight: 600; color: var(--text-3);
  cursor: pointer; border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.sup-nav-tab:hover { color: var(--text); }
.sup-nav-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* Cards de gerenciamento (Atendentes/Grupos/Permissões) */
.sup-mgmt-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 24px 28px;
}
.sup-mgmt-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; flex-wrap: wrap; gap: 12px;
}
.sup-mgmt-head h2 { font-size: 17px; font-weight: 700; margin: 0; color: var(--text); }
.sup-mgmt-hint {
  margin: 0 0 18px; padding: 12px 16px;
  background: #eff6ff; border-left: 3px solid var(--brand);
  border-radius: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.5;
}
.sup-mgmt-hint strong { color: var(--text); }

/* Grid de grupos */
.sup-groups-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.sup-group-card {
  background: #f8fafc; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 18px 20px; transition: all .12s;
}
.sup-group-card:hover { border-color: var(--brand); background: #fff; }
.sup-group-card h3 {
  font-size: 15px; margin: 0 0 6px; color: var(--text); font-weight: 700;
}
.sup-group-card p {
  margin: 0 0 14px; font-size: 12.5px; color: var(--text-3); min-height: 18px;
}
.sup-group-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-3);
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.sup-group-meta .sup-chip { font-size: 10.5px; padding: 1px 6px; }

/* Membros do grupo (lista no modal) */
.sup-members-list { font-size: 13px; }
.sup-members-scroll {
  max-height: 260px; overflow: auto;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 4px;
}
.sup-member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
}
.sup-member-row:hover { background: #f1f5f9; }
.sup-member-row input { width: 16px; height: 16px; accent-color: var(--brand); }

/* Modal pausa */
.sup-pause-reasons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.sup-pause-card {
  background: #fff; border: 2px solid var(--border); border-radius: 10px;
  padding: 14px 12px; cursor: pointer; transition: all .12s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.sup-pause-card span { font-size: 22px; }
.sup-pause-card:hover { border-color: #cbd5e1; background: #f8fafc; }
.sup-pause-card.selected { border-color: var(--brand); background: #eff6ff; color: var(--brand); }
.sup-pause-card.unpause { background: #f0fdf4; border-color: #86efac; color: #15803d; }
.sup-pause-card.unpause.selected { background: #dcfce7; border-color: #16a34a; }

/* =================== Legacy /equipe cards (mantido pra compat) =================== */
.te-wrap { max-width: 1280px; margin: 0 auto; padding: 32px 28px 60px; }

.te-hero {
  display: flex; gap: 24px; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #1d4ed8 0%, #6366f1 100%);
  color: #fff; border-radius: 18px; padding: 28px 32px;
  margin-bottom: 22px; box-shadow: 0 12px 36px rgba(29, 78, 216, .15);
}
.te-hero h1 { font-size: 24px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.4px; }
.te-hero p { margin: 0; opacity: .9; font-size: 13.5px; line-height: 1.5; max-width: 520px; }

.te-summary { display: flex; gap: 12px; }
.te-pill {
  background: rgba(255,255,255,.18); border-radius: 12px;
  padding: 10px 18px; text-align: center; min-width: 80px;
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2);
}
.te-pill strong { display: block; font-size: 22px; font-weight: 800; line-height: 1; }
.te-pill small { display: block; font-size: 11px; opacity: .85; letter-spacing: .3px; margin-top: 2px; }
.te-pill.green strong { color: #86efac; }
.te-pill.yellow strong { color: #fcd34d; }
.te-pill.gray strong { color: #cbd5e1; }

.te-toolbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-bottom: 18px;
}
.te-filter-tabs { display: flex; gap: 4px; background: #fff; padding: 4px; border-radius: 10px; border: 1px solid var(--border); }
.te-tab {
  background: transparent; border: 0; padding: 8px 14px;
  font-size: 13px; font-weight: 600; color: var(--text-3);
  cursor: pointer; border-radius: 7px; transition: all .12s;
}
.te-tab:hover { background: #f8fafc; color: var(--text); }
.te-tab.active { background: var(--brand); color: #fff; }

.te-search-wrap { position: relative; }
.te-search-wrap input {
  width: 280px; height: 38px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 13px; background: #fff;
}
.te-search-wrap input:focus { outline: none; border-color: var(--brand); }

.te-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.te-card {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all .15s;
}
.te-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(29, 78, 216, .08); }
.te-card.status-online { border-left: 4px solid #16a34a; }
.te-card.status-paused { border-left: 4px solid #f59e0b; background: linear-gradient(180deg, #fffbeb 0%, #fff 60%); }
.te-card.status-offline { border-left: 4px solid #cbd5e1; opacity: .85; }

.te-card-head { display: flex; align-items: center; gap: 12px; }
.te-card-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #6366f1);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.te-card.status-paused .te-card-avatar { background: linear-gradient(135deg, #f59e0b, #d97706); }
.te-card.status-offline .te-card-avatar { background: linear-gradient(135deg, #94a3b8, #64748b); }

.te-card-id strong { display: block; font-size: 15px; color: var(--text); margin-bottom: 2px; }
.te-card-id small { font-size: 11.5px; color: var(--text-3); letter-spacing: .2px; }

.te-card-info {
  display: flex; align-items: flex-start; gap: 8px; font-size: 13px;
  color: var(--text-2); line-height: 1.5;
}
.te-card-info.te-muted { color: var(--text-3); }
.te-card-info strong { color: var(--text); font-weight: 600; }

.te-card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 12px 0; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9;
}
.te-card-stats > div { text-align: center; }
.te-card-stats strong { display: block; font-size: 18px; font-weight: 700; color: var(--text); }
.te-card-stats small { font-size: 10.5px; color: var(--text-3); letter-spacing: .3px; text-transform: uppercase; }

.te-card-groups { display: flex; gap: 6px; flex-wrap: wrap; }
.te-group-badge {
  background: #eff6ff; color: var(--brand);
  padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}

.te-card-actions { display: flex; justify-content: flex-end; }
.te-card-btn {
  padding: 7px 14px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600;
  text-decoration: none; transition: all .12s;
}
.te-card-btn.primary { background: var(--brand); color: #fff; }
.te-card-btn.primary:hover { background: var(--brand-600); }

.te-empty {
  background: #fff; border: 1.5px dashed var(--border);
  border-radius: 14px; padding: 48px 32px; text-align: center;
  color: var(--text-3);
}
.te-empty h2 { font-size: 18px; color: var(--text); margin: 0 0 8px; }
.te-empty p { margin: 0; font-size: 13.5px; }
.te-empty a { color: var(--brand); font-weight: 600; }

/* =================== Modo Simples /conectar =================== */
.conectar-wrap {
  max-width: 680px; margin: 0 auto; padding: 48px 24px 80px;
}
.conectar-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 18px; padding: 40px 44px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, .04);
  margin-bottom: 20px;
}
.conectar-spinner {
  width: 32px; height: 32px; margin: 0 auto 20px;
  border: 3px solid #e2e8f0; border-top-color: var(--brand);
  border-radius: 50%; animation: cn-spin 1s linear infinite;
}
@keyframes cn-spin { to { transform: rotate(360deg); } }

.conectar-hero { text-align: center; margin-bottom: 28px; }
.conectar-hero h1 {
  font-size: 26px; font-weight: 700; letter-spacing: -.6px;
  margin: 0 0 10px; color: var(--text);
}
.conectar-hero p {
  font-size: 14.5px; color: var(--text-3); line-height: 1.55;
  margin: 0; max-width: 480px; margin-left: auto; margin-right: auto;
}

.conectar-hero-good, .conectar-hero-bad {
  text-align: center; margin-bottom: 28px;
}
.conectar-hero-good .cn-hero-ico,
.conectar-hero-bad .cn-hero-ico {
  display: inline-flex; width: 64px; height: 64px;
  border-radius: 50%; align-items: center; justify-content: center;
  font-size: 30px; margin-bottom: 14px;
}
.conectar-hero-good .cn-hero-ico { background: #dcfce7; }
.conectar-hero-bad .cn-hero-ico { background: #fef3c7; }
.conectar-hero-good h1, .conectar-hero-bad h1 {
  font-size: 22px; font-weight: 700; margin: 0 0 8px;
}
.conectar-hero-good p, .conectar-hero-bad p {
  color: var(--text-3); font-size: 14px; line-height: 1.5; margin: 0;
}

.conectar-perms {
  background: #f8fafc; border-radius: 12px;
  padding: 20px 24px; margin: 24px 0;
}
.conectar-perms h3 {
  font-size: 13px; font-weight: 700; color: var(--text-2);
  letter-spacing: .4px; text-transform: uppercase;
  margin: 0 0 12px;
}
.conectar-perms ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.conectar-perms li {
  font-size: 13.5px; color: var(--text-2); line-height: 1.4;
}
.conectar-perms li strong { color: var(--text); }
.conectar-perms-note {
  font-size: 11.5px; color: var(--text-3); margin: 14px 0 0;
  line-height: 1.5;
}

.conectar-cta {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%; height: 54px; border: 0; cursor: pointer;
  background: #1877f2; color: #fff;
  border-radius: 12px;
  font-size: 15.5px; font-weight: 700; letter-spacing: .2px;
  box-shadow: 0 6px 20px rgba(24, 119, 242, .35);
  transition: all .15s;
}
.conectar-cta:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(24, 119, 242, .45);
}
.conectar-cta:disabled {
  background: #94a3b8 !important; cursor: wait !important;
  box-shadow: none !important; opacity: .8;
}
.conectar-cta svg { flex-shrink: 0; }
.cn-spinner-small {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff;
  border-radius: 50%; animation: cn-spin 0.8s linear infinite;
}

/* Modo rápido — colar link/ID da Página */
.cn-quickconnect {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 2px solid #86efac; border-radius: 14px;
  padding: 22px 24px; margin: 20px 0 18px;
}
.cn-quick-label {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 14px;
}
.cn-quick-label > span {
  font-size: 13.5px; font-weight: 700; color: #15803d;
}
.cn-quick-label input {
  height: 46px; padding: 0 14px;
  border: 1.5px solid #86efac; border-radius: 10px;
  font-size: 13px; font-family: ui-monospace, "Cascadia Code", monospace;
  transition: all .15s; background: #fff;
}
.cn-quick-label input:focus {
  outline: none; border-color: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}
.cn-quick-label small {
  font-size: 11.5px; color: var(--text-3); line-height: 1.5;
}
.cn-quick-msg {
  margin: 0 0 10px; font-size: 12.5px; min-height: 16px;
}
.cn-quick-msg.err { color: var(--accent-red, #dc2626); }
.cn-quick-msg.ok { color: var(--accent-green, #16a34a); }
.cn-quickconnect .conectar-cta {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 6px 20px rgba(22, 163, 74, .3);
}
.cn-quickconnect .conectar-cta:hover {
  box-shadow: 0 8px 24px rgba(22, 163, 74, .4);
}

.cn-other-options {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.cn-other-options > summary {
  cursor: pointer; font-size: 12.5px; color: var(--text-3);
  margin-bottom: 12px; user-select: none;
}
.cn-other-options > summary::-webkit-details-marker { display: none; }
.cn-other-options[open] > summary::after { content: " ▾"; }
.cn-other-options:not([open]) > summary::after { content: " ▸"; }

/* Tela de recovery — Páginas vazias (3 passos) */
.cn-recovery-steps {
  display: flex; flex-direction: column; gap: 16px;
  margin: 24px 0 18px;
}
.cn-recovery-step {
  display: flex; gap: 16px; padding: 16px 18px;
  background: #f8fafc; border: 1.5px solid var(--border);
  border-radius: 12px;
}
.cn-rec-n {
  flex-shrink: 0; width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #6366f1);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 12px rgba(29, 78, 216, .25);
}
.cn-recovery-step > div { flex: 1; min-width: 0; }
.cn-recovery-step strong {
  display: block; font-size: 14px; color: var(--text);
  margin-bottom: 4px;
}
.cn-recovery-step small {
  display: block; font-size: 12.5px; color: var(--text-3);
  line-height: 1.5; margin-bottom: 10px;
}
.cn-recovery-step ol {
  margin: 8px 0 0; padding-left: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.cn-recovery-step ol li {
  font-size: 13px; color: var(--text-2); line-height: 1.5;
}
.cn-rec-action {
  display: inline-flex; margin-top: 8px;
  text-decoration: none;
}
.cn-recovery-step .conectar-cta.cn-rec-action {
  height: 44px; padding: 0 20px;
  background: linear-gradient(135deg, var(--accent-green, #16a34a), #15803d);
  font-size: 14px;
  width: auto;
}

.cn-link-btn {
  background: transparent; border: 0; padding: 0; cursor: pointer;
  color: var(--brand); font-size: inherit; font-weight: 600;
  text-decoration: underline; font-family: inherit;
}
.cn-link-btn:hover { color: var(--brand-600); }

/* Painel de diagnóstico */
.cn-diag-panel {
  margin-top: 18px; background: #0f172a; color: #e2e8f0;
  border-radius: 12px; padding: 20px 22px;
  font-size: 12.5px; line-height: 1.55;
}
.cn-diag-loading { text-align: center; }
.cn-diag-loading .conectar-spinner { border-color: rgba(255,255,255,.2); border-top-color: #6366f1; }
.cn-diag-loading p { color: #94a3b8; margin: 12px 0 0; }
.cn-diag-section { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #1e293b; }
.cn-diag-section:last-of-type { border-bottom: 0; }
.cn-diag-section h4 { font-size: 12.5px; margin: 0 0 6px; color: #cbd5e1; letter-spacing: .3px; }
.cn-diag-section small { color: #64748b; }
.cn-diag-err { color: #f87171; }
.cn-diag-warn { color: #fbbf24; }
.cn-diag-suggest {
  margin-top: 12px; padding: 14px 16px;
  background: #1e293b; border-left: 3px solid #6366f1;
  border-radius: 8px; color: #e2e8f0;
}
.cn-diag-errors {
  margin-top: 12px; color: #94a3b8;
}
.cn-diag-errors summary { cursor: pointer; }
.cn-diag-errors pre {
  margin: 8px 0 0; padding: 10px 12px; background: #1e293b;
  border-radius: 6px; font-size: 11px; overflow-x: auto;
  white-space: pre-wrap; word-break: break-word;
}

.cn-or-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 16px; color: var(--text-3);
  font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase;
}
.cn-or-divider::before, .cn-or-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

.cn-token-paste-btn {
  width: 100%; height: 44px;
  background: #fff; color: var(--text-2);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .15s;
}
.cn-token-paste-btn:hover {
  border-color: var(--brand); color: var(--brand);
  background: #f8fafc;
}

.cn-token-howto {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 1.5px solid #c7d2fe; border-radius: 10px;
  padding: 0; margin-bottom: 18px; overflow: hidden;
}
.cn-token-howto > summary {
  cursor: pointer; padding: 12px 16px; font-size: 13px;
  font-weight: 600; color: var(--brand); list-style: none;
}
.cn-token-howto > summary::-webkit-details-marker { display: none; }
.cn-token-howto-list {
  list-style: none; padding: 0 16px 14px; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid rgba(99, 102, 241, .15);
  padding-top: 12px; background: rgba(255, 255, 255, .55);
}
.cn-token-howto-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--text-2); line-height: 1.5;
}
.cn-token-howto-list li b { color: var(--text); }
.cn-token-howto-list li code {
  background: #fff; padding: 1px 5px; border-radius: 4px;
  font-size: 11.5px; border: 1px solid var(--border);
  font-family: ui-monospace, "Cascadia Code", monospace;
}
.cn-token-howto-list a { color: var(--brand); font-weight: 600; }
.cn-token-n {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
}

.cn-token-label {
  display: flex; flex-direction: column; gap: 6px;
}
.cn-token-label > span {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.cn-token-label textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 12px; font-family: ui-monospace, "Cascadia Code", monospace;
  resize: vertical; min-height: 80px;
  transition: all .15s;
}
.cn-token-label textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .08);
}
.cn-token-msg {
  margin: 12px 0 0; font-size: 12.5px; min-height: 16px;
}
.cn-token-msg.err { color: var(--accent-red, #dc2626); }
.cn-token-msg.ok { color: var(--accent-green, #16a34a); }

.cn-fastpath-hint {
  text-align: center; margin: 14px 0 4px;
  font-size: 12.5px; color: var(--brand);
  padding: 8px 14px; background: #eff6ff;
  border-radius: 8px;
}

.conectar-secondary {
  text-align: center; margin: 18px 0 0;
  font-size: 13px; color: var(--text-3);
}
.conectar-secondary a {
  color: var(--brand); font-weight: 600; text-decoration: none;
}

/* Overlay enquanto OAuth popup do Facebook está aberto */
.cn-oauth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, .65);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; transition: opacity .25s ease;
}
.cn-oauth-overlay[hidden] { display: none !important; }
.cn-oauth-overlay.visible { opacity: 1; }
.cn-oauth-modal {
  background: #fff; border-radius: 20px;
  width: 100%; max-width: 460px;
  padding: 40px 40px 32px; text-align: center;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .35);
  transform: scale(.96); transition: transform .25s ease;
}
.cn-oauth-overlay.visible .cn-oauth-modal { transform: scale(1); }

.cn-oauth-anim {
  position: relative; width: 96px; height: 96px;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
}
.cn-oauth-pulse {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 119, 242, .35), transparent 60%);
  animation: cn-pulse 2s ease-in-out infinite;
}
@keyframes cn-pulse {
  0%, 100% { transform: scale(0.8); opacity: .8; }
  50% { transform: scale(1.15); opacity: 1; }
}
.cn-oauth-ico {
  position: relative; z-index: 1;
  width: 72px; height: 72px; border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(24, 119, 242, .35);
  border: 3px solid #1877f2;
}

.cn-oauth-modal h2 {
  font-size: 19px; font-weight: 700; letter-spacing: -.3px;
  margin: 0 0 10px; color: var(--text);
}
.cn-oauth-modal p {
  font-size: 13.5px; color: var(--text-3); line-height: 1.55;
  margin: 0 0 24px;
}
.cn-oauth-modal p strong { color: var(--text); }

.cn-oauth-steps {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left;
}
.cn-oauth-steps li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  background: #f8fafc; transition: all .2s;
  font-size: 13.5px; color: var(--text-3);
}
.cn-oauth-steps li.active {
  background: #eff6ff; color: var(--brand); font-weight: 600;
  box-shadow: 0 0 0 1.5px var(--brand);
}
.cn-oauth-steps li.done { background: #dcfce7; color: #15803d; font-weight: 600; }
.cn-oauth-step-n {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: #cbd5e1; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  transition: all .2s;
}
.cn-oauth-steps li.active .cn-oauth-step-n { background: var(--brand); }
.cn-oauth-steps li.done .cn-oauth-step-n { background: #16a34a; }
.cn-oauth-steps li.done .cn-oauth-step-n::after {
  content: "✓"; font-size: 14px;
}
.cn-oauth-steps li.done .cn-oauth-step-n { font-size: 0; }

.cn-oauth-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.cn-oauth-actions .btn { font-size: 13px; }

/* Mini-form pra cadastrar App ID + Secret */
.cn-creds-form {
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px;
}
.cn-creds-label {
  display: flex; flex-direction: column; gap: 6px;
}
.cn-creds-label > span {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.cn-creds-label input {
  height: 46px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  transition: all .15s;
}
.cn-creds-label input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .08);
}
.cn-creds-msg {
  margin: 0; font-size: 12.5px; min-height: 16px;
}
.cn-creds-msg.ok { color: var(--accent-green, #16a34a); }
.cn-creds-msg.err { color: var(--accent-red, #dc2626); }

.cn-creds-howto {
  margin-top: 16px; background: #f8fafc; border-radius: 10px;
  padding: 14px 18px;
}
.cn-creds-howto > summary {
  cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--brand); list-style: none;
}
.cn-creds-howto > summary::-webkit-details-marker { display: none; }
.cn-creds-howto ol {
  margin: 14px 0 0; padding-left: 22px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px; color: var(--text-2); line-height: 1.55;
}
.cn-creds-howto ol b { color: var(--text); }
.cn-creds-howto p {
  margin: 12px 0 0; font-size: 12.5px; color: var(--text-3);
}
.cn-creds-howto a { color: var(--brand); font-weight: 600; }

/* Picker — escolhe Páginas */
.conectar-accounts-grid {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px;
}
.cn-acc-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: all .15s;
  background: #fff;
}
.cn-acc-card:hover { border-color: #cbd5e1; background: #f8fafc; }
.cn-acc-card.selected {
  border-color: var(--brand); background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .1);
}
.cn-acc-card input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer;
}
.cn-acc-avatar {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #6366f1);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.cn-acc-info { flex: 1; min-width: 0; }
.cn-acc-info strong { display: block; font-size: 14.5px; color: var(--text); margin-bottom: 4px; }
.cn-acc-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.cn-acc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.cn-acc-missing { color: var(--accent-amber, #d97706) !important; font-weight: 600; }

.conectar-picker-actions {
  display: flex; gap: 10px; justify-content: space-between;
}

/* Tela "Conectado" */
.conectar-connected-list {
  display: flex; flex-direction: column; gap: 12px; margin: 24px 0;
}
.cn-connected-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: #f0fdf4;
  border: 1px solid #86efac; border-radius: 12px;
}
.cn-conn-avatar {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.cn-conn-info { flex: 1; min-width: 0; }
.cn-conn-info strong { display: block; font-size: 14.5px; color: var(--text); margin-bottom: 4px; }
.cn-conn-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.cn-conn-disconnect {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-3); padding: 8px 14px; border-radius: 8px;
  font-size: 12.5px; cursor: pointer; transition: all .12s;
}
.cn-conn-disconnect:hover { border-color: var(--accent-red); color: var(--accent-red); }

.conectar-connected-actions {
  display: flex; gap: 10px; justify-content: space-between; align-items: center;
  flex-wrap: wrap;
}

/* =================== Onboarding — Diagnóstico hero =================== */
.ob-diag {
  background: linear-gradient(135deg, #1d4ed8 0%, #6366f1 100%);
  color: #fff;
  border-radius: 18px;
  padding: 32px 36px;
  margin-bottom: 18px;
  display: grid; grid-template-columns: 1fr auto; gap: 24px;
  align-items: center;
  box-shadow: 0 20px 40px rgba(29, 78, 216, .18);
}
.ob-diag-left { min-width: 0; }
.ob-diag-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; background: rgba(255,255,255,.15);
  border-radius: 999px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .3px; margin-bottom: 12px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
}
.ob-diag-tag.current { background: rgba(255,255,255,.18); }
.ob-diag-tag.done { background: #16a34a; }
.ob-diag-title {
  font-size: 26px; font-weight: 700; letter-spacing: -.5px;
  margin: 0 0 6px; line-height: 1.25;
}
.ob-diag-sub {
  margin: 0 0 18px; color: rgba(255,255,255,.85);
  font-size: 13.5px; line-height: 1.5;
}
.ob-diag-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ob-diag-cta {
  background: #fff !important; color: var(--brand) !important;
  border: 0 !important; font-weight: 700 !important;
  padding: 11px 20px !important; border-radius: 10px !important;
  font-size: 13.5px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  transition: transform .12s;
}
.ob-diag-cta:hover { transform: translateY(-1px); }
.ob-diag-help {
  color: rgba(255,255,255,.85); text-decoration: underline;
  font-size: 13px;
}
.ob-diag-ring { display: flex; align-items: center; justify-content: center; }
.ob-diag .ob-progress-ring {
  background: conic-gradient(#fff 0%, rgba(255,255,255,.2) 0%);
}
.ob-diag .ob-progress-ring strong { color: var(--brand); }
.ob-diag .ob-progress-ring small { color: var(--brand); opacity: .7; }

@media (max-width: 800px) {
  .ob-diag { grid-template-columns: 1fr; padding: 24px; }
  .ob-diag-ring { justify-content: flex-start; }
}

/* =================== Onboarding — Banner Modo =================== */
.ob-mode-banner {
  background: #fff;
  border: 1.5px dashed #c7d2fe;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 22px;
  display: flex; gap: 14px; align-items: flex-start;
}
.ob-mode-ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.ob-mode-text { flex: 1; }
.ob-mode-text strong { display: block; font-size: 14px; margin-bottom: 4px; color: var(--text); }
.ob-mode-text p { margin: 0; color: var(--text-3); font-size: 13px; line-height: 1.5; }
.ob-mode-banner.clickable {
  cursor: pointer; border-style: solid; border-color: var(--brand);
  background: linear-gradient(135deg, #fff 0%, #eff6ff 100%);
  transition: all .15s;
}
.ob-mode-banner.clickable:hover {
  border-color: var(--brand-600);
  box-shadow: 0 8px 24px rgba(29, 78, 216, .12);
  transform: translateY(-2px);
}
.ob-mode-arrow {
  font-size: 22px; color: var(--brand); font-weight: 700;
  align-self: center; padding-left: 8px;
}

/* =================== Onboarding — Macroetapas (Stages) =================== */
.ob-stages {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 40px;
}
.ob-stage {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.ob-stage.current {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(29, 78, 216, .1);
}
.ob-stage.done {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}
.ob-stage.partial { border-color: #fbbf24; }

.ob-stage-head {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px 18px 26px;
  display: grid; grid-template-columns: 6px 1fr auto; gap: 16px;
  align-items: center;
  user-select: none;
  transition: background .12s;
}
.ob-stage-head::-webkit-details-marker { display: none; }
.ob-stage-head:hover { background: #f8fafc; }
.ob-stage.done .ob-stage-head:hover { background: #ecfdf5; }
.ob-stage.current .ob-stage-head:hover { background: #eff6ff; }

.ob-stage-progress-mini {
  width: 6px; align-self: stretch;
  background: #e2e8f0; border-radius: 4px;
  position: relative; overflow: hidden;
  min-height: 50px;
}
.ob-stage-progress-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, #6366f1, var(--brand));
  border-radius: 4px;
  transition: height .25s;
}
.ob-stage.done .ob-stage-progress-fill {
  background: linear-gradient(180deg, #16a34a, #15803d);
}

.ob-stage-head-main { min-width: 0; }
.ob-stage-head-main h2 {
  font-size: 17px; font-weight: 700; letter-spacing: -.3px;
  margin: 0 0 4px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.ob-stage-icon { font-size: 22px; }
.ob-stage-head-main p {
  margin: 0; color: var(--text-3); font-size: 13px; line-height: 1.4;
}
.ob-stage-head-main small { font-size: 11.5px; color: var(--text-3); }

.ob-stage-head-right {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.ob-stage-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
}
.ob-stage-badge.done { background: #dcfce7; color: #15803d; }
.ob-stage-badge.current { background: var(--brand); color: #fff; }
.ob-stage-badge.partial { background: #fef3c7; color: #b45309; }
.ob-stage-badge.pending { background: #f1f5f9; color: var(--text-3); }
.ob-stage-chev {
  color: var(--text-3); font-size: 14px;
  transition: transform .2s;
}
.ob-stage[open] .ob-stage-chev { transform: rotate(180deg); }

.ob-stage-body {
  border-top: 1px solid #f1f5f9;
  padding: 20px 22px 24px;
  background: #fafbfc;
}
.ob-stage-body .ob-timeline {
  display: flex; flex-direction: column; gap: 16px;
}

/* =================== Onboarding — Walkthrough howto =================== */
.ob-howto {
  margin: 16px 0 18px;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 1.5px solid #c7d2fe;
  border-radius: 12px;
  overflow: hidden;
}
.ob-howto > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 13.5px; color: var(--brand);
  user-select: none;
  transition: background .15s;
}
.ob-howto > summary::-webkit-details-marker { display: none; }
.ob-howto > summary:hover { background: rgba(99, 102, 241, .06); }
.ob-howto-ico { font-size: 18px; }
.ob-howto-title { flex: 1; }
.ob-howto-chev {
  font-size: 16px; color: var(--brand);
  transition: transform .2s;
}
.ob-howto[open] > summary > .ob-howto-chev { transform: rotate(180deg); }

.ob-howto-list {
  list-style: none;
  margin: 0;
  padding: 4px 18px 18px;
  display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid rgba(99, 102, 241, .15);
  background: rgba(255, 255, 255, .55);
}
.ob-howto-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 4px 0;
}
.ob-howto-n {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px;
  margin-top: 1px;
  box-shadow: 0 2px 6px rgba(29, 78, 216, .25);
}
.ob-howto-body { flex: 1; min-width: 0; }
.ob-howto-text {
  font-size: 13.5px; line-height: 1.55; color: var(--text);
}
.ob-howto-text b { font-weight: 700; color: var(--text); }
.ob-howto-hint {
  margin-top: 4px;
  font-size: 12px; line-height: 1.5; color: var(--text-3);
  padding: 6px 10px; background: #fef3c7; border-radius: 6px;
  display: inline-block;
}

/* ============== Modal ============== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-overlay[hidden] { display: none !important; }
.modal-card {
  background: #fff;
  border-radius: 16px;
  width: 80%; max-width: 800px;
  max-height: 80vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-pop);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-header button {
  font-size: 22px; background: transparent; border: 0;
  cursor: pointer; color: var(--text-3); line-height: 1;
}
.modal-body { padding: 20px 24px; overflow-y: auto; }

/* ============== Inbox (chat) ============== */
.inbox-shell {
  display: grid;
  grid-template-columns: var(--side-sub) 380px 1fr;
  height: 100vh;
}
.inbox-list {
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.inbox-list h1 {
  font-size: 22px; font-weight: 700;
  margin: 0; padding: 22px 22px 16px;
}
.inbox-tabs {
  display: flex; padding: 0 22px; gap: 24px;
  border-bottom: 1px solid var(--border);
}
.inbox-tabs button {
  border: 0; background: transparent;
  padding: 10px 0;
  font: inherit; font-size: 14px; font-weight: 500;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.inbox-tabs button.active {
  color: var(--brand); font-weight: 600;
  border-bottom-color: var(--brand);
}
.inbox-listing { flex: 1; overflow-y: auto; padding: 8px 0; }

/* Empty state ilustrado (estilo Octadesk) */
.empty-state {
  padding: 40px 24px 24px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.empty-state svg { margin-bottom: 16px; }
.empty-state h3 {
  font-size: 16px; line-height: 1.4; font-weight: 700;
  color: var(--text); margin: 0 0 10px;
  max-width: 260px;
}
.empty-state p {
  font-size: 13px; color: var(--text-3);
  margin: 0 0 20px; max-width: 240px;
}
.empty-state .empty-actions {
  display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 220px;
}
.empty-state .empty-actions .btn { width: 100%; }
.inbox-listing ul { list-style: none; padding: 0; margin: 0; }
.inbox-listing li {
  padding: 12px 22px;
  display: flex; gap: 12px; align-items: center;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.inbox-listing li:hover { background: var(--bg-soft); }
.inbox-listing li.active {
  background: var(--brand-soft);
  border-left-color: var(--brand);
}
.inbox-listing .av {
  width: 38px; height: 38px;
  background: var(--brand-soft); color: var(--brand);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.inbox-listing .info { flex: 1; min-width: 0; }
.inbox-listing .info .top {
  display: flex; justify-content: space-between; align-items: center;
}
.inbox-listing .name { font-weight: 600; color: var(--text); font-size: 14px; }
.inbox-listing .time { font-size: 11px; color: var(--text-3); }
.inbox-listing .preview {
  font-size: 13px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; justify-content: space-between; align-items: center;
}

/* ============== Chat painel ============== */
.chat-panel { display: flex; flex-direction: column; background: var(--bg-soft); }
.chat-header {
  background: #fff;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.chat-header .who { display: flex; align-items: center; gap: 12px; }
.chat-header .who .av {
  width: 38px; height: 38px;
  background: var(--brand-soft); color: var(--brand);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.chat-header.empty .who .av { background: var(--bg-muted); color: var(--text-muted); }
.chat-header .who strong { font-size: 15px; font-weight: 600; }
.chat-header .who small { font-size: 12px; color: var(--text-3); display: block; }
.chat-actions { display: flex; gap: 8px; align-items: center; }
.tag-bar {
  padding: 10px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; gap: 6px; flex-wrap: wrap;
  min-height: 18px; align-items: center;
}
.tag-chip {
  font-size: 11px; padding: 3px 10px; border-radius: var(--radius-pill);
  color: #fff; cursor: pointer; font-weight: 500;
}
.tag-chip.muted { background: var(--bg-muted) !important; color: var(--text-3); }

#messages {
  flex: 1; padding: 24px; overflow-y: auto;
  background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 6px;
}
.msg {
  max-width: 65%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  word-wrap: break-word;
  line-height: 1.4;
}
.msg.inbound {
  background: #fff;
  border-top-left-radius: 4px;
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}
.msg.outbound {
  background: var(--brand);
  color: #fff;
  border-top-right-radius: 4px;
  align-self: flex-end;
}
.msg .meta {
  font-size: 10px; opacity: .7; margin-top: 4px;
  text-align: right;
}
.msg .msg-img { max-width: 280px; max-height: 280px; border-radius: 8px; display: block; cursor: zoom-in; }
.msg .msg-audio { width: 260px; max-width: 100%; }
.msg .msg-video { max-width: 320px; max-height: 240px; border-radius: 8px; }
.msg .msg-doc, .msg .msg-loc {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,.4);
  border-radius: 6px;
  font-weight: 500; text-decoration: none;
  color: inherit;
}
.msg .msg-doc:hover, .msg .msg-loc:hover { background: rgba(255,255,255,.7); }
.msg.outbound .msg-doc, .msg.outbound .msg-loc { background: rgba(255,255,255,.2); color: #fff; }
.msg .msg-tpl-badge {
  display: inline-block; background: rgba(255,255,255,.3);
  padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}

/* nota interna no stream */
.note-block {
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 13px;
  color: #78350f;
  align-self: stretch;
  max-width: 100%;
}
.note-block .note-head {
  display: flex; justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
  color: #92400e;
  font-weight: 600;
}
.note-block .note-body { white-space: pre-wrap; word-wrap: break-word; }
.mention-chip {
  display: inline-block;
  background: #1d4ed8; color: #fff;
  padding: 1px 7px; border-radius: 6px;
  font-size: 12px; font-weight: 500;
  margin: 0 2px;
}

#composer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; gap: 10px; align-items: center;
}
#composer input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font: inherit; font-size: 14px;
  background: var(--bg-soft);
}
#composer input:focus {
  outline: none; background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
#composer button {
  padding: 12px 22px;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
}
#composer button:disabled, #composer input:disabled { opacity: .5; cursor: not-allowed; }
#composer button#ai-suggest-btn,
#composer button#kb-ask-btn,
#composer button#qr-btn,
#composer button#voice-btn,
#composer button#attach-btn {
  background: var(--bg-muted);
  color: var(--brand);
  padding: 10px 14px;
  font-size: 16px;
}
#composer button#ai-suggest-btn:hover:not(:disabled),
#composer button#kb-ask-btn:hover:not(:disabled),
#composer button#qr-btn:hover:not(:disabled),
#composer button#voice-btn:hover:not(:disabled),
#composer button#attach-btn:hover:not(:disabled) {
  background: var(--brand-soft);
}
#composer button#voice-btn.recording {
  background: #fee2e2;
  color: var(--accent-red);
  animation: rec-pulse 1.2s ease-in-out infinite;
}
@keyframes rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185,28,28,.4); }
  50% { box-shadow: 0 0 0 8px rgba(185,28,28,0); }
}

#voice-rec-ui {
  position: fixed; bottom: 90px; right: 24px;
  background: #fff; border: 2px solid var(--accent-red);
  border-radius: 32px;
  padding: 12px 22px;
  display: flex; gap: 14px; align-items: center;
  box-shadow: var(--shadow-pop); z-index: 200;
  font-size: 14px;
}
#voice-rec-ui .rec-dot { color: var(--accent-red); animation: blink 1s infinite; font-size: 14px; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .3; } }
#voice-rec-ui .rec-timer { font-family: ui-monospace, monospace; font-weight: 700; min-width: 44px; }
#voice-rec-ui button {
  padding: 6px 14px; border-radius: var(--radius-pill);
  font: inherit; font-size: 12px; cursor: pointer; border: 0;
}
#voice-rec-ui .rec-cancel { background: var(--bg-muted); color: var(--text); }
#voice-rec-ui .rec-send { background: var(--accent-green); color: #fff; font-weight: 600; }

/* ---- composer tabs ---- */
.composer-wrap { position: relative; }

/* ============== Contact panel (sidebar direita) ============== */
.contact-panel {
  background: #fff;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.cp-empty {
  padding: 40px 22px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}
.cp-header {
  padding: 24px 20px 18px;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}
.cp-header .av {
  width: 64px; height: 64px;
  background: var(--brand-soft); color: var(--brand);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px;
  margin: 0 auto 12px;
}
.cp-header h2 { font-size: 16px; margin: 0; font-weight: 600; }
.cp-header p { font-size: 12px; color: var(--text-3); margin: 4px 0 8px; }

.cp-section { padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.cp-section:last-child { border-bottom: 0; }
.cp-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-3);
  margin: 0 0 10px;
  font-weight: 700;
}

.cp-info-row {
  display: flex; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  align-items: baseline;
}
.cp-info-row > span:first-child { color: var(--text-3); flex-shrink: 0; }
.cp-info-row > span:last-child { color: var(--text); text-align: right; word-break: break-word; }

.cp-cf-row {
  display: flex; flex-direction: column; gap: 3px;
  margin-bottom: 10px;
}
.cp-cf-row label { font-size: 11px; color: var(--text-3); }
.cp-cf-row input, .cp-cf-row select {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  font: inherit; font-size: 13px;
}

.cp-tags-list { display: flex; flex-wrap: wrap; gap: 4px; }

.cp-history-item {
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 12px;
}
.cp-history-item:hover { background: var(--bg-soft); }
.cp-history-item.active { background: var(--brand-soft); border-color: var(--brand); }
.cp-history-item .top { display: flex; justify-content: space-between; align-items: center; }
.cp-history-item .meta { color: var(--text-3); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.cp-csat-stars { color: #f59e0b; }

.cp-ai-row {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 6px; font-size: 13px;
}
.cp-ai-row .label { font-size: 11px; color: var(--text-3); flex: 1; }
.cp-ai-row .val { font-weight: 600; }
.cp-ai-summary {
  font-size: 12px; color: var(--text-2);
  background: var(--bg-soft);
  padding: 8px 10px; border-radius: 6px;
  border-left: 3px solid var(--brand);
  margin-top: 6px; white-space: pre-wrap;
}
.cp-sent-positive { color: #10b981; }
.cp-sent-neutral  { color: #64748b; }
.cp-sent-negative { color: #dc2626; }
.cp-urg-low    { background: #d1fae5; color: #065f46; padding: 1px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.cp-urg-medium { background: #fef3c7; color: #92400e; padding: 1px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.cp-urg-high   { background: #fee2e2; color: #991b1b; padding: 1px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; }

.composer-tabs {
  display: flex; gap: 0;
  padding: 0 24px;
  background: #fff;
  border-top: 1px solid var(--border);
}
.composer-tabs .ctab {
  border: 0; background: transparent;
  padding: 10px 0; margin-right: 24px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.composer-tabs .ctab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.composer-tabs .ctab[data-mode="note"].active { color: #92400e; border-bottom-color: #f59e0b; }

#composer.mode-note input { background: #fef3c7; }
#composer.mode-note button[type="submit"] { background: #f59e0b; }
#composer.mode-note input::placeholder { color: #92400e; }

/* ---- popover quick replies ---- */
.qr-popover {
  position: absolute;
  bottom: 100%;
  left: 24px; right: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 8px;
  z-index: 50;
}
.qr-popover[hidden] { display: none !important; }
.qr-popover-header {
  padding: 10px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
}
.qr-popover ul { list-style: none; padding: 6px 0; margin: 0; }
.qr-popover li {
  padding: 10px 14px;
  cursor: pointer;
  display: flex; align-items: flex-start; gap: 10px;
}
.qr-popover li:hover, .qr-popover li.focused { background: var(--brand-soft); }
.qr-popover .qr-short {
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: var(--bg-muted); color: var(--brand);
  padding: 2px 8px; border-radius: 4px; font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.qr-popover .qr-body {
  font-size: 13px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.qr-popover .qr-title { font-weight: 600; color: var(--text); font-size: 13px; }
.qr-popover .empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ============== Campaigns / Automation specifics ============== */
.progress-bar {
  width: 140px; height: 6px; background: var(--bg-muted);
  border-radius: var(--radius-pill); overflow: hidden;
  margin-bottom: 4px;
}
.progress-fill { height: 100%; background: var(--accent-green); transition: width .3s; }
.row-actions { display: flex; gap: 6px; }
.row-actions button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
}
.row-actions button:hover { background: var(--bg-soft); }
.row-actions .action-start, .row-actions button.primary {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.row-actions .action-del { color: var(--accent-red); border-color: #fecaca; }

.flow-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: #fff;
}
.flow-card.active { border-color: var(--accent-green); background: #f0fdf4; }
.flow-card small { color: var(--text-3); }

ul.list-clean { list-style: none; padding: 0; margin: 0 0 12px; max-height: 240px; overflow-y: auto; }
ul.list-clean li {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
ul.list-clean li button {
  background: transparent; border: 0; color: var(--accent-red);
  cursor: pointer; font-size: 12px;
}

.hint code { background: var(--bg-muted); padding: 1px 5px; border-radius: 4px; }

pre {
  background: #0f172a; color: #f1f5f9;
  padding: 14px; border-radius: var(--radius);
  font-size: 12px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

/* ============== Sidebar e tooltip — utilitários extras ============== */
.is-supervisor-only[hidden] { display: none !important; }

/* ============== Toggle (switch) estilo Octadesk ============== */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle.small { width: 32px; height: 18px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #cbd5e1; border-radius: 22px;
  transition: .25s;
}
.toggle .toggle-slider::before {
  content: ""; position: absolute;
  height: 16px; width: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: .25s;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.toggle.small .toggle-slider::before { height: 12px; width: 12px; }
.toggle input:checked + .toggle-slider { background: var(--brand); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle.small input:checked + .toggle-slider::before { transform: translateX(14px); }

/* ============== Notificações section ============== */
.notif-section .notif-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
}
.notif-item h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--text); }
.notif-item p { margin: 0 0 12px; font-size: 13px; color: var(--text-3); }
.notif-channels {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--border-soft);
}
.notif-channels span { font-size: 13px; color: var(--text-2); }

/* ============== Bot editor (canvas drag-and-drop) ============== */
.bot-editor { display: flex; flex-direction: column; height: 620px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.be-toolbar {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  display: flex; gap: 8px; align-items: center; background: var(--bg-soft);
  flex-wrap: wrap;
}
.bn-add-btn {
  padding: 7px 14px; border: 1px solid var(--border); background: #fff;
  border-radius: var(--radius-pill); font-size: 12px; cursor: pointer; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.bn-add-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.bn-add-btn.type-message { color: #1e40af; border-color: #dbeafe; }
.bn-add-btn.type-question { color: #92400e; border-color: #fef3c7; }
.bn-add-btn.type-route { color: #065f46; border-color: #d1fae5; }
.bn-add-btn.type-tag { color: #5b21b6; border-color: #ede9fe; }
.bn-add-btn.type-end { color: #991b1b; border-color: #fee2e2; }
.bn-add-btn.type-condition { color: #b45309; border-color: #fde68a; }
.bn-add-btn.type-input { color: #1e3a8a; border-color: #c7d2fe; }
.bn-add-btn.type-http { color: #0e7490; border-color: #cffafe; }
.bn-add-btn.type-delay { color: #475569; border-color: #e2e8f0; }
.be-spacer { flex: 1; }

.be-canvas-wrap { flex: 1; overflow: auto; position: relative; background: #f8fafc; }
.be-canvas {
  position: relative;
  width: 3000px; height: 2000px;
  background-image: radial-gradient(circle, #d1d5db 1px, transparent 1px);
  background-size: 20px 20px;
}
.be-edges { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.be-edges path { fill: none; stroke: #94a3b8; stroke-width: 2; }
.be-edges path.tmp { stroke: #f59e0b; stroke-dasharray: 6 4; }
.be-edges path:hover { stroke: var(--brand); stroke-width: 3; cursor: pointer; pointer-events: stroke; }

.bot-node {
  position: absolute;
  width: 240px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  z-index: 2;
}
.bot-node.selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.bot-node.is-root { box-shadow: 0 0 0 2px var(--accent-green); }
.bot-node .bn-header {
  padding: 8px 12px;
  border-radius: 9px 9px 0 0;
  display: flex; justify-content: space-between; align-items: center;
  cursor: move; user-select: none; font-weight: 600; gap: 8px;
}
.bot-node.type-message .bn-header { background: #dbeafe; color: #1e40af; }
.bot-node.type-question .bn-header { background: #fef3c7; color: #92400e; }
.bot-node.type-route .bn-header { background: #d1fae5; color: #065f46; }
.bot-node.type-tag .bn-header { background: #ede9fe; color: #5b21b6; }
.bot-node.type-end .bn-header { background: #fee2e2; color: #991b1b; }
.bot-node.type-condition .bn-header { background: #fde68a; color: #b45309; }
.bot-node.type-input .bn-header { background: #c7d2fe; color: #1e3a8a; }
.bot-node.type-http .bn-header { background: #cffafe; color: #0e7490; }
.bot-node.type-delay .bn-header { background: #e2e8f0; color: #475569; }

.bot-node .bn-id {
  background: transparent; border: 0; color: inherit;
  font-weight: 700; font-size: 13px; outline: none; flex: 1;
  font-family: ui-monospace, monospace; min-width: 0;
}
.bot-node .bn-id:focus { background: rgba(255,255,255,.6); border-radius: 4px; padding: 0 4px; }
.bot-node .bn-delete {
  background: transparent; border: 0; color: inherit;
  cursor: pointer; font-size: 18px; padding: 0 4px; opacity: .6; line-height: 1;
}
.bot-node .bn-delete:hover { opacity: 1; }
.bot-node .bn-body { padding: 10px 12px; }
.bot-node .bn-body label { font-size: 11px; color: var(--text-3); display: block; margin-bottom: 2px; }
.bot-node .bn-body input, .bot-node .bn-body textarea {
  width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px;
  font: inherit; font-size: 12px; resize: vertical; background: #fff;
  font-family: inherit;
}
.bn-port {
  position: absolute;
  width: 14px; height: 14px;
  background: #fff; border: 2px solid var(--brand);
  border-radius: 50%;
  cursor: crosshair; z-index: 3;
}
.bn-port.in { left: -8px; top: 16px; }
.bn-port:hover, .bn-port.connecting { background: var(--brand); }
.bn-options .bn-option {
  display: flex; gap: 4px; margin-bottom: 6px; align-items: center; position: relative;
}
.bn-options .bn-option input { flex: 1; padding-right: 28px; }
.bn-options .bn-option .bn-port.out {
  position: absolute; right: -22px; top: 50%; transform: translateY(-50%);
}
.bn-options .bn-option > button.bn-rm-opt {
  background: transparent; border: 0; color: var(--accent-red); cursor: pointer;
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 14px; padding: 0;
}
.bn-add-option {
  width: 100%; padding: 5px; background: var(--bg-soft);
  border: 1px dashed var(--border); border-radius: 4px;
  cursor: pointer; font-size: 11px; color: var(--brand);
  margin-top: 4px;
}
.bn-next-row {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; position: relative;
}
.bn-next-row label { margin: 0; }
.bn-next-row .bn-port.out { position: absolute; right: -22px; top: 50%; transform: translateY(-50%); }

/* ============== Busca global ============== */
.search-card {
  max-width: 600px; width: 92%;
  align-self: flex-start; margin-top: 10vh;
}
.search-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.search-icon { font-size: 18px; color: var(--text-3); }
#search-input {
  flex: 1; border: 0; outline: none;
  font: inherit; font-size: 16px;
  color: var(--text);
}
.search-kbd {
  font-size: 11px; padding: 3px 8px;
  background: var(--bg-muted); color: var(--text-3);
  border-radius: 4px; font-family: ui-monospace, monospace;
}
.search-results {
  max-height: 60vh; overflow-y: auto;
  padding: 4px 0;
}
.search-results .sr-group {
  padding: 10px 20px 4px;
}
.search-results .sr-group h4 {
  margin: 0; font-size: 11px; text-transform: uppercase;
  color: var(--text-3); letter-spacing: .5px; font-weight: 700;
}
.search-results .sr-item {
  display: flex; gap: 12px; padding: 10px 20px;
  text-decoration: none; color: var(--text);
  cursor: pointer;
}
.search-results .sr-item:hover, .search-results .sr-item.focused { background: var(--bg-soft); }
.search-results .sr-icon {
  width: 32px; height: 32px;
  background: var(--bg-muted); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px;
}
.search-results .sr-body { flex: 1; min-width: 0; }
.search-results .sr-title { font-weight: 600; font-size: 14px; }
.search-results .sr-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; word-break: break-word; }
.search-results .sr-sub mark { background: #fef3c7; color: var(--text); padding: 0 2px; }
.search-results .sr-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ============== Filtros avançados na inbox ============== */
.adv-filter-toggle {
  margin: 8px 22px 0;
  padding: 6px 12px;
  font-size: 12px;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--brand);
  width: calc(100% - 44px);
}
.adv-filter-toggle:hover { background: var(--brand-soft); }

.bulk-bar {
  margin: 8px 22px;
  padding: 8px 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.bulk-bar[hidden] { display: none !important; }
.bulk-bar .bulk-count { color: var(--brand); font-weight: 500; flex-shrink: 0; }
.bulk-bar .bulk-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.bulk-bar .btn-sm { padding: 5px 10px; font-size: 11px; }

.conv-check {
  margin-right: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.inbox-listing li.selected { background: var(--brand-soft); }
.adv-filter-panel {
  padding: 12px 22px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.adv-filter-panel[hidden] { display: none !important; }
.adv-filter-panel label {
  font-size: 11px; color: var(--text-3); margin-bottom: 4px;
  display: block;
}
.adv-filter-panel select {
  width: 100%; padding: 6px 8px; font-size: 12px;
  border: 1px solid var(--border); border-radius: 5px;
  margin-bottom: 8px;
}
.adv-filter-panel .filter-actions {
  display: flex; gap: 6px; margin-top: 4px;
}
.adv-filter-panel .filter-actions button { flex: 1; padding: 6px; font-size: 12px; }

/* ============== Ticket detail timeline ============== */
.ticket-event {
  padding: 10px 14px;
  border-left: 3px solid var(--border);
  margin-bottom: 10px;
  background: var(--bg-soft);
  border-radius: 0 6px 6px 0;
}
.ticket-event.meta {
  background: transparent;
  border-left-color: var(--border-soft);
  padding: 4px 14px;
  color: var(--text-3);
}
.ticket-event .te-head { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.ticket-event .te-body { font-size: 14px; color: var(--text); white-space: pre-wrap; word-wrap: break-word; }
.ticket-event .te-note { font-size: 12px; color: var(--text-2); margin-top: 4px; font-style: italic; }

/* ============== Profile popup (user no rodapé do subnav) ============== */
.subnav .user { cursor: pointer; transition: background 0.12s; }
.subnav .user:hover { background: var(--bg-soft); }
.profile-popup {
  position: fixed; bottom: 80px; left: calc(var(--side-icons) + 18px);
  width: 280px; background: #fff;
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15,23,42,0.16);
  z-index: 90;
  overflow: hidden;
}
.profile-popup-header {
  padding: 14px 16px; display: flex; gap: 10px; align-items: center;
  border-bottom: 1px solid var(--border-soft);
}
.profile-popup-header .av {
  width: 36px; height: 36px; background: #fde68a; color: #92400e;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.profile-popup-header strong { display: block; font-size: 14px; color: var(--text); }
.profile-popup-header small { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.profile-popup-section { padding: 8px 8px; }
.profile-popup-section + .profile-popup-section { border-top: 1px solid var(--border-soft); }
.profile-popup-label {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 6px 10px;
}
.status-opt, .profile-action {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px; border: 0; background: transparent;
  font-size: 13px; color: var(--text); text-align: left; cursor: pointer;
  border-radius: 8px;
}
.status-opt:hover, .profile-action:hover { background: var(--bg-soft); }
.status-opt.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.profile-action svg { width: 16px; height: 16px; color: var(--text-3); }
.profile-action.danger { color: var(--accent-red); }
.profile-action.danger svg { color: var(--accent-red); }

/* ============== Chat empty state (centered Octadesk-style) ============== */
.chat-empty-state {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: #fff; text-align: center;
}
.chat-empty-state h2 {
  font-size: 22px; font-weight: 700; color: var(--text);
  max-width: 520px; line-height: 1.4;
}
/* esconde composer/tag-bar/messages enquanto não tem conversa aberta */
.chat-panel:has(#chat-empty-state:not([hidden])) #tag-bar,
.chat-panel:has(#chat-empty-state:not([hidden])) #messages,
.chat-panel:has(#chat-empty-state:not([hidden])) .composer-wrap { display: none; }

/* ============== Subnav collapsed ============== */
.inbox-shell.subnav-collapsed .subnav {
  display: none;
}

/* ============== Dashboard filters row ============== */
.dash-filters {
  display: flex; gap: 12px; align-items: flex-end;
  margin-bottom: 22px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.dash-filter { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.dash-filter span {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.dash-filter select {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 13px; color: var(--text); background: #fff;
  font-family: inherit;
}
.dash-filters .btn-sm { padding: 9px 18px; align-self: flex-end; }

/* ============== Sofisticação UI — polish global =============== */

/* select com chevron customizada */
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 42px !important;
  cursor: pointer;
}

/* Checkbox custom — replaces native ugly checkbox */
input[type=checkbox]:not(.conv-check):not(.legacy-cb) {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: all .15s;
  vertical-align: middle;
  flex-shrink: 0;
}
input[type=checkbox]:not(.conv-check):not(.legacy-cb):hover { border-color: var(--brand); }
input[type=checkbox]:not(.conv-check):not(.legacy-cb):checked {
  background: var(--brand); border-color: var(--brand);
}
input[type=checkbox]:not(.conv-check):not(.legacy-cb):checked::after {
  content: ""; position: absolute;
  left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type=checkbox]:not(.conv-check):not(.legacy-cb):focus {
  outline: none; box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Color picker — vira swatch redondo */
input[type=color] {
  appearance: none; -webkit-appearance: none;
  width: 38px; height: 38px;
  padding: 0; border: 2px solid var(--border); border-radius: 50%;
  background: transparent; cursor: pointer;
  overflow: hidden;
  transition: border .15s, transform .12s;
}
input[type=color]:hover { transform: scale(1.05); border-color: var(--text-muted); }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }

/* Tabelas — refinamento de hover/spacing */
.grid-table {
  border-spacing: 0;
  width: 100%;
}
.grid-table th {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  background: var(--bg-soft);
}
.grid-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px; color: var(--text-2);
}
.grid-table tr:last-child td { border-bottom: 0; }
.grid-table tr { transition: background .12s; }
.grid-table tbody tr:hover td { background: var(--bg-soft); cursor: default; }

/* Card refinement — mais respiro, hierarquia clara */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
  transition: box-shadow .18s;
}
.card:hover { box-shadow: 0 2px 10px rgba(15,23,42,.04); }
.card > h2:first-child {
  font-size: 17px; font-weight: 700; margin: 0 0 6px;
  color: var(--text); letter-spacing: -0.01em;
}
.card > p, .card > .hint {
  color: var(--text-3); font-size: 13px; margin: 0 0 16px; line-height: 1.5;
}

/* Status indicator — substitui emojis verdes por badge sofisticada */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  background: var(--bg-soft); color: var(--text-2);
  border: 1px solid var(--border);
}
.status-pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted);
}
.status-pill.ok { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.status-pill.ok::before { background: var(--accent-green); }
.status-pill.warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.status-pill.warn::before { background: var(--accent-amber); }
.status-pill.err { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.status-pill.err::before { background: var(--accent-red); }

/* Em-empty rows — texto mais leve */
.grid-table tbody tr td[colspan] {
  text-align: center; color: var(--text-muted);
  font-style: normal; font-size: 13px;
  padding: 28px 14px;
}

/* Code/kbd inline com aparência limpa */
code, kbd, .mono {
  background: var(--bg-muted);
  padding: 2px 7px; border-radius: 5px;
  font-family: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  font-size: 12.5px; color: var(--brand-700);
  border: 1px solid var(--border);
}

/* Botões pequenos com mais polidez */
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-icon-x {
  width: 28px; height: 28px; padding: 0;
  border-radius: 8px; background: transparent;
  color: var(--text-muted); border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .12s; font-size: 14px;
}
.btn-icon-x:hover { background: #fef2f2; color: var(--accent-red); border-color: #fecaca; }

/* (estilos antigos de label/placeholder/disabled removidos —
    bloco principal de forms cobre tudo agora) */

/* Eventos checkbox (webhook out) — grid uniforme */
fieldset.events-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px;
}
fieldset.events-grid label.inline {
  font-size: 13px; color: var(--text-2);
  padding: 6px 0;
}

/* ============== Tag chips polidos ============== */
.tag-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  border: 1px solid; line-height: 1.2;
}
.tag-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Section h3 — subtítulo interno do card */
.card h3 {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin: 18px 0 12px; padding: 0;
}

/* Cards de canais com nome em negrito + tipo discreto */
.grid-table td small { color: var(--text-muted); font-size: 12px; }

/* ============== Form section divider (titulo h3 + form) ============== */
.card h3, .card h4 {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin: 24px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card > h3:first-child, .card > h4:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

/* Form bem espacado dentro do card */
.card form { margin-top: 4px; }
.card form > label:last-of-type { margin-bottom: 18px; }

/* Botão principal do form com mais peso */
.card form > button[type="submit"].btn,
.card form > .btn[type="submit"] {
  margin-top: 4px;
}

/* Form-row vertical em mobile/cartão estreito */
@media (max-width: 720px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* ============== Limitar largura dos forms em cards full-width ============== */
/* Evita inputs "esticados" em containers largos */
.card > form { max-width: 560px; }
.card > h3 + form, .card > h4 + form { max-width: 560px; }

/* Forms inside narrow card-grid cells (~340px+) usam full width */
.card-grid > .card form { max-width: 100%; }

/* Tabelas dentro do card ficam edge-to-edge */
.card > .grid-table, .card > table.grid-table { max-width: 100%; }

/* ============== Snooze bar (chat header) ============== */
.snooze-bar {
  display: flex; align-items: center; gap: 10px;
  background: #fef3c7; border-bottom: 1px solid #fde68a;
  padding: 10px 20px; font-size: 13px; color: #92400e;
}
.snooze-bar strong { color: #78350f; }

/* ============== Reply preview (composer) ============== */
.reply-preview {
  display: flex; align-items: stretch; gap: 10px;
  background: var(--bg-soft); border-top: 1px solid var(--border);
  padding: 10px 14px;
}
.reply-preview-bar {
  width: 3px; background: var(--brand); border-radius: 2px; flex-shrink: 0;
}
.reply-preview-body { flex: 1; min-width: 0; }
.reply-preview-label {
  font-size: 11px; font-weight: 700; color: var(--brand);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.reply-preview p {
  margin: 2px 0 0; font-size: 13px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#reply-preview-cancel {
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-3); font-size: 18px; padding: 0 6px;
}
#reply-preview-cancel:hover { color: var(--accent-red); }

/* Bloco citado dentro da bolha de mensagem */
.msg-reply-quote {
  background: rgba(0,0,0,0.04); border-left: 3px solid var(--brand);
  padding: 6px 10px; margin-bottom: 6px; border-radius: 6px;
  font-size: 12px; color: var(--text-2); line-height: 1.4;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg.outbound .msg-reply-quote { background: rgba(255,255,255,0.18); border-left-color: rgba(255,255,255,0.5); color: rgba(255,255,255,0.85); }

/* ============== Send split (Enviar + ▾ agendar) ============== */
.send-split {
  display: inline-flex; align-items: stretch;
  border-radius: var(--radius-pill); overflow: hidden;
}
.send-split button[type="submit"] {
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
}
.send-split .send-later-trigger {
  background: var(--brand); color: #fff;
  border: 0; border-left: 1px solid rgba(255,255,255,0.25);
  padding: 0 14px; font-size: 14px; cursor: pointer;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}
.send-split .send-later-trigger:hover { background: var(--brand-600); }
.send-split .send-later-trigger:disabled { background: var(--text-muted); cursor: not-allowed; }

/* ============== Hours editor (business_hours) ============== */
.hours-editor {
  background: var(--bg-soft); border-radius: 12px;
  padding: 14px 18px; border: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 10px;
}
.bh-row {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--text-2);
}
.bh-row input[type=time] { height: 38px; padding: 0 12px; font-size: 13px; box-shadow: none; }
.bh-row input[type=time]:disabled { opacity: 0.4; }

/* ============== SLA pill na lista de conversas ============== */
.sla-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.02em;
  margin-right: 4px;
}
.sla-pill.late { background: #fee2e2; color: #991b1b; }
.sla-pill.warn { background: #fef3c7; color: #92400e; }
.sla-pill.snoozed { background: #e0e7ff; color: #4338ca; }

/* ============== Msg actions menu (⋮) / Edit / Delete / Transcribe ============== */
.msg { position: relative; }
.msg-actions-btn {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.7); border: 0; border-radius: 50%;
  font-size: 14px; cursor: pointer; color: var(--text-3);
  display: none; align-items: center; justify-content: center;
  font-weight: 700; line-height: 1;
}
.msg:hover .msg-actions-btn { display: inline-flex; }
.msg.outbound .msg-actions-btn { background: rgba(255,255,255,0.25); color: #fff; }
.msg-action-menu {
  position: absolute; top: 28px; right: 4px; z-index: 50;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-pop); padding: 6px; min-width: 140px;
  display: flex; flex-direction: column; gap: 2px;
}
.msg-action-menu button {
  background: transparent; border: 0; padding: 8px 12px; border-radius: 6px;
  font-size: 13px; color: var(--text); cursor: pointer; text-align: left;
}
.msg-action-menu button:hover { background: var(--bg-soft); }
.msg-action-menu button.danger { color: var(--accent-red); }
.msg-action-menu button.danger:hover { background: #fef2f2; }

.msg-deleted {
  font-style: italic; color: var(--text-muted); font-size: 13px;
  padding: 4px 0;
}
.msg.deleted { opacity: 0.75; }

.edited-mark { color: var(--text-muted); font-style: italic; font-size: 11px; }

.msg-transcribe-btn {
  display: block; margin-top: 6px;
  background: rgba(0,0,0,0.06); color: var(--brand);
  border: 0; padding: 6px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.msg-transcribe-btn:hover { background: rgba(0,0,0,0.1); }
.msg-transcribe-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.msg.outbound .msg-transcribe-btn { background: rgba(255,255,255,0.2); color: #fff; }
.msg-transcription {
  margin-top: 6px; padding: 8px 12px; background: rgba(0,0,0,0.04);
  border-left: 3px solid var(--brand); border-radius: 6px;
  font-size: 13px; line-height: 1.45; color: var(--text-2);
}
.msg.outbound .msg-transcription { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.95); border-left-color: rgba(255,255,255,0.6); }

/* ============== Thread search bar (Ctrl+F) ============== */
.thread-search-bar {
  display: flex; align-items: center; gap: 8px;
  background: #1e293b; color: #fff;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.thread-search-bar input {
  flex: 1; height: 36px !important; padding: 0 14px;
  background: rgba(255,255,255,0.12) !important;
  border: 1.5px solid transparent !important; border-radius: 8px;
  color: #fff !important; box-shadow: none !important;
}
.thread-search-bar input::placeholder { color: rgba(255,255,255,0.5); }
.thread-search-bar input:focus { background: rgba(255,255,255,0.18) !important; }
.thread-search-bar .counter { font-size: 12px; color: rgba(255,255,255,0.7); padding: 0 6px; min-width: 60px; text-align: center; }
.thread-search-bar button {
  background: transparent; border: 0; color: rgba(255,255,255,0.8);
  width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 14px;
}
.thread-search-bar button:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Highlights de busca */
.msg.search-hit { box-shadow: 0 0 0 2px rgba(245,158,11,0.4); }
.msg.search-current { box-shadow: 0 0 0 3px var(--accent-amber); }
.msg-body-text mark { background: var(--accent-amber); color: #000; padding: 0 2px; border-radius: 3px; }

/* ============== Pipeline Kanban ============== */
.kanban-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.kanban-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 26px 32px 18px; border-bottom: 1px solid var(--border);
  background: #fff; flex-shrink: 0;
}
.kanban-header h1 { font-size: 24px; font-weight: 700; margin: 0; color: var(--text); }
.kanban-header .actions { display: flex; gap: 10px; }

.kanban-board {
  display: flex; gap: 14px; padding: 18px 24px;
  overflow-x: auto; flex: 1; min-height: 0;
}
.kb-col {
  flex: 0 0 300px; max-width: 300px;
  display: flex; flex-direction: column;
  background: var(--bg-soft); border-radius: 12px;
  border-top: 4px solid var(--stage-color, var(--brand));
  max-height: 100%; overflow: hidden;
}
.kb-col-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px 8px;
}
.kb-col-title { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.kb-col-title strong { font-weight: 700; }
.kb-col-dot { width: 10px; height: 10px; border-radius: 50%; }
.kb-col-flag {
  font-size: 11px; padding: 1px 6px; border-radius: 6px; font-weight: 700;
}
.kb-col-flag.won { background: #ecfdf5; color: #065f46; }
.kb-col-flag.lost { background: #fef2f2; color: #991b1b; }
.kb-col-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-3);
}
.kb-col-body {
  flex: 1; padding: 8px 12px 12px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  transition: background .12s;
}
.kb-col-body.drop-target { background: var(--brand-soft); }
.kb-col-empty { color: var(--text-muted); font-size: 12px; padding: 10px; text-align: center; }

.kb-deal {
  background: #fff; border-radius: 10px;
  padding: 12px 14px; cursor: grab;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: box-shadow .12s, transform .12s;
}
.kb-deal:hover { box-shadow: 0 4px 12px rgba(15,23,42,.08); transform: translateY(-1px); }
.kb-deal.dragging { opacity: 0.5; }
.kb-deal-title { font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 8px; }
.kb-deal-contact {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-bottom: 8px;
}
.kb-deal-av {
  width: 22px; height: 22px; background: #fde68a; color: #92400e;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px;
}
.kb-deal-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
}
.kb-deal-value { font-weight: 700; color: var(--text); }
.kb-deal-prob {
  background: var(--bg-soft); padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; color: var(--pc, var(--brand));
  border: 1px solid color-mix(in srgb, var(--pc, var(--brand)) 30%, transparent);
}
.kb-deal-agent { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* Edit pipeline modal */
.pe-stage-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); padding: 10px; border-radius: 8px; margin-bottom: 6px;
}
.pe-stage-row input[type=text], .pe-stage-row .pe-stage-name { flex: 1; height: 40px !important; }
.pe-stage-row input[type=color] { width: 36px; height: 36px; }

/* ============== Status ticks (✓✓ azul WhatsApp) ============== */
.ticks { font-weight: 600; letter-spacing: -1px; }
.ticks.pending { color: rgba(255,255,255,0.6); font-size: 12px; }
.ticks.sent { color: rgba(255,255,255,0.55); font-size: 12px; }
.ticks.delivered { color: rgba(255,255,255,0.75); font-size: 12px; }
.ticks.read { color: #38bdf8; font-size: 12px; font-weight: 700; }
.ticks.failed { color: #fca5a5; font-size: 11px; font-weight: 600; }
.msg.inbound .ticks { color: var(--text-3) !important; }

/* ============== Forward msg modal — lista de conversas ============== */
.fwd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: background .12s;
}
.fwd-item:last-child { border-bottom: 0; }
.fwd-item:hover { background: var(--bg-soft); }
.fwd-item .av {
  width: 34px; height: 34px; background: #fde68a; color: #92400e;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.fwd-item strong { display: block; font-size: 14px; color: var(--text); }
.fwd-item small { display: block; font-size: 12px; color: var(--text-3); }

/* ============== Reports — comparativo grid + heatmap ============== */
.rp-comp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 6px; }
.rp-comp-cell {
  background: var(--bg-soft); border-radius: 10px; padding: 14px 16px;
}
.rp-comp-cell .label {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em; display: block;
}
.rp-comp-cell .big {
  font-size: 28px; font-weight: 700; color: var(--text); margin: 6px 0 4px;
  display: flex; align-items: center; gap: 8px;
}
.rp-comp-cell small { font-size: 11px; color: var(--text-3); }

.heatmap-table {
  border-collapse: separate; border-spacing: 2px; font-size: 11px; margin-top: 8px;
}
.heatmap-table th {
  font-weight: 600; color: var(--text-3); font-size: 10px;
  padding: 4px 6px; text-align: center; min-width: 26px;
}
.heatmap-table tbody th {
  text-align: right; padding-right: 8px; color: var(--text-2);
}
.heatmap-table td {
  width: 26px; height: 26px; text-align: center; vertical-align: middle;
  border-radius: 4px; font-weight: 600; color: var(--text); font-size: 10px;
  transition: transform .12s;
}
.heatmap-table td:hover { transform: scale(1.15); z-index: 2; position: relative; box-shadow: 0 2px 8px rgba(15,23,42,.18); }
.heatmap-legend {
  display: flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: 11px; color: var(--text-3);
}
.hl-swatch { width: 18px; height: 18px; border-radius: 4px; display: inline-block; }

/* ============== Interactive WhatsApp modal ============== */
.int-row {
  display: flex; gap: 6px; align-items: center; margin-bottom: 6px;
}
.int-row input { height: 38px !important; padding: 0 12px !important; font-size: 13px !important; }
.int-section {
  background: var(--bg-soft); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px;
}
.int-section .int-row input { background: #fff !important; }

/* ============== Translate button + result ============== */
.msg-translate-btn {
  display: inline-block; margin-top: 4px;
  background: rgba(0,0,0,0.04); color: var(--brand);
  border: 0; padding: 3px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600; cursor: pointer;
}
.msg-translate-btn:hover { background: rgba(0,0,0,0.08); }
.msg-translate-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.msg.outbound .msg-translate-btn { background: rgba(255,255,255,0.18); color: #fff; }
.msg-translation {
  margin-top: 6px; padding: 6px 10px; background: rgba(34,197,94,0.08);
  border-left: 3px solid #10b981; border-radius: 6px;
  font-size: 13px; line-height: 1.45; color: var(--text-2);
}
.msg.outbound .msg-translation { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.95); border-left-color: rgba(255,255,255,0.6); }

/* ============== Team Chat ============== */
.tc-page { display: flex; flex-direction: column; height: 100vh; }
.tc-header {
  padding: 18px 24px 14px; border-bottom: 1px solid var(--border);
  background: #fff; flex-shrink: 0;
}
.tc-header h1 { margin: 0; font-size: 20px; font-weight: 700; }
.tc-messages {
  flex: 1; padding: 18px 24px;
  overflow-y: auto; background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 12px;
}
.tc-msg { display: flex; gap: 12px; }
.tc-msg.mine .tc-msg-body { background: var(--brand-soft); border-color: #c7d2fe; }
.tc-msg-av {
  width: 36px; height: 36px; flex-shrink: 0;
  background: #fde68a; color: #92400e;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.tc-msg-body {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; max-width: 580px;
}
.tc-msg-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.tc-msg-meta strong { font-size: 13px; color: var(--text); }
.tc-msg-meta span { font-size: 11px; color: var(--text-3); }
.tc-msg-text { font-size: 14px; color: var(--text-2); line-height: 1.5; word-wrap: break-word; white-space: pre-wrap; }

.tc-composer {
  display: flex; gap: 8px; padding: 14px 24px;
  border-top: 1px solid var(--border); background: #fff; flex-shrink: 0;
}
.tc-composer input { flex: 1; }
.tc-composer button {
  background: var(--brand); color: #fff; border: 0; border-radius: var(--radius-pill);
  padding: 0 28px; font-weight: 600; cursor: pointer;
}
.tc-composer button:hover { background: var(--brand-600); }
.tc-composer button:disabled { background: var(--text-muted); cursor: not-allowed; }

/* ============== Catalog grid ============== */
.catalog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px; margin-top: 8px;
}
.prod-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; cursor: pointer;
  transition: box-shadow .15s, transform .12s;
}
.prod-card:hover { box-shadow: 0 6px 20px rgba(15,23,42,.10); transform: translateY(-2px); }
.prod-img {
  height: 160px; background: var(--bg-soft);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.prod-body { padding: 12px 14px; }
.prod-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.prod-cat {
  background: var(--brand-soft); color: var(--brand);
  padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700;
}
.prod-body h3 { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; }
.prod-body p { margin: 0 0 10px; font-size: 12px; color: var(--text-3); line-height: 1.4; }
.prod-foot { display: flex; justify-content: space-between; align-items: center; }
.prod-price { font-size: 16px; font-weight: 700; color: var(--text); }

.cat-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 80px 20px;
  color: var(--text-muted);
}
.cat-empty p { margin: 0 0 20px; font-size: 14px; }

/* ============== Catalog picker no chat ============== */
.cat-pick {
  display: flex; gap: 10px; align-items: center;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 10px; padding: 8px; cursor: pointer;
  transition: all .12s;
}
.cat-pick:hover { border-color: var(--brand); }
.cat-pick.selected { border-color: var(--brand); background: var(--brand-soft); }
.cat-pick-img {
  width: 56px; height: 56px; background: var(--bg-soft); border-radius: 6px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cat-pick-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-pick-body strong { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-pick-price { font-size: 12px; font-weight: 700; color: var(--brand); }

/* ============== CRM provider cards ============== */
.crm-providers-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.crm-prov-card {
  background: var(--bg-soft); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 18px 20px; cursor: pointer;
  transition: all .15s;
}
.crm-prov-card:hover { border-color: var(--brand); background: var(--brand-soft); }
.crm-prov-logo { font-size: 28px; margin-bottom: 8px; }
.crm-prov-card h3 { font-size: 15px; margin: 0 0 6px; color: var(--text); }
.crm-prov-card .hint { font-size: 11px; color: var(--text-3); line-height: 1.4; }
.crm-prov-docs {
  display: inline-block; margin-top: 10px;
  font-size: 11px; color: var(--brand); font-weight: 600;
  text-decoration: none;
}
.crm-prov-docs:hover { text-decoration: underline; }

/* ============== Contact panel — pedidos e-commerce ============== */
.cp-order-card {
  background: var(--bg-soft); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 6px;
  font-size: 12px; color: var(--text-2);
}
.cp-order-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.cp-order-prov { font-weight: 600; color: var(--text); font-size: 11px; text-transform: capitalize; }
.cp-order-status {
  background: var(--brand-soft); color: var(--brand);
  padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.cp-order-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.cp-order-meta a { color: var(--brand); text-decoration: none; }
.cp-order-meta a:hover { text-decoration: underline; }
.cp-order-foot { display: flex; justify-content: space-between; align-items: center; }
.cp-order-foot strong { color: var(--text); font-size: 13px; }

/* ============== Notifications bell + popover ============== */
.iconbar .ico.notifications-bell { position: relative; }
.notif-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--accent-red); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-soft);
}
.notif-popover {
  position: fixed; z-index: 100;
  background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-pop);
  border: 1px solid var(--border);
  width: 360px; max-width: 92vw;
  display: flex; flex-direction: column;
  max-height: 480px;
}
.notif-popover-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border-soft);
}
.notif-popover-head strong { font-size: 14px; }
.notif-popover-head .btn-sm { font-size: 11px; padding: 4px 10px; }
.notif-popover-body { flex: 1; overflow-y: auto; }
.notif-item {
  display: flex; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .12s;
  position: relative;
}
.notif-item:hover { background: var(--bg-soft); }
.notif-item.unread { background: var(--brand-soft); }
.notif-item.unread:hover { background: var(--brand-soft); filter: brightness(0.97); }
.notif-ico { font-size: 18px; flex-shrink: 0; line-height: 1.2; }
.notif-body { flex: 1; min-width: 0; }
.notif-body strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 2px; }
.notif-body p { margin: 0 0 4px; font-size: 12px; color: var(--text-2); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-body small { font-size: 10px; color: var(--text-3); }
.notif-dot {
  position: absolute; top: 14px; right: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
}

/* ============== Sentiment alert toast ============== */
.sentiment-alert-toast {
  position: fixed; top: 20px; right: 20px;
  background: #fff; border-left: 4px solid var(--accent-red);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(15,23,42,0.18);
  padding: 14px 18px; max-width: 380px;
  display: flex; align-items: flex-start; gap: 12px;
  z-index: 200;
  animation: slideInRight 0.3s ease-out;
}
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.sa-icon { font-size: 24px; flex-shrink: 0; }
.sa-body { flex: 1; min-width: 0; }
.sa-body strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 4px; }
.sa-body p { margin: 0; font-size: 12px; color: var(--text-2); line-height: 1.4; }
.sa-go {
  background: var(--brand); color: #fff; border: 0;
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600;
}
.sa-go:hover { background: var(--brand-600); }
.sa-close {
  background: transparent; border: 0; color: var(--text-3);
  font-size: 18px; cursor: pointer; padding: 0 4px;
}

/* ============== Customer journey timeline ============== */
#cp-journey { position: relative; }
#cp-journey::before {
  content: ""; position: absolute;
  left: 10px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.journey-item {
  display: flex; gap: 10px; align-items: flex-start;
  position: relative;
  padding-bottom: 14px;
}
.journey-item:last-child { padding-bottom: 0; }
.journey-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff;
  flex-shrink: 0; z-index: 2;
  box-shadow: 0 0 0 3px #fff;
}
.journey-body { flex: 1; min-width: 0; padding-top: 1px; }
.journey-title { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; }
.journey-desc { font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
.journey-time { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

/* ============== Real-time analytics live ============== */
.live-pulse {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 14px; vertical-align: middle;
  font-size: 11px; font-weight: 700;
  color: var(--accent-red); text-transform: uppercase; letter-spacing: 0.06em;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-red);
  position: relative;
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(185,28,28,.7); }
  70% { box-shadow: 0 0 0 8px rgba(185,28,28,0); }
  100% { box-shadow: 0 0 0 0 rgba(185,28,28,0); }
}
.live-pulse.pulsing .live-dot {
  animation: livePulse 0.4s 1, livePulse 2s infinite 0.4s;
}
.kpi-bump {
  animation: kpiBump 0.4s ease-out;
}
@keyframes kpiBump {
  0% { transform: scale(1); color: var(--text); }
  50% { transform: scale(1.15); color: var(--brand); }
  100% { transform: scale(1); color: var(--text); }
}

/* ============== Octadesk-style Settings polish (R22) ============== */

/* Page header hint banner */
.page-hint {
  background: var(--bg-soft); border-radius: 8px;
  padding: 10px 16px; margin-bottom: 18px;
  font-size: 13px; color: var(--text-2);
  border: 1px solid var(--border-soft);
}

/* Preferences grid 2x2 */
.pref-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
@media (max-width: 900px) { .pref-grid { grid-template-columns: 1fr; } }
.pref-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 24px;
}
.pref-card h3 {
  margin: 0 0 8px; font-size: 16px; font-weight: 700;
  color: var(--text); line-height: 1.35;
}
.pref-card .hint {
  margin: 0 0 18px; font-size: 13px; line-height: 1.5;
  color: var(--text-3); min-height: 56px;
}
.pref-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
}
.pref-toggle {
  display: inline-flex; align-items: center; gap: 12px;
  cursor: pointer; flex: 1;
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.pref-toggle .toggle-label { line-height: 1.3; }
.pref-state {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted); padding: 4px 10px;
  background: var(--bg-soft); border-radius: 999px;
  min-width: 60px; text-align: center;
}
.pref-extra {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.pref-link {
  display: block; margin-top: 14px;
  font-size: 13px; color: var(--brand); text-decoration: none;
}
.pref-link:hover { text-decoration: underline; }

/* Custom toggle slider (Octadesk style: gray pill, blue when on) */
.pref-toggle input[type=checkbox] { appearance: none; -webkit-appearance: none; display: none; }
.pref-toggle .toggle-slider {
  width: 44px; height: 24px;
  background: #cbd5e1; border-radius: 999px;
  position: relative; transition: background .15s;
  flex-shrink: 0;
}
.pref-toggle .toggle-slider::before {
  content: ""; position: absolute;
  width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform .15s, background .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.pref-toggle input:checked + .toggle-slider { background: var(--brand); }
.pref-toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Channel landing pages (WhatsApp / IG) */
.channel-landing {
  background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
  border-radius: 14px; padding: 40px 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: center;
}
@media (max-width: 820px) { .channel-landing { grid-template-columns: 1fr; } }
.channel-landing-illust { display: flex; align-items: center; justify-content: center; }
.channel-landing-body h2 {
  font-size: 26px; font-weight: 800; color: var(--text);
  margin: 0 0 16px; line-height: 1.25; letter-spacing: -0.01em;
}
.channel-landing-body p { color: var(--text-2); font-size: 15px; line-height: 1.55; margin: 0 0 24px; }
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px; margin-top: 18px;
}
.feature-item { padding: 16px; background: var(--bg-soft); border-radius: 10px; }
.feature-ic { font-size: 24px; margin-bottom: 8px; }
.feature-item h3 { margin: 0 0 4px; font-size: 14px; color: var(--text); }
.feature-item p { margin: 0; font-size: 12px; color: var(--text-3); line-height: 1.4; }

.channel-empty {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 80px 40px;
  text-align: center;
}
.channel-empty-illust { margin: 0 auto 20px; }
.channel-empty h2 { font-size: 22px; font-weight: 700; color: var(--text); margin: 0 0 10px; }
.channel-empty p { color: var(--text-3); font-size: 14px; margin: 0 0 24px; }

/* Wizard step (Chat no site) */
.wizard-step {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 12px; overflow: hidden;
}
.wizard-step-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; cursor: pointer;
  transition: background .12s;
}
.wizard-step-head:hover { background: var(--bg-soft); }
.wizard-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-soft); color: var(--text-3); font-weight: 700;
}
.wizard-step-head strong { flex: 1; font-size: 14px; color: var(--text); }
.wizard-arrow { color: var(--text-3); transition: transform .15s; }
.wizard-step.expanded .wizard-arrow { transform: rotate(180deg); }
.wizard-step-body { padding: 0 22px 22px; display: none; }
.wizard-step.expanded .wizard-step-body { display: block; }
.wizard-link { font-size: 13px; color: var(--brand); text-decoration: none; }
.wizard-link:hover { text-decoration: underline; }

/* Custom fields page */
.cf-list-card { padding: 0 !important; }
.cf-filter-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 22px; flex-wrap: wrap;
}
.cf-filter-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.cf-filter {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-3); margin: 0 !important;
}
.cf-filter select, .cf-filter input {
  height: 36px !important; padding: 0 12px !important;
  font-size: 13px !important; box-shadow: none !important;
  min-width: 120px;
}
.cf-search input { min-width: 200px; }
.cf-empty {
  padding: 80px 20px; text-align: center;
}
.cf-empty h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }

/* Security page */
.pol-list { padding-left: 18px; margin: 8px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.7; }

/* =========================== DASHBOARDS =========================== */
.db-canvas {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 80px;
  gap: 14px;
  padding: 4px;
}
.db-canvas.edit {
  background-image:
    linear-gradient(to right, rgba(29, 78, 216, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(29, 78, 216, 0.06) 1px, transparent 1px);
  background-size: calc(100% / 12) 94px;
  border-radius: 12px;
  padding: 8px;
}
.db-widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: box-shadow .15s;
}
.db-widget:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .06); }
.db-canvas.edit .db-widget { cursor: move; border: 1.5px dashed var(--brand); }
.db-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}
.db-widget-head h3 {
  margin: 0; font-size: 13px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.db-widget-x {
  background: var(--bg-soft); border: 0; border-radius: 6px;
  width: 24px; height: 24px; cursor: pointer; font-size: 14px; color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
}
.db-widget-x:hover { background: #fee2e2; color: var(--accent-red); }
.db-widget-body {
  flex: 1; overflow: auto; min-height: 0;
}
.db-kpi {
  font-size: 38px; font-weight: 700; color: var(--brand);
  text-align: center; padding: 12px 0;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
}
.db-svg { width: 100%; height: 100%; max-height: 220px; }
.db-resize-handle {
  position: absolute; bottom: 2px; right: 2px;
  width: 14px; height: 14px; cursor: nwse-resize;
  border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  border-bottom-right-radius: 8px;
}

/* =========================== MARKETPLACE =========================== */
.mp-hero {
  background: linear-gradient(135deg, #1d4ed8 0%, #6366f1 50%, #8b5cf6 100%);
  color: #fff; padding: 40px 32px; border-radius: 16px; margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.mp-hero::before {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.mp-hero h1 { font-size: 30px; margin: 0 0 6px; font-weight: 700; }
.mp-hero p { font-size: 15px; opacity: 0.85; margin: 0 0 22px; max-width: 540px; }
.mp-search-wrap { max-width: 540px; position: relative; z-index: 1; }
.mp-search-wrap input {
  width: 100%; height: 48px; padding: 0 18px; border-radius: 10px;
  border: 0; background: #fff; font-size: 14px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.mp-section { margin-bottom: 32px; }
.mp-section h2 {
  font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}
.mp-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.mp-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; cursor: pointer; display: flex; flex-direction: column;
  transition: all .15s; min-height: 180px;
}
.mp-card:hover {
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--brand);
}
.mp-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px;
}
.mp-logo {
  width: 44px; height: 44px; border-radius: 10px;
  background: #f1f5f9; display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 4px;
}
.mp-logo img { width: 100%; height: 100%; object-fit: contain; }
.mp-logo-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--brand); background: #eff6ff;
  border-radius: 8px;
}
.mp-card h3 {
  font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 6px;
}
.mp-card-desc {
  font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin: 0;
  flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mp-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.mp-card-foot small { color: var(--text-3); font-size: 11px; }
.mp-cat-tag {
  font-size: 10.5px; color: var(--text-2); background: var(--bg-soft);
  padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: .3px;
}

.mp-badge {
  font-size: 10.5px; padding: 3px 8px; border-radius: 4px;
  font-weight: 600; letter-spacing: .3px;
}
.mp-badge-on { background: #dcfce7; color: #166534; }
.mp-badge-paused { background: #fef3c7; color: #92400e; }
.mp-badge-soon { background: #f3f4f6; color: var(--text-3); }
.mp-badge-featured { background: #fef3c7; color: #b45309; }
.mp-badge-auth { background: #ede9fe; color: #6d28d9; text-transform: uppercase; }

/* =========================== BROADCASTS — COMPOSE =========================== */
.compose-grid {
  display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start;
}
.compose-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px 26px;
}
.compose-block { margin-bottom: 22px; }
.compose-block:last-child { margin-bottom: 0; }
.cb-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-2); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .3px;
}
.channel-toggle { display: flex; gap: 8px; }
.ch-btn {
  flex: 1; padding: 14px 16px; border: 1.5px solid var(--border);
  background: #fff; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .12s;
}
.ch-btn:hover { border-color: var(--brand); }
.ch-btn.active {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.ch-emoji { font-size: 18px; }
.ch-hint { margin: 8px 0 0; font-size: 12px; color: var(--text-3); }

/* chip input pra destinatários */
.chip-input {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 8px 10px; background: #fff; min-height: 50px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  transition: border-color .12s;
}
.chip-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,78,216,.08); }
.chip-list { display: contents; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #eff6ff; color: var(--brand);
  padding: 4px 4px 4px 10px; border-radius: 6px;
  font-size: 12.5px; font-weight: 500;
  border: 1px solid #bfdbfe;
}
.chip-x {
  background: transparent; border: 0; cursor: pointer;
  color: var(--brand); font-size: 16px; line-height: 1;
  padding: 0 6px; border-radius: 4px;
}
.chip-x:hover { background: #dbeafe; }
#chip-typer {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 13px; min-width: 180px; padding: 4px;
}
.chip-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.chip-count { font-size: 12px; color: var(--text-3); }

.tpl-row {
  display: flex; gap: 10px; align-items: center;
}
.tpl-picker {
  flex: 1; height: 44px; padding: 0 12px; border-radius: 10px;
  border: 1.5px solid var(--border); font-size: 13.5px; background: #fff;
}
.link-action {
  color: var(--brand); text-decoration: none; font-size: 12.5px;
  font-weight: 500; white-space: nowrap;
}
.link-action:hover { text-decoration: underline; }

.ig-warn {
  margin-top: 12px; padding: 10px 12px;
  background: #fef3c7; border: 1px solid #fbbf24; color: #92400e;
  border-radius: 8px; font-size: 12px; line-height: 1.5;
}

.schedule-row {
  display: flex; gap: 8px;
}
.sch-opt {
  flex: 1; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--border); background: #fff;
  cursor: pointer; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 8px; justify-content: center;
  transition: all .12s;
}
.sch-opt:hover { border-color: var(--brand); }
.sch-opt.active { border-color: var(--brand); background: #eff6ff; color: var(--brand); }
.sch-opt input { display: none; }

.compose-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding-top: 18px; border-top: 1px solid var(--border);
  margin-top: 22px;
}
.btn-lg { padding: 12px 26px; font-size: 14.5px; font-weight: 600; }

/* preview de telefone à direita */
.compose-preview { position: sticky; top: 14px; }
.phone-frame {
  background: #ddd; border-radius: 24px; padding: 14px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.phone-head {
  background: #075e54; color: #fff; padding: 12px 16px;
  border-radius: 14px 14px 0 0; display: flex; align-items: center; gap: 10px;
}
.phone-back { font-size: 22px; line-height: 1; opacity: .8; }
.phone-contact { display: flex; align-items: center; gap: 10px; flex: 1; }
.phone-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.phone-contact strong { display: block; font-size: 13.5px; }
.phone-contact small { font-size: 11px; opacity: .85; }
.phone-body {
  background-color: #ece5dd;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.5) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.4) 0%, transparent 40%);
  min-height: 360px; padding: 18px 14px; border-radius: 0 0 14px 14px;
}
.prev-empty {
  color: #94a3b8; font-size: 12.5px; text-align: center;
  padding: 60px 12px; line-height: 1.6;
}
.prev-msg {
  background: #d9fdd3; padding: 8px 12px 22px;
  border-radius: 8px 8px 8px 0; max-width: 84%;
  font-size: 13.5px; line-height: 1.4; color: #111;
  position: relative; word-wrap: break-word;
  box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.prev-time {
  position: absolute; right: 8px; bottom: 4px;
  font-size: 10px; color: #667;
}

/* list view extras */
.progress-bar { width: 100%; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); transition: width .3s; }
.status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: #f1f5f9; color: var(--text-2);
}
.status-pill.ok { background: #dcfce7; color: #166534; }
.status-pill.warn { background: #fef3c7; color: #92400e; }
.status-pill.err { background: #fee2e2; color: #991b1b; }

/* responsivo */
@media (max-width: 1100px) {
  .compose-grid { grid-template-columns: 1fr; }
  .compose-preview { position: static; }
}

/* ============== TEMPLATE BUILDER MODAL ============== */
.tpl-modal-card {
  width: 92%; max-width: 980px; max-height: 92vh;
}
.tpl-modal-body {
  display: grid; grid-template-columns: 1fr 320px;
  flex: 1; overflow: hidden;
}
.tpl-form {
  padding: 20px 24px; overflow-y: auto;
}
.tpl-preview-col {
  background: #f8fafc; border-left: 1px solid var(--border);
  padding: 18px 16px; overflow-y: auto;
}
.tpl-preview-label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .3px; margin-bottom: 10px;
}
.tpl-block { margin-bottom: 16px; }
.tpl-block:last-child { margin-bottom: 0; }
.tpl-label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.tpl-label .req { color: var(--accent-red); }
.tpl-hint {
  margin: 4px 0 0; font-size: 11.5px; color: var(--text-3); line-height: 1.4;
}
.tpl-hint code {
  background: #f1f5f9; padding: 1px 5px; border-radius: 3px;
  font-family: ui-monospace, monospace; font-size: 11px; color: var(--brand);
}
.tpl-row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.tpl-form input, .tpl-form select, .tpl-form textarea {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13.5px; background: #fff;
  transition: border-color .12s;
}
.tpl-form textarea { height: auto; padding: 10px 12px; resize: vertical; font-family: inherit; }
.tpl-form input:focus, .tpl-form select:focus, .tpl-form textarea:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,78,216,.08);
}

/* header type grid */
.header-type-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
.ht-opt {
  cursor: pointer; padding: 10px 6px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: #fff; text-align: center;
  font-size: 11.5px; font-weight: 500; color: var(--text-2);
  transition: all .12s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.ht-opt input { display: none; }
.ht-opt:hover { border-color: var(--brand); }
.ht-opt.active {
  border-color: var(--brand); background: #eff6ff; color: var(--brand);
}
.ht-ico { font-size: 16px; line-height: 1; }

/* buttons modes */
.tpl-btn-modes { display: flex; gap: 6px; margin-bottom: 6px; }
.btn-mode-pill {
  padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--border);
  background: #fff; cursor: pointer; font-size: 12px; font-weight: 500;
  color: var(--text-2);
}
.btn-mode-pill:hover { border-color: var(--brand); }
.btn-mode-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tpl-btn-row {
  display: flex; gap: 6px; margin-bottom: 6px; align-items: center;
}
.tpl-btn-row select { width: 130px; flex-shrink: 0; }
.tpl-btn-row input { flex: 1; }
.tpl-btn-x {
  background: #fee2e2; color: var(--accent-red); border: 0;
  width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 14px;
}

/* modal footer bar */
.modal-footer-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px; border-top: 1px solid var(--border); background: #fff;
}

/* preview menor pro modal */
.phone-frame-sm {
  background: #ddd; border-radius: 22px; padding: 10px 6px;
  max-width: 280px; margin: 0 auto;
}
.phone-frame-sm .phone-body { min-height: 320px; padding: 14px 10px; }
.phone-frame-sm .prev-msg {
  max-width: 100%; font-size: 13px; padding: 6px 10px 18px;
}
.prev-header-img {
  width: 100%; max-height: 140px; object-fit: cover;
  border-radius: 6px; margin-bottom: 6px;
}
.prev-header-text {
  font-weight: 700; font-size: 13.5px; margin-bottom: 4px; color: #111;
}
.prev-header-doc {
  background: #f1f5f9; padding: 8px 10px; border-radius: 6px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  font-size: 12px; color: var(--text-2);
}
.prev-footer {
  font-size: 11px; color: #667; margin-top: 6px; padding-top: 4px;
}
.prev-buttons {
  margin-top: 8px; display: flex; flex-direction: column; gap: 4px;
}
.prev-btn {
  background: #fff; color: #1d9bf0;
  padding: 8px 10px; border-radius: 6px; text-align: center;
  font-size: 12.5px; font-weight: 500;
  box-shadow: 0 1px 1px rgba(0,0,0,.05);
}

@media (max-width: 900px) {
  .tpl-modal-body { grid-template-columns: 1fr; }
  .tpl-preview-col { border-left: 0; border-top: 1px solid var(--border); }
  .header-type-grid { grid-template-columns: repeat(3, 1fr); }
}

/* upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: #f8fafc;
  padding: 18px;
  cursor: pointer;
  transition: all .12s;
  min-height: 80px;
  display: flex; align-items: center;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--brand);
  background: #eff6ff;
}
.uz-empty {
  display: flex; align-items: center; gap: 14px; width: 100%;
}
.uz-ico {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.uz-empty strong { display: block; font-size: 13px; color: var(--text); }
.uz-empty small { color: var(--text-3); font-size: 11.5px; }
.uz-uploaded {
  display: flex; align-items: center; gap: 12px; width: 100%;
}
#uz-thumb, #ig-uz-thumb, #pub-uz-thumb {
  width: 56px; height: 56px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); flex-shrink: 0;
}
.uz-meta { flex: 1; min-width: 0; }
.uz-meta strong { display: block; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uz-meta small { color: var(--text-3); font-size: 11px; }
.uz-remove {
  background: #fee2e2; color: var(--accent-red); border: 0;
  width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 16px;
}
.uz-remove:hover { background: #fecaca; }
.uz-uploading {
  display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 12.5px;
}
.uz-or {
  text-align: center; margin: 10px 0;
  color: var(--text-3); font-size: 11px;
  letter-spacing: .3px; text-transform: uppercase;
}
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #cbd5e1; border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============== PUBLISHER ============== */
.target-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px;
}
.tg-card {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 14px; cursor: pointer; font-size: 13px;
  background: #fff; display: flex; align-items: center; gap: 8px;
  transition: all .12s;
}
.tg-card input { margin: 0; }
.tg-card:hover { border-color: var(--brand); }
.tg-card.active { background: #eff6ff; border-color: var(--brand); color: var(--brand); }

.preview-mini {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; max-width: 340px;
}
.pm-head {
  padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.pm-body { min-height: 60px; }

/* ============== ADS / BOOST ============== */
.kpi-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.kpi-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 18px; text-align: center;
}
.kpi-card strong { display: block; font-size: 22px; color: var(--text); font-weight: 700; }
.kpi-card small { color: var(--text-3); font-size: 11px; }

.obj-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px;
}
.obj-card {
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 16px; cursor: pointer; background: #fff;
  display: flex; flex-direction: column; gap: 4px;
  transition: all .12s; position: relative;
}
.obj-card input { position: absolute; opacity: 0; }
.obj-card:hover { border-color: var(--brand); }
.obj-card.active {
  border-color: var(--brand); background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(29,78,216,.08);
}
.obj-ico { font-size: 26px; line-height: 1; }
.obj-card strong { font-size: 13.5px; }
.obj-card small { color: var(--text-3); font-size: 11.5px; line-height: 1.3; }

.aud-mode { display: flex; gap: 8px; background: #f1f5f9; padding: 4px; border-radius: 10px; }
.aud-mode-btn {
  flex: 1; padding: 8px 12px; border: 0; background: transparent;
  border-radius: 7px; cursor: pointer; font-size: 12.5px; font-weight: 500;
  color: var(--text-2); transition: all .12s;
}
.aud-mode-btn.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.06); }

.suggest-dropdown {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  margin-top: 4px; max-height: 220px; overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.sg-item {
  padding: 8px 12px; cursor: pointer; font-size: 12.5px;
  border-bottom: 1px solid #f1f5f9;
}
.sg-item:last-child { border-bottom: 0; }
.sg-item:hover { background: #eff6ff; color: var(--brand); }

.age-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.age-row input[type="range"] { flex: 1; }
.gender-row { display: flex; gap: 6px; }
.gen-pill {
  padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 999px;
  background: #fff; cursor: pointer; font-size: 12.5px;
}
.gen-pill input { display: none; }
.gen-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.reach-estimate {
  background: linear-gradient(135deg, #eff6ff 0%, #ede9fe 100%);
  border: 1px solid #c7d2fe; border-radius: 10px;
  padding: 14px; margin-top: 14px;
  display: flex; align-items: center; gap: 14px;
}
.reach-estimate > div { flex: 1; }
.re-ico { font-size: 22px; }
.reach-estimate strong { display: block; font-size: 12px; color: var(--brand); }
.reach-estimate p { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--text); }
.re-meter {
  width: 60px; height: 6px; background: rgba(29,78,216,.15);
  border-radius: 3px; overflow: hidden;
}
.re-fill { height: 100%; background: var(--brand); transition: width .4s; }

.budget-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.budget-pill {
  padding: 10px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500;
}
.budget-pill:hover { border-color: var(--brand); }
.budget-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.duration-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.duration-row input[type="range"] { flex: 1; }

.total-summary {
  background: #f8fafc; border-radius: 10px; padding: 12px 16px;
  margin-top: 14px; display: flex; justify-content: space-between; align-items: center;
}
.total-summary small { color: var(--text-3); font-size: 12px; }
.total-summary strong { font-size: 20px; color: var(--brand); }

/* ============== META SETUP ============== */
.copy-row {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
}
.copy-row code {
  flex: 1; background: #fff; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--border); font-size: 12.5px; word-break: break-all;
  font-family: ui-monospace, monospace;
}
.copy-btn {
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; cursor: pointer; font-size: 12px; color: var(--text-2);
}
.copy-btn:hover { background: #f1f5f9; border-color: var(--brand); color: var(--brand); }
.copyable-block {
  position: relative; margin-bottom: 10px;
}
.copyable-block pre {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
  padding: 14px; font-size: 12.5px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, monospace; color: #1e293b; margin: 0;
}
.copyable-block .copy-btn {
  position: absolute; top: 8px; right: 8px;
}

/* ============== ONBOARDING WIZARD ============== */
.ob-wrap { max-width: 900px; margin: 0 auto; padding: 36px 24px; }
.ob-hero {
  display: flex; gap: 30px; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #1d4ed8 0%, #6366f1 50%, #8b5cf6 100%);
  color: #fff; padding: 32px 36px; border-radius: 18px; margin-bottom: 28px;
  box-shadow: 0 10px 40px rgba(29,78,216,.2);
}
.ob-hero h1 { margin: 0 0 8px; font-size: 26px; font-weight: 700; }
.ob-hero p { margin: 0; opacity: .92; font-size: 14px; line-height: 1.5; max-width: 540px; }
.ob-progress-ring {
  width: 110px; height: 110px; border-radius: 50%;
  background: conic-gradient(var(--brand) 0%, #e2e8f0 0%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.ob-progress-ring::before {
  content: ""; position: absolute; inset: 10px; background: #fff; border-radius: 50%;
}
.ob-progress-ring strong, .ob-progress-ring small {
  position: relative; z-index: 1; text-align: center;
}
.ob-progress-ring strong { color: var(--brand); font-size: 22px; display: block; }
.ob-progress-ring small { color: var(--text-3); font-size: 11px; display: block; }

.ob-timeline { position: relative; }
.ob-step {
  position: relative; padding-left: 70px; margin-bottom: 18px;
}
.ob-line {
  position: absolute; left: 26px; top: 56px; bottom: -22px;
  width: 2px; background: #e2e8f0;
}
.ob-step:last-child .ob-line { display: none; }
.ob-step.done .ob-line { background: var(--brand); }

.ob-circle {
  position: absolute; left: 0; top: 14px;
  width: 54px; height: 54px; border-radius: 50%;
  background: #fff; border: 3px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--text-3);
  z-index: 1;
}
.ob-circle.current {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 0 0 5px rgba(29,78,216,.15);
}
.ob-circle.done {
  background: #16a34a; border-color: #16a34a; color: #fff;
}

.ob-content {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 22px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.ob-step.done .ob-content { opacity: 0.7; }
.ob-step-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ob-step-head h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); }

.ob-badge {
  font-size: 11px; padding: 4px 10px; border-radius: 999px; font-weight: 600;
  white-space: nowrap;
}
.ob-badge-done { background: #dcfce7; color: #166534; }
.ob-badge-current { background: var(--brand); color: #fff; }
.ob-badge-pending { background: #f1f5f9; color: var(--text-3); }
.ob-badge-skipped { background: #fef3c7; color: #92400e; }

.ob-meta-line {
  font-size: 12px; color: var(--text-3); margin: 6px 0 10px;
}
.ob-desc {
  margin: 0 0 14px; line-height: 1.6; font-size: 13.5px; color: var(--text-2);
}

.ob-auto-block {
  background: #f0f9ff; border: 1px solid #bae6fd; padding: 12px 14px;
  border-radius: 10px; margin-bottom: 12px;
}
.ob-copy {
  display: flex; align-items: center; gap: 8px; margin: 4px 0;
  font-size: 12.5px;
}
.ob-copy small { color: var(--text-3); font-weight: 600; min-width: 130px; }
.ob-copy code {
  flex: 1; background: #fff; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--border); font-size: 12px;
  word-break: break-all; font-family: ui-monospace, monospace;
}
.ob-copy-btn {
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  width: 30px; height: 30px; cursor: pointer; font-size: 12px;
}
.ob-copy-btn:hover { background: #eff6ff; border-color: var(--brand); }

.ob-inputs { display: grid; gap: 10px; margin-bottom: 14px; }
.ob-input-label { display: block; }
.ob-input-label span {
  display: block; font-size: 11.5px; font-weight: 600; color: var(--text-2);
  margin-bottom: 4px;
}
.ob-input-label input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; background: #fff;
}
.ob-input-label input:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,78,216,.08);
}

.ob-actions {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-top: 4px;
}
.ob-btn {
  padding: 9px 16px; border-radius: 8px; border: 1.5px solid var(--border);
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--text); display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.ob-btn:hover { border-color: var(--brand); color: var(--brand); }
.ob-btn-primary {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.ob-btn-primary:hover { background: #1e40af; border-color: #1e40af; color: #fff; }
.ob-btn-secondary {
  background: #eff6ff; color: var(--brand); border-color: #bfdbfe;
}
.ob-btn-meta {
  background: #1877f2; color: #fff; border-color: #1877f2;
}
.ob-btn-meta:hover { background: #155bcb; border-color: #155bcb; color: #fff; }
.ob-btn-ghost { background: transparent; }
.ob-btn-link {
  background: transparent; border: 0; color: var(--text-3); text-decoration: underline;
  font-size: 12px;
}

.ob-msg { margin: 10px 0 0; font-size: 12.5px; }

.ob-step.done .ob-step-head h2 { text-decoration: line-through; opacity: .8; }

/* ============== HUB MARKETING ============== */
.mk-wrap { max-width: 1140px; margin: 0 auto; padding: 36px 28px; }
.mk-hero { margin-bottom: 28px; }
.mk-hero h1 { font-size: 28px; margin: 0 0 8px; font-weight: 700; }
.mk-hero p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.5; max-width: 620px; }

.mk-status {
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  padding: 14px 18px; border-radius: 12px; margin-bottom: 22px;
  display: flex; flex-direction: column; gap: 4px;
}
.mk-status strong { font-size: 14px; }
.mk-status p { margin: 0; font-size: 13px; line-height: 1.5; }
.mk-status a { color: #9a3412; font-weight: 600; }

.mk-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.mk-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 26px 24px; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; gap: 8px;
  transition: all .15s; cursor: pointer;
}
.mk-card:hover {
  transform: translateY(-3px); border-color: var(--brand);
  box-shadow: 0 12px 28px rgba(0,0,0,.07);
}
.mk-card-ico {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 10px;
}
.mk-ico-publish    { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.mk-ico-boost      { background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%); }
.mk-ico-broadcast  { background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); }
.mk-ico-leads      { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); }

.mk-card h2 { font-size: 17px; margin: 0; font-weight: 700; }
.mk-card p {
  margin: 0; flex: 1; color: var(--text-2);
  font-size: 13.5px; line-height: 1.55;
}
.mk-card-cta {
  margin-top: 10px; font-size: 13px; font-weight: 600;
  color: var(--brand);
}

.mk-section { margin-top: 38px; }
.mk-section-title {
  font-size: 12px; text-transform: uppercase; color: var(--text-3);
  letter-spacing: .4px; margin-bottom: 14px; font-weight: 700;
}
.mk-shortcuts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px;
}
.mk-shortcut {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 18px; text-decoration: none; color: var(--text);
  display: flex; align-items: center; gap: 14px;
  transition: all .12s;
}
.mk-shortcut:hover { border-color: var(--brand); background: #f8fafc; }
.mk-shortcut-ico { font-size: 22px; }
.mk-shortcut strong { display: block; font-size: 13.5px; }
.mk-shortcut small { color: var(--text-3); font-size: 12px; }

/* Back link nos subnavs */
.subnav-back {
  padding: 14px 22px 8px;
  border-bottom: 1px solid #f1f5f9;
}
.subnav-back-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-3); text-decoration: none; font-size: 12px;
  font-weight: 500;
}
.subnav-back-link:hover { color: var(--brand); }

/* =================== Página de Perfil =================== */
.profile-wrap { max-width: 860px; margin: 0 auto; padding: 36px 28px 64px; }

.profile-hero {
  display: flex; align-items: center; gap: 18px; margin-bottom: 28px;
}
.profile-hero-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #6366f1);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; letter-spacing: .5px;
  box-shadow: 0 4px 16px rgba(29, 78, 216, .25);
}
.profile-hero h1 { font-size: 26px; margin: 0 0 4px; font-weight: 700; }
.profile-hero p { margin: 0; color: var(--text-3); font-size: 13.5px; }

.profile-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 24px; padding: 0 4px;
}
.profile-tab {
  background: transparent; border: 0; padding: 12px 18px;
  font-size: 13.5px; font-weight: 600; color: var(--text-3);
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all .15s; border-radius: 8px 8px 0 0;
}
.profile-tab:hover { color: var(--text); background: #f8fafc; }
.profile-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.profile-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden;
}
.profile-card-head {
  padding: 22px 28px 16px; border-bottom: 1px solid #f1f5f9;
}
.profile-card-head h2 { font-size: 17px; margin: 0 0 4px; font-weight: 700; }
.profile-card-head p { margin: 0; color: var(--text-3); font-size: 13px; }

.profile-form {
  padding: 22px 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.profile-form > label {
  display: flex; flex-direction: column; gap: 6px;
}
.profile-form > label > span {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="password"] {
  height: 44px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; transition: border-color .12s;
}
.profile-form input:focus { outline: none; border-color: var(--brand); }
.profile-form input[disabled] { background: #f1f5f9; color: var(--text-3); cursor: not-allowed; }
.profile-hint { color: var(--text-3); font-size: 11.5px; margin-top: 4px; }

.profile-form-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding-top: 6px; border-top: 1px solid #f1f5f9; margin-top: 8px; padding-top: 16px;
}
.profile-msg {
  margin: 0; font-size: 12.5px; min-height: 18px;
}
.profile-msg-ok { color: var(--accent-green, #16a34a); }
.profile-msg-err { color: var(--accent-red, #dc2626); }

.profile-pref-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; gap: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.profile-pref-row:last-child { border-bottom: 0; }
.profile-pref-row strong { display: block; font-size: 14px; }
.profile-pref-row small { color: var(--text-3); font-size: 12.5px; }
.profile-pref-static { color: var(--text-2); font-size: 13.5px; font-weight: 500; }

.profile-switch {
  position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0;
}
.profile-switch input { opacity: 0; width: 0; height: 0; }
.profile-switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #cbd5e1; border-radius: 24px; transition: .2s;
}
.profile-switch-slider::before {
  position: absolute; content: ""; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.profile-switch input:checked + .profile-switch-slider { background: var(--brand); }
.profile-switch input:checked + .profile-switch-slider::before { transform: translateX(20px); }

/* ============================================================
   /atendimento — overrides v9 Enterprise (mesma cara da /equipe)
   ============================================================ */

/* SUBNAV (filtros à esquerda) */
.inbox-shell .subnav {
  background: var(--eq9-panel);
  border-right: 1px solid var(--eq9-border);
  padding: 18px 0;
}
.inbox-shell .subnav h1 {
  font-size: 18px; font-weight: 600; letter-spacing: -.3px;
  padding: 0 18px 14px; color: var(--eq9-text);
}
.inbox-shell .subnav-header { padding-right: 12px; }
.inbox-shell .subnav .nav-item {
  padding: 7px 18px;
  font-size: 13px; font-weight: 500;
  color: var(--eq9-text-2);
  border-left: 3px solid transparent;
  border-radius: 0;
  margin: 1px 0;
}
.inbox-shell .subnav .nav-item:hover { background: var(--eq9-bg); }
.inbox-shell .subnav .nav-item.active {
  background: var(--eq9-bg);
  border-left-color: var(--eq9-text);
  color: var(--eq9-text);
  font-weight: 600;
}
.inbox-shell .subnav .count {
  font-size: 12px; color: var(--eq9-text-4);
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.inbox-shell .subnav .nav-item.active .count { color: var(--eq9-text); }
.inbox-shell .subnav .group-label {
  font-size: 11px; font-weight: 600; color: var(--eq9-text-3);
  text-transform: uppercase; letter-spacing: .8px;
  padding: 14px 18px 6px;
}

/* INBOX LIST (lista de conversas) */
.inbox-shell .inbox-list {
  background: var(--eq9-bg);
  border-right: 1px solid var(--eq9-border);
}
.inbox-shell .inbox-list h1 {
  font-size: 17px; font-weight: 600; letter-spacing: -.3px;
  padding: 18px 20px 4px; color: var(--eq9-text);
  background: var(--eq9-panel); border-bottom: 1px solid var(--eq9-border);
  margin-bottom: 0;
}
.inbox-shell .inbox-tabs {
  background: var(--eq9-panel);
  border-bottom: 1px solid var(--eq9-border);
  padding: 0 20px;
  display: flex; gap: 4px;
}
.inbox-shell .inbox-tabs button {
  background: transparent; border: 0;
  padding: 10px 14px;
  font-size: 13px; font-weight: 500; color: var(--eq9-text-3);
  cursor: pointer; position: relative;
}
.inbox-shell .inbox-tabs button:hover { color: var(--eq9-text); }
.inbox-shell .inbox-tabs button.active { color: var(--eq9-text); font-weight: 600; }
.inbox-shell .inbox-tabs button.active::after {
  content: ''; position: absolute; bottom: -1px; left: 8px; right: 8px;
  height: 2px; background: var(--eq9-text); border-radius: 2px;
}
.inbox-shell .adv-filter-toggle {
  margin: 12px 20px; padding: 6px 12px;
  background: var(--eq9-panel); border: 1px solid var(--eq9-border);
  border-radius: 6px; font-size: 12.5px; font-weight: 500;
  color: var(--eq9-text-2); cursor: pointer;
}
.inbox-shell .adv-filter-toggle:hover { background: var(--eq9-bg); }
.inbox-shell .adv-filter-panel {
  margin: 0 20px 12px; padding: 14px;
  background: var(--eq9-panel); border: 1px solid var(--eq9-border);
  border-radius: 8px;
}
.inbox-shell .inbox-listing { padding: 4px 0; }
.inbox-shell .inbox-listing li {
  padding: 11px 14px;
  border-bottom: 1px solid var(--eq9-border-soft);
  background: var(--eq9-panel);
  margin: 0 12px 4px;
  border-radius: 8px;
  border: 1px solid var(--eq9-border-soft);
}
.inbox-shell .inbox-listing li:hover {
  background: var(--eq9-panel);
  border-color: var(--eq9-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}
.inbox-shell .inbox-listing li.active,
.inbox-shell .inbox-listing li.selected {
  background: var(--eq9-panel) !important;
  border-color: var(--eq9-text);
  box-shadow: 0 0 0 1px var(--eq9-text);
}
.inbox-shell .inbox-listing .name {
  font-weight: 600; font-size: 13.5px;
  color: var(--eq9-text); letter-spacing: -.1px;
}
.inbox-shell .inbox-listing .time {
  font-size: 11px; color: var(--eq9-text-4);
}
.inbox-shell .inbox-listing .preview {
  font-size: 12.5px; color: var(--eq9-text-3); line-height: 1.4;
}

/* CHAT PANEL (centro) */
.inbox-shell .chat-panel {
  background: var(--eq9-panel);
  border-right: 1px solid var(--eq9-border);
}
.inbox-shell .chat-empty-state h2 {
  font-size: 15px; color: var(--eq9-text-3); font-weight: 500;
}
.inbox-shell .chat-header {
  background: var(--eq9-panel);
  border-bottom: 1px solid var(--eq9-border);
  padding: 14px 20px;
}
.inbox-shell .chat-header .who strong {
  font-size: 15px; font-weight: 600; color: var(--eq9-text);
  letter-spacing: -.2px;
}
.inbox-shell .chat-header .who small {
  font-size: 12px; color: var(--eq9-text-3);
}
.inbox-shell .chat-actions .btn {
  padding: 6px 12px; border-radius: 6px;
  border: 1px solid var(--eq9-border); background: var(--eq9-panel);
  font-size: 12.5px; font-weight: 500; color: var(--eq9-text-2);
}
.inbox-shell .chat-actions .btn:hover { background: var(--eq9-bg); }
.inbox-shell #close-btn { color: var(--eq9-red); }
.inbox-shell #messages { background: var(--eq9-bg); }
.inbox-shell .tag-bar {
  background: var(--eq9-panel);
  border-bottom: 1px solid var(--eq9-border);
  padding: 8px 20px;
}

/* COMPOSER */
.inbox-shell .composer-wrap {
  background: var(--eq9-panel);
  border-top: 1px solid var(--eq9-border);
}
.inbox-shell .composer-tabs {
  background: var(--eq9-panel);
  border-bottom: 1px solid var(--eq9-border-soft);
  padding: 0 20px;
  display: flex; gap: 4px;
}
.inbox-shell .composer-tabs .ctab {
  background: transparent; border: 0;
  padding: 9px 12px;
  font-size: 12.5px; font-weight: 500; color: var(--eq9-text-3);
  cursor: pointer; position: relative;
}
.inbox-shell .composer-tabs .ctab.active { color: var(--eq9-text); font-weight: 600; }
.inbox-shell .composer-tabs .ctab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 8px; right: 8px;
  height: 2px; background: var(--eq9-text);
}
.inbox-shell #composer {
  padding: 12px 20px; display: flex; align-items: center; gap: 6px;
  background: var(--eq9-panel);
}
.inbox-shell #composer button {
  background: transparent; border: 0;
  width: 32px; height: 32px; border-radius: 6px;
  color: var(--eq9-text-3); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.inbox-shell #composer button:hover:not(:disabled) {
  background: var(--eq9-bg); color: var(--eq9-text);
}
.inbox-shell #composer button:disabled { opacity: .35; cursor: not-allowed; }
.inbox-shell #composer-input {
  flex: 1; height: 38px; padding: 0 14px;
  border: 1px solid var(--eq9-border); border-radius: 8px;
  background: var(--eq9-panel); font-size: 13.5px;
}
.inbox-shell #composer-input:focus {
  outline: none; border-color: var(--eq9-text);
}
.inbox-shell #composer .send-split { display: flex; gap: 1px; }
.inbox-shell #composer .send-split button[type="submit"] {
  background: var(--eq9-text); color: var(--eq9-panel);
  padding: 0 16px; width: auto; height: 38px;
  border-radius: 8px 0 0 8px;
  font-size: 13px; font-weight: 600;
}
.inbox-shell #composer .send-split button[type="submit"]:hover:not(:disabled) {
  background: #27272a;
}
.inbox-shell #composer .send-split .send-later-trigger {
  background: var(--eq9-text); color: var(--eq9-panel);
  width: 28px; height: 38px;
  border-radius: 0 8px 8px 0;
  border-left: 1px solid rgba(255,255,255,.15);
}

/* CONTACT PANEL (direita) */
.inbox-shell .contact-panel {
  background: var(--eq9-panel);
  border-left: 1px solid var(--eq9-border);
}
.inbox-shell .cp-empty {
  padding: 36px 24px; text-align: center;
  color: var(--eq9-text-3); font-size: 13px;
}
.inbox-shell .cp-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--eq9-border);
  text-align: center;
}
.inbox-shell .cp-header h2 {
  font-size: 16px; font-weight: 600; color: var(--eq9-text);
  margin: 10px 0 4px; letter-spacing: -.2px;
}
.inbox-shell .cp-header p {
  font-size: 12.5px; color: var(--eq9-text-3); margin: 0 0 8px;
}
.inbox-shell .cp-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--eq9-border-soft);
}
.inbox-shell .cp-section h3 {
  font-size: 11px; font-weight: 600; color: var(--eq9-text-3);
  text-transform: uppercase; letter-spacing: .6px;
  margin: 0 0 10px;
}
.inbox-shell .cp-info-row {
  display: flex; justify-content: space-between;
  padding: 4px 0; font-size: 12.5px;
}
.inbox-shell .cp-info-row > span:first-child { color: var(--eq9-text-3); }
.inbox-shell .cp-info-row > span:last-child { color: var(--eq9-text); font-weight: 500; }

/* === Supervisor monitor bar (aparece quando supervisor abre conversa de outro agente) === */
.sup-monitor-bar {
  background: linear-gradient(90deg, #fef3c7 0%, #fef3c7 35%, transparent 100%);
  border-bottom: 2px solid #d97706;
  padding: 10px 20px;
  font-size: 12.5px; color: #92400e;
  display: flex; align-items: center; gap: 12px;
  font-weight: 600;
}
.sup-monitor-bar .sup-mb-icon { font-size: 15px; }
.sup-monitor-bar strong { color: #78350f; font-weight: 700; }
.sup-monitor-bar .sup-mb-actions {
  margin-left: auto; display: flex; gap: 8px;
}
.sup-monitor-bar button {
  padding: 5px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--eq9-border);
  background: var(--eq9-panel); color: var(--eq9-text-2);
}
.sup-monitor-bar button:hover { background: var(--eq9-bg); }
.sup-monitor-bar .sup-mb-takeover {
  background: var(--eq9-text); color: var(--eq9-panel); border-color: var(--eq9-text);
}
.sup-monitor-bar .sup-mb-takeover:hover { background: #27272a; }
.sup-monitor-bar .sup-mb-whisper {
  background: #d97706; color: #fff; border-color: #d97706;
}
.sup-monitor-bar .sup-mb-whisper:hover { background: #b45309; }

/* Whisper composer mode (modo coaching) */
.inbox-shell .composer-tabs .ctab[data-mode="whisper"] { color: #d97706; }
.inbox-shell .composer-tabs .ctab[data-mode="whisper"].active { color: #b45309; }
.inbox-shell .composer-tabs .ctab[data-mode="whisper"].active::after { background: #d97706; }
.inbox-shell .composer-wrap.mode-whisper #composer-input {
  background: #fffbeb; border-color: #fbbf24;
}
.inbox-shell .composer-wrap.mode-whisper #composer .send-split button[type="submit"] {
  background: #d97706; color: #fff;
}
.inbox-shell .composer-wrap.mode-whisper #composer .send-split button[type="submit"]:hover:not(:disabled) {
  background: #b45309;
}

/* AI suggestion popover */
.ai-suggest-popover {
  position: absolute; bottom: 100%; left: 12px; right: 12px;
  margin-bottom: 8px;
  background: var(--eq9-panel); border: 1px solid var(--eq9-border);
  border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
  z-index: 10;
}
.ai-suggest-popover h3 {
  font-size: 11px; font-weight: 600; color: var(--eq9-text-3);
  text-transform: uppercase; letter-spacing: .5px;
  margin: 0 0 8px; display: flex; align-items: center; gap: 6px;
}
.ai-suggest-popover .ai-suggestion {
  padding: 10px 12px; border-radius: 8px;
  background: var(--eq9-bg); border: 1px solid var(--eq9-border-soft);
  margin-bottom: 6px; cursor: pointer;
  font-size: 13px; color: var(--eq9-text-2); line-height: 1.45;
}
.ai-suggest-popover .ai-suggestion:hover {
  background: var(--eq9-brand-soft); border-color: var(--eq9-brand);
}
.ai-suggest-popover .ai-actions {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--eq9-border-soft);
  font-size: 11.5px; color: var(--eq9-text-3);
}
.ai-suggest-popover .ai-close {
  background: transparent; border: 0; cursor: pointer;
  color: var(--eq9-text-3); font-size: 11.5px; font-weight: 600;
}

/* Coaching message bubble (mensagem privada do supervisor pro agente) */
.msg.coaching {
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  border-left: 3px solid #d97706;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 8px 0;
  max-width: 70%;
}
.msg.coaching .coaching-label {
  font-size: 10.5px; font-weight: 700;
  color: #b45309; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 4px;
  display: flex; align-items: center; gap: 5px;
}

/* === Wrap /atendimento v9: header + KPI strip + inbox === */
.atd-wrap {
  display: block;
  height: 100vh;
  background: #fafafa;
  min-width: 0;
}
.atd-header { padding: 14px 24px 0; }
.atd-header .eq9-h-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px;
}
.atd-header .eq9-h-left h1 {
  font-size: 19px; font-weight: 600; letter-spacing: -.3px;
  display: flex; align-items: center; gap: 9px; color: var(--eq9-text);
}
.atd-header .eq9-h-actions { display: flex; gap: 8px; }
.atd-kpis {
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  padding: 0;
  margin: 0 -24px 0;
  background: var(--eq9-border);
  border-top: 1px solid var(--eq9-border);
  border-bottom: 1px solid var(--eq9-border);
}
.atd-kpis .eq9-kpi { padding: 12px 18px; background: var(--eq9-panel); }
.atd-kpis .eq9-kpi-lbl { font-size: 11px; }
.atd-kpis .eq9-kpi-val {
  font-size: 22px; font-weight: 600; letter-spacing: -.5px;
  color: var(--eq9-text); margin-top: 2px;
}
.atd-wrap .inbox-shell {
  height: auto;
  min-height: 0;
  overflow: hidden;
}

/* ========================================================================
   V6 — Refresh visual: paleta, dossiê, quick-actions, spell-block-modal
   Coexiste com o CSS legado; só sobrescreve onde explicitamente marcado.
   ======================================================================== */

:root {
  --v6-primary-blue: #1e3a8a;
  --v6-primary-blue-light: #eef2ff;
  --v6-primary-blue-lighter: #c7d2fe;
  --v6-bg-white: #ffffff;
  --v6-bg: #fafafa;
  --v6-panel: #ffffff;
  --v6-bg-lighter-gray: #f9fafb;
  --v6-bg-lightest-gray: #f3f4f6;
  --v6-text: #18181b;
  --v6-text-dark: #1f2937;
  --v6-text-2: #475569;
  --v6-text-3: #64748b;
  --v6-text-medium: #6b7280;
  --v6-text-light: #9ca3af;
  --v6-border: #ececec;
  --v6-border-light: #e5e7eb;
  --v6-border-lighter: #f3f4f6;
  --v6-border-dashed: #cbd5e1;
  --v6-accent: #1e3a8a;
  --v6-status-green: #10b981;
  --v6-tag-sales-bg: #dbeafe; --v6-tag-sales-text: #1e40af;
  --v6-tag-vip-bg: #fef3c7; --v6-tag-vip-text: #92400e;
  --v6-tag-loyalty-bg: #d1fae5; --v6-tag-loyalty-text: #065f46;
  --v6-tag-recurrent-bg: #ede9fe; --v6-tag-recurrent-text: #5b21b6;
  --v6-shadow-card: 0 1px 2px rgba(0,0,0,0.04);
  --v6-shadow-popover: 0 8px 24px rgba(0,0,0,0.12);
  --v6-radius-sm: 6px;
  --v6-radius-md: 10px;
  --v6-radius-lg: 14px;
  --v6-radius-pill: 999px;
}

/* === Wrap ocupa altura inteira sem header v9 === */
.atd-wrap {
  display: block; height: 100vh; background: var(--v6-bg-light-gray, #fafafa);
}
.atd-wrap .inbox-shell.v6-shell-grid {
  grid-template-columns: 300px 1fr 480px !important;
  height: 100vh;
  background: var(--v6-bg-light-gray, #fafafa);
}

/* === LISTA V6 (esquerda) === */
.atd-wrap .inbox-shell.v6-shell-grid .inbox-list.v6-list-col {
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.v6-list-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f3f4f6;
}
.v6-list-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #1f2937;
  margin-bottom: 10px;
}
.v6-list-title > span:first-child { flex: 1; }
.v6-list-count {
  background: #1e3a8a; color: #fff;
  font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 600;
}
.v6-list-head-acts { display: flex; gap: 4px; margin-left: 4px; }
.v6-list-head-acts .iconbtn {
  width: 22px; height: 22px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: #6b7280; cursor: pointer;
  border-radius: 4px;
}
.v6-list-head-acts .iconbtn:hover { background: #f3f4f6; color: #1e3a8a; }

.v6-search {
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 7px 10px; font-size: 12px;
  display: flex; gap: 6px; align-items: center; color: #9ca3af;
}
.v6-search-ico { font-size: 11px; }
.v6-search input {
  background: transparent; border: none; outline: none;
  font-size: 12px; flex: 1; color: #1f2937;
}

/* CHIPS HORIZONTAIS V6 */
.v6-chips {
  display: flex; flex-direction: row; gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
}
.v6-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #6b7280;
  cursor: pointer;
  border: 0;
  font-weight: 600;
}
.v6-chip:hover { background: #e5e7eb; color: #1f2937; }
.v6-chip.is-active {
  background: #1e3a8a;
  color: #fff;
  border: 0;
}

.v6-legacy-nav, .v6-hidden-tabs { display: none !important; }
.atd-wrap .inbox-shell.v6-shell-grid .inbox-list.v6-list-col > h1 { display: none; }
.atd-wrap .inbox-shell.v6-shell-grid .inbox-list.v6-list-col .adv-filter-toggle { display: none; }
.atd-wrap .inbox-shell.v6-shell-grid .inbox-list.v6-list-col .inbox-listing { flex: 1; overflow-y: auto; }

/* SKELETON DOSSIÊ V6 (mostrado quando nenhuma conv selecionada) */
.v6-doss-empty {
  padding: 0;
  background: #fff;
  overflow-y: auto;
  height: 100%;
  text-align: left;
  color: #6b7280;
  font-size: 12px;
}
.v6-doss-skeleton-hero {
  padding: 22px 22px 18px;
  border-bottom: 1px solid #f3f4f6;
  text-align: center;
  background: linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);
}
.v6-doss-skel-photo {
  width: 78px; height: 78px; border-radius: 50%;
  background: #e5e7eb; color: #9ca3af;
  font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(30,58,138,0.08);
}
.v6-doss-skel-name { font-size: 16px; font-weight: 700; color: #9ca3af; margin-bottom: 3px; }
.v6-doss-skel-sub { font-size: 11.5px; color: #9ca3af; margin-bottom: 12px; }
.v6-doss-skel-stats {
  display: flex; gap: 8px; justify-content: center;
}
.v6-doss-skel-stats > div {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 7px;
  padding: 8px 12px; min-width: 78px; text-align: center;
}
.v6-doss-skel-stats b { display: block; font-size: 14px; font-weight: 700; color: #cbd5e1; }
.v6-doss-skel-stats span { display: block; font-size: 9px; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.3px; }

.v6-doss-skel-sec { border-bottom: 1px solid #f3f4f6; }
.v6-doss-skel-sec-head {
  padding: 13px 22px;
  display: flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 700; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.v6-doss-skel-ico {
  width: 22px; height: 22px; border-radius: 5px;
  background: #f3f4f6; color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.v6-doss-skel-sec-body { padding: 0 22px 16px; }
.v6-doss-skel-row {
  display: flex; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px dashed #f3f4f6;
  font-size: 12px;
}
.v6-doss-skel-row span { color: #9ca3af; }
.v6-doss-skel-row i { color: #cbd5e1; font-style: normal; }

/* === Lista de conversas V6 — só restyling, sem mexer no markup gerado === */
.atd-wrap .inbox-shell.v6-shell-grid .inbox-list { background: var(--v6-panel); border-right: 1px solid var(--v6-border); }
.atd-wrap .inbox-shell.v6-shell-grid #conv-list > li {
  padding: 10px 14px;
  border-bottom: 1px solid var(--v6-border-lighter);
}
.atd-wrap .inbox-shell.v6-shell-grid #conv-list > li:hover {
  background: var(--v6-bg-lighter-gray);
}
.atd-wrap .inbox-shell.v6-shell-grid #conv-list > li.active {
  background: var(--v6-primary-blue-light);
  border-left: 3px solid var(--v6-primary-blue);
}

/* === V6 quick-actions row (acima do composer) === */
.v6-quick-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px 12px 6px;
  border-bottom: 1px solid var(--v6-border-lighter);
  background: var(--v6-bg-lighter-gray);
}
.v6-qa {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--v6-panel);
  border: 1px solid var(--v6-border-light);
  border-radius: var(--v6-radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--v6-text-dark);
  cursor: pointer;
  transition: all .12s ease;
}
.v6-qa:hover {
  background: var(--v6-primary-blue-light);
  border-color: var(--v6-primary-blue-lighter);
  color: var(--v6-primary-blue);
}
.v6-qa-ico { font-size: 13px; }

/* === V6 Insert-data popover === */
.v6-insert-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 12px;
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--v6-panel);
  border: 1px solid var(--v6-border-light);
  border-radius: var(--v6-radius-md);
  box-shadow: var(--v6-shadow-popover);
  z-index: 200;
  padding: 6px;
}
.v6-insert-pop-head {
  font-size: 11px; font-weight: 600; color: var(--v6-text-medium);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 6px 10px;
  border-bottom: 1px solid var(--v6-border-lighter);
  margin-bottom: 4px;
}
.v6-insert-pop ul { list-style: none; margin: 0; padding: 0; }
.v6-insert-pop li {
  padding: 8px 10px;
  font-size: 12.5px;
  border-radius: var(--v6-radius-sm);
  cursor: pointer;
  display: flex; justify-content: space-between; gap: 10px;
}
.v6-insert-pop li:hover { background: var(--v6-primary-blue-light); }
.v6-insert-pop li b { color: var(--v6-text-medium); font-weight: 500; font-size: 11px; }
.v6-insert-pop li span { color: var(--v6-text-dark); font-weight: 500; }

/* ========================================================================
   V6 DOSSIÊ — painel direito (440px)
   ======================================================================== */
.contact-panel.v6-dossier {
  background: var(--v6-panel);
  border-left: 1px solid var(--v6-border);
  overflow-y: auto;
}
.v6-doss-content { padding: 0 0 24px; }

/* HERO */
.v6-doss-hero {
  padding: 24px 20px 18px;
  text-align: center;
  border-bottom: 1px solid var(--v6-border-lighter);
  background: linear-gradient(180deg, var(--v6-primary-blue-light) 0%, var(--v6-bg-white) 100%);
}
.v6-doss-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--v6-primary-blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(30,58,138,0.18);
}
.v6-doss-name {
  font-size: 17px; font-weight: 700;
  color: var(--v6-text-dark);
  margin: 4px 0 6px;
}
.v6-doss-sub {
  font-size: 12px; color: var(--v6-text-medium); margin: 0 0 10px;
}
.v6-doss-sub strong { color: var(--v6-text-dark); font-weight: 600; }
.v6-doss-sep { margin: 0 6px; opacity: .6; }
.v6-doss-edit {
  display: inline-block;
  font-size: 11.5px;
  color: var(--v6-primary-blue);
  text-decoration: none;
  margin-top: 4px;
}
.v6-doss-edit:hover { text-decoration: underline; }

/* QUICK-STATS */
.v6-doss-quickstats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 14px 0 4px;
}
.v6-doss-stat {
  background: var(--v6-bg-white);
  border: 1px solid var(--v6-border-light);
  border-radius: var(--v6-radius-md);
  padding: 10px 6px;
  box-shadow: var(--v6-shadow-card);
}
.v6-doss-stat-val {
  font-size: 14px; font-weight: 700;
  color: var(--v6-primary-blue);
  letter-spacing: -.2px;
}
.v6-doss-stat-lbl {
  font-size: 10px; font-weight: 600;
  color: var(--v6-text-medium);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 2px;
}

/* Section / accordion */
.v6-doss-section {
  border-bottom: 1px solid var(--v6-border-lighter);
}
.v6-doss-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  font-size: 12px; font-weight: 700;
  color: var(--v6-text-dark);
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}
.v6-doss-section-head:hover { background: var(--v6-bg-lighter-gray); }
.v6-doss-caret {
  font-size: 11px; color: var(--v6-text-light);
  transition: transform .15s ease;
}
.v6-doss-section.is-open .v6-doss-caret { transform: rotate(180deg); }
.v6-doss-section-body {
  display: none;
  padding: 4px 18px 14px;
}
.v6-doss-section.is-open .v6-doss-section-body { display: block; }

/* Badges (tags grandes) */
.v6-doss-badges {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.v6-doss-badge {
  padding: 4px 10px;
  border-radius: var(--v6-radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.v6-doss-badge.b-vip { background: var(--v6-tag-vip-bg); color: var(--v6-tag-vip-text); }
.v6-doss-badge.b-loyalty { background: var(--v6-tag-loyalty-bg); color: var(--v6-tag-loyalty-text); }
.v6-doss-badge.b-recurrent { background: var(--v6-tag-recurrent-bg); color: var(--v6-tag-recurrent-text); }
.v6-doss-badge.b-sales { background: var(--v6-tag-sales-bg); color: var(--v6-tag-sales-text); }

.v6-doss-tags-chips { display: flex; gap: 4px; flex-wrap: wrap; }

/* Dados pessoais grid */
.v6-doss-personal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.v6-doss-field { font-size: 12px; }
.v6-doss-field-full { grid-column: 1 / -1; }
.v6-doss-field label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--v6-text-medium);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
}
.v6-doss-field span {
  font-size: 12.5px;
  color: var(--v6-text-dark);
  word-break: break-word;
}
.v6-doss-field span.v6-mocked { color: var(--v6-text-light); font-style: italic; }

/* Timeline jornada — pontilhada com pontos */
.v6-doss-timeline {
  position: relative;
  padding: 4px 0 4px 20px;
  margin-bottom: 8px;
}
.v6-doss-timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 0;
  border-left: 2px dashed var(--v6-border-dashed);
}
.v6-doss-tl-item {
  position: relative;
  padding: 4px 0 10px;
  font-size: 12px;
}
.v6-doss-tl-item::before {
  content: '';
  position: absolute;
  left: -19px; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--v6-primary-blue);
  border: 2px solid var(--v6-bg-white);
  box-shadow: 0 0 0 1px var(--v6-primary-blue-lighter);
}
.v6-doss-tl-date { font-size: 10.5px; color: var(--v6-text-medium); font-weight: 600; }
.v6-doss-tl-title { font-size: 12.5px; color: var(--v6-text-dark); font-weight: 500; }
.v6-doss-tl-desc { font-size: 11.5px; color: var(--v6-text-medium); margin-top: 1px; }

/* Estado vazio do dossiê */
.v6-doss-empty {
  padding: 60px 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--v6-text-medium);
}

/* ========================================================================
   V6 — Spell block modal
   ======================================================================== */
.spell-block-modal .v6-spell-issues {
  list-style: none;
  margin: 0; padding: 0;
  max-height: 320px; overflow-y: auto;
}
.spell-block-modal .v6-spell-issues li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  margin: 6px 0;
  background: #fef3c7;
  border-left: 3px solid #d97706;
  border-radius: var(--v6-radius-sm);
  font-size: 13px;
}
.spell-block-modal .v6-spell-issues li mark {
  background: #fee2e2; color: #991b1b;
  padding: 1px 5px; border-radius: 3px;
  font-weight: 600; text-decoration: line-through;
}
.spell-block-modal .v6-spell-issues li b {
  color: #065f46;
  font-weight: 700;
}
.spell-block-modal .v6-spell-issues li .arrow {
  color: var(--v6-text-medium);
  font-weight: 700;
}

