.kanban-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kanban-modal {
  background: #111b21;
  border: 1px solid #2a3942;
  border-radius: 14px;
  padding: 1.25rem;
  width: min(420px, 92vw);
}
.kanban-modal h3 { margin-bottom: 0.75rem; font-size: 1rem; }
.kanban-modal select,
.kanban-modal input,
.kanban-modal textarea {
  width: 100%;
  padding: 0.55rem;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  border: 1px solid #2a3942;
  background: #1f2c34;
  color: #e9edef;
  font-size: 0.85rem;
}
.kanban-modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }

.sla-badge {
  font-size: 0.62rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
}
.sla-ok { background: #052e16; color: #86efac; }
.sla-sem_resposta { background: #422006; color: #fbbf24; }
.sla-atencao { background: #451a03; color: #fdba74; }
.sla-critico { background: #450a0a; color: #fca5a5; animation: sla-pulse 1.5s infinite; }
.prio-baixa { color: #8696a0; }
.prio-media { color: #53bdeb; }
.prio-alta { color: #fbbf24; }
.prio-critica { color: #f87171; font-weight: 700; }

@keyframes sla-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.conv-card.sla-alert { border-left: 3px solid #f87171; }
.conv-card.sla-warn { border-left: 3px solid #fbbf24; }
.conv-sla-line { font-size: 0.58rem; margin-top: 0; display: inline-flex; gap: 0.2rem; flex-wrap: wrap; align-items: center; }
.conv-card .sla-badge { font-size: 0.54rem; padding: 0.08rem 0.3rem; }
.conv-card .prio-baixa,
.conv-card .prio-media,
.conv-card .prio-alta,
.conv-card .prio-critica { font-size: 0.56rem; }

.checklist-block { margin-top: 0.5rem; }
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.8rem;
}
.checklist-progress {
  height: 6px;
  background: #2a3942;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.checklist-progress span {
  display: block;
  height: 100%;
  background: #00a884;
  transition: width 0.2s;
}

.doc-list { display: flex; flex-direction: column; gap: 0.5rem; }
.doc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.65rem;
  background: #1f2c34;
  border-radius: 8px;
  font-size: 0.78rem;
}
.doc-upload-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.doc-upload-row select,
.doc-upload-row input[type="file"] {
  font-size: 0.75rem;
  flex: 1;
  min-width: 120px;
}

.lead-page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.lead-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.lead-page-tabs button {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #2a3942;
  background: #111b21;
  color: #8696a0;
  cursor: pointer;
  font-size: 0.8rem;
}
.lead-page-tabs button.active {
  background: #00a884;
  border-color: #00a884;
  color: #fff;
}
.lead-tab-content .card { margin-bottom: 1rem; }
.lead-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.lead-info-grid .item label {
  display: block;
  font-size: 0.68rem;
  color: #8696a0;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}
.lead-msg-list { max-height: 420px; overflow-y: auto; }
.lead-msg-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #2a3942;
  font-size: 0.82rem;
}
.lead-msg-item.cliente { color: #e9edef; }
.lead-msg-item.atendente { color: #53bdeb; }

.lead-doc-section {
  margin-bottom: 1rem;
}

.lead-doc-section h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.lead-conv-grid {
  margin-top: 0.35rem;
}

.lead-conv-grid .files-card-meta select {
  width: 100%;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  padding: 0.3rem;
  border-radius: 6px;
  border: 1px solid #2a3942;
  background: #111b21;
  color: #e9edef;
}

.alerts-widget {
  background: #111b21;
  border: 1px solid #2a3942;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}
.alerts-widget-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.alerts-widget-head h3 { font-size: 0.95rem; margin: 0; }
.alerts-total {
  font-size: 0.75rem;
  color: #fbbf24;
  background: #422006;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}
.alert-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.75rem; }
.alert-chip {
  font-size: 0.72rem;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #2a3942;
  background: #1f2c34;
  color: #8696a0;
  cursor: pointer;
}
.alert-chip.active { border-color: #00a884; color: #00a884; background: rgba(0, 168, 132, 0.12); }
.alert-chip.has-items .n { color: #fbbf24; }
.alert-chip .n { font-weight: 700; margin-left: 0.15rem; }
.alert-lead-row {
  display: block;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: #e9edef;
  margin-bottom: 0.25rem;
}
.alert-lead-row:hover { background: #1f2c34; }
.alert-lead-row strong { display: block; font-size: 0.82rem; }
.alert-lead-row small { color: #8696a0; font-size: 0.72rem; }

.tpl-stage-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.tpl-stage-tabs button {
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #2a3942;
  background: #111b21;
  color: #8696a0;
  cursor: pointer;
  font-size: 0.75rem;
}
.tpl-stage-tabs button.active { background: #00a884; color: #fff; border-color: #00a884; }
.tpl-card {
  background: #1f2c34;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  border: 1px solid #2a3942;
  margin-bottom: 0.5rem;
}
.tpl-card h4 { font-size: 0.88rem; margin-bottom: 0.35rem; }
.tpl-card code { color: #00a884; font-size: 0.75rem; }
.tpl-pick-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: 6px;
  border: 1px solid #2a3942;
  background: #1f2c34;
  color: #e9edef;
  font-size: 0.75rem;
  cursor: pointer;
}
.tpl-pick-btn:hover { border-color: #00a884; }
.panel-templates { margin-top: 0.35rem; }
.atend-card-alerts { margin-top: 0.35rem; display: flex; gap: 0.25rem; flex-wrap: wrap; }

/* Sidebar: estilos em crm-nav.css (.nav-context, .franchise-select) */
.conv-unit-line { font-size: 0.65rem; color: #8696a0; margin-top: 0.15rem; }

.sup-filters h3 { margin-bottom: 0.75rem; font-size: 0.9rem; }
.sup-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
}
.sup-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: #8696a0;
}
.sup-filter-grid select {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #2a3942;
  background: #1f2c34;
  color: #e9edef;
  font-size: 0.8rem;
}
.sup-table tbody tr:nth-child(1) { background: rgba(0, 168, 132, 0.08); }
.sup-motivos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.sup-motivo-unit {
  background: #1f2c34;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  border: 1px solid #2a3942;
}
.sup-motivo-unit h4 { font-size: 0.85rem; margin-bottom: 0.5rem; color: #00a884; }
.sup-motivo-unit ul { list-style: none; }
.sup-motivo-unit li {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid #2a3942;
}
.sup-lead-list { list-style: none; max-height: 320px; overflow-y: auto; }
.sup-lead-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid #2a3942;
  font-size: 0.8rem;
}
.sup-lead-list a { color: #53bdeb; text-decoration: none; }

.timeline-full { list-style: none; padding: 0; margin: 0; }
.timeline-full .timeline-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #2a3942;
}
.timeline-full .timeline-icon { font-size: 1.25rem; flex-shrink: 0; }
.timeline-full .timeline-body { flex: 1; min-width: 0; }
.timeline-full .timeline-detail {
  font-size: 0.8rem;
  color: #c5cdd3;
  margin: 0.2rem 0;
}
.timeline-full .timeline-meta { font-size: 0.72rem; color: #8696a0; }
.audit-table td { font-size: 0.8rem; vertical-align: top; }
.audit-table td small { color: #8696a0; }
.meta-progress {
  height: 6px;
  background: #2a3942;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.15rem 0;
  min-width: 80px;
}
.meta-bar {
  display: block;
  height: 100%;
  background: #53bdeb;
  border-radius: 4px;
}
.meta-bar-ok { background: #00a884; }
.meta-bar-warn { background: #fbbf24; }
.metas-alerta-banner {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid #fbbf24;
  color: #fde68a;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.meta-hist-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #2a3942;
}
.meta-hist-block h4 { font-size: 0.9rem; color: #00a884; margin-bottom: 0.5rem; }
.data-table tr.row-warn { background: rgba(251, 191, 36, 0.06); }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}
.modal-card {
  background: #111b21;
  border: 1px solid #2a3942;
  border-radius: 12px;
  padding: 1.25rem;
  width: 100%;
}
.sup-filter-grid input[type="text"] {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #2a3942;
  background: #1f2c34;
  color: #e9edef;
  font-size: 0.8rem;
}
