.context-section {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.context-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink);
}

.context-item {
  display: flex;
  flex-direction: column;
  padding: 7px 0;
}

.context-item small {
  color: var(--muted);
}

.module-page {
  padding: 30px;
  max-width: none;
  margin: 0;
}

.module-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.module-header h1 {
  margin: 3px 0;
  font-size: 28px;
  color: var(--ink);
}

.module-card {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--soft);
}

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

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 8px;
}

.inline-form select,
.filters select {
  border: 1px solid var(--field-border, var(--line));
  border-radius: 7px;
  padding: 7px;
  background: var(--field-bg, var(--surface));
  color: var(--field-text, var(--ink));
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 45px;
}

@media (max-width: 700px) {
  .module-page {
    padding: 14px;
  }
  .module-header {
    align-items: start;
    flex-direction: column;
  }
  .module-card {
    border-radius: 8px;
  }
}

/* ============ Super Admin — telas de nível de servidor ============ */
.conversation-list.wide.superadmin {
  margin: 0;
  max-width: none;
  border-radius: 16px;
}

.conversation-list.wide.superadmin .list-heading {
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-elevated);
  border-radius: 16px 16px 0 0;
}

.conversation-list.wide.superadmin .list-heading h1 {
  color: var(--ink);
}

.conversation-list.wide.superadmin .section-title {
  margin: 20px 26px 10px;
  padding-left: 10px;
  border-left: 3px solid var(--brand-600);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.conversation-list.wide.superadmin .section-title small {
  font-size: 0.8em;
  font-weight: 600;
  color: var(--muted);
}

.conversation-list.wide.superadmin .metric-grid {
  padding: 0 26px 12px;
}

.conversation-list.wide.superadmin .metric {
  text-align: left;
  padding: 18px 20px;
}

.conversation-list.wide.superadmin .metric strong {
  font-size: 26px;
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.conversation-list.wide.superadmin .metric span {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-soft);
}

.conversation-list.wide.superadmin a.metric:hover,
.conversation-list.wide.superadmin a.metric:focus-visible {
  border-color: var(--brand-600);
  outline: none;
}

.conversation-list.wide.superadmin .metric-link i {
  display: block;
  font-size: 26px;
  line-height: 1;
  color: var(--brand-600);
  margin-bottom: 8px;
}

.conversation-list.wide.superadmin > .help-text {
  margin: 0 26px 18px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.conversation-list.wide.superadmin code {
  display: inline-block;
  max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--ink-soft);
  white-space: normal;
  overflow-wrap: anywhere;
}

.conversation-list.wide.superadmin pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}

.conversation-list.wide.superadmin .metric.preset-card {
  display: block;
  width: auto;
  margin: 0 26px 16px;
  padding: 16px 20px 18px;
  text-align: left;
}

.conversation-list.wide.superadmin .preset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.conversation-list.wide.superadmin .preset-head strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.conversation-list.wide.superadmin .preset-card .table-scroll {
  margin: 12px 0 0;
}

.conversation-list.wide.superadmin details {
  margin-top: 12px;
}

.conversation-list.wide.superadmin details summary {
  cursor: pointer;
}

@media (min-width: 641px) {
  .conversation-list.wide.superadmin .table-scroll {
    margin: 0 26px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: var(--surface-elevated);
  }

  .conversation-list.wide.superadmin .data-table th,
  .conversation-list.wide.superadmin .data-table td {
    white-space: normal;
    vertical-align: top;
    overflow-wrap: anywhere;
  }

  .conversation-list.wide.superadmin .data-table th {
    padding: 11px 18px;
    color: var(--ink-soft);
    background: var(--soft);
  }

  .conversation-list.wide.superadmin .data-table td {
    padding: 12px 18px;
  }
}

@media (max-width: 640px) {
  .conversation-list.wide.superadmin .list-heading {
    padding: 16px 14px;
  }

  .conversation-list.wide.superadmin .section-title {
    margin: 16px 14px 8px;
  }

  .conversation-list.wide.superadmin .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 14px 8px;
  }

  .conversation-list.wide.superadmin .metric {
    padding: 14px 14px;
  }

  .conversation-list.wide.superadmin .metric strong {
    font-size: 20px;
  }

  .conversation-list.wide.superadmin .metric.preset-card,
  .conversation-list.wide.superadmin > .help-text {
    margin-right: 14px;
    margin-left: 14px;
  }

  .conversation-list.wide.superadmin .table-scroll {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .conversation-list.wide.superadmin .preset-card .table-scroll {
    margin: 10px 0 0;
  }
}

/* ============ Super Admin — Realtime (LEDs + sparklines estilo sidekick) ============ */
.rt-wrap {
  margin: 0 26px 6px;
}

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

.rt-card {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.rt-card header {
  display: flex;
  align-items: center;
  gap: 9px;
}

.rt-card header i {
  font-size: 20px;
}

.rt-card header strong {
  font-size: 13px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}

.rt-badge {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 13px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}

.rt-card-a header i { color: #818cf8; }
.rt-card-b header i { color: #22d3ee; }
.rt-card-c header i { color: #fbbf24; }

.rt-card-a .rt-badge { color: #3730a3; background: #eef2ff; border-color: #c7d2fe; }
.rt-card-b .rt-badge { color: #0e7490; background: #ecfeff; border-color: #a5f3fc; }
.rt-card-c .rt-badge { color: #92400e; background: #fffbeb; border-color: #fde68a; }

.rt-led-area {
  padding: 2px 0;
}

.led-meter {
  display: flex;
  gap: 3px;
  height: 14px;
  width: 100%;
}

.led-meter span {
  flex: 1 1 0;
  height: 100%;
  border-radius: 2px;
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.led-meter span.z-a.on { background: #22c55e; box-shadow: 0 0 8px 0 rgba(34, 197, 94, 0.55); }
.led-meter span.z-b.on { background: #f59e0b; box-shadow: 0 0 8px 0 rgba(245, 158, 11, 0.55); }
.led-meter span.z-c.on { background: #ef4444; box-shadow: 0 0 8px 0 rgba(239, 68, 68, 0.6); }

.led-meter span.edge {
  animation: rt-glow 1s ease-in-out infinite;
}

@keyframes rt-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

.rt-sub {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.rt-sub span:first-child {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.rt-sub span:last-child {
  font-size: 12px;
  color: var(--ink-soft);
  min-width: 0;
  overflow-wrap: anywhere;
}

.rt-spark {
  width: 100%;
  height: 56px;
  display: block;
  border-radius: 8px;
  background: var(--soft);
}

.rt-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 2px 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.rt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.rt-dot.on {
  background: #22c55e;
  box-shadow: 0 0 8px 0 rgba(34, 197, 94, 0.8);
  animation: rt-blink 1.4s ease-in-out infinite;
}

@keyframes rt-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 900px) {
  .rt-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .rt-wrap {
    margin: 0 14px 4px;
  }
}

/* ============ Agenda (2ª coluna das conversas) ============ */
.chatwoot-index {
  grid-template-columns: 310px 286px minmax(0, 1fr);
}
.agenda-column {
  border-right: 1px solid var(--chatforce-line);
  background: var(--chatforce-panel);
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.agenda-header {
  padding: 16px 14px 10px;
  border-bottom: 1px solid var(--chatforce-line);
}
.agenda-header .eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.agenda-header h2 {
  margin: 2px 0 0;
  font-size: 16px;
  color: var(--ink);
}
.agenda-overdue-count {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.1);
  border-radius: 999px;
  padding: 2px 8px;
}
.agenda-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px 10px 20px;
}
.agenda-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 10px 4px 4px;
}
.agenda-group-title.overdue {
  color: #b91c1c;
}
.agenda-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.agenda-item:hover,
.agenda-item:focus-visible {
  background: var(--chatforce-hover, rgba(0, 0, 0, 0.045));
}
.agenda-item.overdue .agenda-time {
  color: #b91c1c;
  font-weight: 700;
}
.agenda-time {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.agenda-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.agenda-copy strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda-copy small {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda-item > .ph {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
}
.agenda-empty {
  padding: 26px 10px;
  text-align: center;
}
/* Agenda de retornos (página dedicada) */
.agenda-page .agenda-column {
  border-right: 0;
  height: auto;
  max-height: none;
  overflow: visible;
}
.agenda-page .agenda-list {
  overflow: visible;
}
@media (max-width: 1100px) {
  .chatwoot-index {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .agenda-column {
    display: none;
  }
}

/* ============ Tickets ============ */
.module-header {
  align-items: center;
  flex-wrap: wrap;
}
.module-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.module-header-actions .filters {
  margin: 0;
}
.module-page.narrow {
  max-width: 860px;
  margin: 0 auto;
}
.ticket-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}
.ticket-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ticket-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.module-card-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  font-size: 13px;
}
.detail-list dt {
  color: var(--muted);
  font-weight: 600;
}
.detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.detail-list .inline-form {
  margin-top: 6px;
}
.ticket-link {
  color: var(--blue, #2563eb);
  text-decoration: none;
}
.ticket-link:hover {
  text-decoration: underline;
}
.ticket-replies {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.ticket-reply {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
}
.ticket-reply.mine {
  background: color-mix(in srgb, var(--surface-elevated) 70%, var(--blue, #2563eb) 4%);
}
.ticket-reply-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ticket-reply-head strong {
  font-size: 13px;
}
.ticket-reply-head time {
  font-size: 11px;
  color: var(--muted);
}
.ticket-reply-delete {
  margin-left: auto;
}
.ticket-reply-delete button {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
}
.ticket-reply-delete button:hover {
  color: #b91c1c;
}
.ticket-reply-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}
.ticket-reply-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.ticket-reply-actions .primary-button,
.ticket-reply-actions .secondary-button {
  margin: 0;
}
.ticket-file-list {
  font-size: 12px;
  color: var(--muted);
  flex: 1;
}
.ticket-attachments {
  margin-top: 8px;
}
.ticket-attachment-form {
  margin-top: 10px;
}
.ticket-attachment-form .secondary-button,
.ticket-attachment-form .primary-button {
  margin: 0;
}

/* Envio de anexos: arrastar, colar ou escolher arquivos. */
.upload-zone {
  position: relative;
}
.upload-zone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.upload-zone__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 108px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.upload-zone__drop:hover,
.upload-zone__drop:focus-visible {
  border-color: var(--blue, #2563eb);
  outline: none;
}
.upload-zone__drop.is-dragging {
  border-color: var(--blue, #2563eb);
  border-style: solid;
  background: color-mix(in srgb, var(--surface) 88%, var(--blue, #2563eb) 12%);
}
.upload-zone__drop.is-filled {
  min-height: 0;
  padding: 10px 14px;
  flex-direction: row;
  justify-content: flex-start;
}
.upload-zone__drop > i {
  font-size: 20px;
  color: var(--blue, #2563eb);
}
.upload-zone__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.upload-zone__hint {
  font-size: 11.5px;
  color: var(--muted);
}
.upload-zone--compact .upload-zone__drop {
  min-height: 76px;
  padding: 12px;
}
.upload-zone__message {
  margin: 6px 0 0;
  font-size: 12px;
  color: #b91c1c;
}

.upload-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.upload-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.upload-list__thumb {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  color: var(--muted);
}
.upload-list__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-list__thumb--icon i {
  font-size: 16px;
}
.upload-list__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.upload-list__meta strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-list__meta small {
  font-size: 11px;
  color: var(--muted);
}
.upload-list__remove {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 6px;
}
.upload-list__remove:hover {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.08);
}

/* Lista de anexos já gravados. */
.attachment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.attachment-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.attachment-list__preview {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  display: block;
}
.attachment-list__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.attachment-list__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.attachment-list__icon i {
  font-size: 18px;
}
.attachment-list__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.attachment-list__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-list__name:hover {
  text-decoration: underline;
}
.attachment-list__info {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-list__actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.attachment-list__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}
.attachment-list__action:hover {
  background: var(--surface-elevated);
  color: var(--ink);
}
.attachment-list__action--danger:hover {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.08);
}

/* Prazo de atendimento (SLA) de tickets e tarefas. */
.deadline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.deadline small {
  font-weight: 500;
  color: var(--muted);
}
.deadline__date {
  font-size: 11px;
}
.deadline--ok,
.deadline--pending {
  color: #047857;
}
.deadline--due_soon {
  color: #b45309;
}
.deadline--overdue,
.deadline--breached {
  color: #b91c1c;
}
.deadline--met,
.deadline--done {
  color: #047857;
}
.deadline--none,
.deadline--no_date {
  color: var(--muted);
}

.sla-panel__headline {
  margin-bottom: 10px;
}
.sla-flag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
}
.sla-flag--ok {
  color: #047857;
}
.sla-flag--pending {
  color: #b45309;
}
.sla-flag--late {
  color: #b91c1c;
}
.sla-flag--none {
  color: var(--muted);
}
.sla-panel .detail-list dd .muted {
  display: block;
  font-size: 11px;
}
.sla-panel__alert {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
  font-size: 12px;
}

/* Destaque de itens fora do prazo nas listagens. */
.data-table tr.is-overdue td {
  background: rgba(185, 28, 28, 0.04);
}
.data-table tr.is-overdue td:first-child {
  box-shadow: inset 3px 0 0 #b91c1c;
}
.checkbox-inline.is-active {
  color: var(--ink);
  font-weight: 600;
}
.checkbox-inline .cf-badge {
  margin-left: 4px;
}
.form-actions.padded-0 {
  padding: 0;
}

.primary-button.danger,
.secondary-button.danger,
.danger-button {
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.25);
}
.primary-button.danger:hover,
.secondary-button.danger:hover,
.danger-button:hover {
  background: rgba(185, 28, 28, 0.14);
}
.prose {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prose p {
  margin: 0 0 6px;
}
.prose p:last-child {
  margin-bottom: 0;
}

/* ============ Formulários (tickets/tarefas) ============ */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.form-field label small {
  font-weight: 400;
  color: var(--muted);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
}
.form-field textarea {
  resize: vertical;
}
.field-error {
  color: #b91c1c;
  font-size: 12px;
  margin-top: -10px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.form-actions.padded {
  margin-top: 18px;
}
.form-actions .primary-button,
.form-actions .secondary-button {
  margin: 0;
}
.inline-form + .inline-form {
  margin-top: 6px;
}

/* ============ Etiquetas marcadoras (intercom) ============ */
.sidebar-list-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-elevated);
  border-radius: 999px;
  padding: 1px 6px;
}
.sidebar-quick-create summary {
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  color: var(--muted);
  padding: 0 4px;
}
.sidebar-quick-create summary::-webkit-details-marker {
  display: none;
}
.sidebar-quick-create summary:hover {
  color: var(--ink);
}
.inline-create-form {
  position: absolute;
  top: 26px;
  right: 8px;
  z-index: 30;
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.sidebar-section {
  position: relative;
}

/* Menu recolhido: o formulário rápido de etiqueta vira modal centralizado,
   porque a sidebar estreita corta o popup. */
@media (min-width: 1025px) {
  html.cf-sidebar-collapsed .sidebar-quick-create[open]::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 290;
    background: rgb(0 0 0 / 0.45);
    pointer-events: none;
  }

  html.cf-sidebar-collapsed .sidebar-quick-create[open] .inline-create-form {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: min(360px, calc(100vw - 40px));
    padding: 18px;
    gap: 10px;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 300;
  }

  html.cf-sidebar-collapsed .sidebar-quick-create[open] .inline-create-form input[type="text"] {
    padding: 10px 12px;
    font-size: 13px;
  }

  html.cf-sidebar-collapsed .sidebar-quick-create[open] .inline-create-row {
    justify-content: flex-end;
    gap: 12px;
  }
}

/* Cabeçalho e ações do formulário rápido de etiqueta */
.inline-create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.inline-create-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.inline-create-close:hover {
  color: var(--ink);
  background: var(--soft);
}

.inline-create-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inline-create-row .inline-create-cancel {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.inline-create-row .inline-create-cancel:hover {
  color: var(--ink);
  background: var(--soft);
}

.inline-create-form input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
}
.inline-create-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.inline-create-color {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}
.inline-create-color input[type="color"] {
  width: 26px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  background: none;
}
.inline-create-row button {
  border: 0;
  border-radius: 7px;
  background: var(--blue, #2563eb);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
}
.intercom-tag-filter-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-elevated) 60%, transparent);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  margin: 10px 12px 0;
}
.intercom-tag-filter-notice a {
  color: var(--blue, #2563eb);
  text-decoration: none;
  margin-left: auto;
}
.intercom-tag-filter-notice a:hover {
  text-decoration: underline;
}
.intercom-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.intercom-tag-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--tag-color, #7c3aed);
  border: 1px solid color-mix(in srgb, var(--tag-color, #7c3aed) 45%, transparent);
  background: color-mix(in srgb, var(--tag-color, #7c3aed) 9%, transparent);
  border-radius: 999px;
  padding: 1px 8px;
}
.intercom-tag-tools {
  position: relative;
  display: inline-flex;
  margin-top: 6px;
}
.intercom-tag-toggle {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.intercom-tag-toggle:hover {
  color: var(--ink);
}
.intercom-tag-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  min-width: 190px;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.intercom-tag-menu form {
  margin: 0;
}
.intercom-tag-menu button {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  font-size: 12.5px;
  padding: 6px 8px;
  cursor: pointer;
}
.intercom-tag-menu button:hover {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.intercom-tag-menu button.active {
  font-weight: 700;
}
.intercom-tag-menu .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

/* ============ Compartilhar com cliente (intercom) ============ */
.intercom-share-tools {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
}
.intercom-share-tools .intercom-attachment-image,
.intercom-share-tools .intercom-attachment-file {
  margin: 0;
}
.share-copy {
  display: inline;
}
.intercom-share-menu {
  min-width: 260px;
  padding: 10px;
}
.intercom-share-menu form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.share-menu-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.share-menu-select,
.share-menu-note {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  background: var(--surface);
}
.share-menu-note {
  resize: vertical;
}
.share-menu-submit {
  border: 0;
  border-radius: 8px;
  background: var(--blue, #2563eb);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
}
.share-menu-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-bar .filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-bar input[type="date"] {
  min-width: 150px;
  padding: 6px 8px;
  border: 1px solid var(--field-border, var(--line));
  border-radius: 6px;
  background: var(--field-bg, var(--surface));
  color: var(--field-text, var(--ink));
  font: inherit;
}

.filter-bar select {
  min-width: 190px;
}

@media (max-width: 640px) {
  .filter-bar .filter-group {
    width: 100%;
  }

  .filter-bar input[type="date"],
  .filter-bar select {
    width: 100%;
    min-width: 0;
  }
}

/* ==== Relatórios: gráficos ==== */
.chart-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.chart-card {
  background: var(--surface-elevated, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 10px);
  padding: 18px;
  box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,.04));
  flex: 1;
}

.chart-card h2 {
  font-size: 12px;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted, #64748b);
}

.chart-wrapper {
  position: relative;
  height: 280px;
  width: 100%;
}

@media (max-width: 1024px) {
  .chart-row { flex-direction: column; }
  .chart-wrapper { height: 240px; }
}

/* Painel de recursos da conversa: um divisor por seção.
   O chatforce.css já usa border-bottom; o border-top daqui criava linha dupla. */
.context-panel .context-section {
  border-top: 0;
}

/* --- Ações rápidas do painel de recursos da conversa --- */
.ticket-status-select,
.proposal-status-select,
[data-ticket-quick-status] {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--chatforce-line);
  background: var(--field-bg, var(--chatforce-panel-2));
  color: var(--chatforce-text);
  max-width: 130px;
}

.ticket-status-select.is-saved,
.proposal-status-select.is-saved {
  outline: 2px solid var(--brand-500, #22c55e);
  outline-offset: 1px;
}

.ticket-quick-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ticket-quick-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.ticket-quick-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--chatforce-muted);
}

.ticket-quick-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--chatforce-line);
  border-radius: 8px;
  padding: 10px;
}

.ticket-quick-reply {
  border-bottom: 1px solid var(--chatforce-line-soft);
  padding-bottom: 6px;
}

.ticket-quick-reply:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ticket-quick-reply strong {
  font-size: 12px;
}

.ticket-quick-reply small {
  margin-left: 6px;
  color: var(--chatforce-muted);
  font-size: 10px;
}

.ticket-quick-reply p {
  margin: 2px 0 0;
  font-size: 13px;
  white-space: pre-wrap;
}

/* ============================================================
   Campanhas em Massa (marketing) — KPIs, analítico e jornadas
   ============================================================ */
.campaign-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  padding: 0 24px 18px;
}
.kpi-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.kpi-card .kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--soft);
  color: var(--brand-600);
  flex: 0 0 auto;
}
.kpi-card .kpi-meta { display: flex; flex-direction: column; min-width: 0; }
.kpi-card .kpi-value { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.15; }
.kpi-card .kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kpi-card--ok .kpi-icon { color: #16a34a; background: rgba(22, 163, 74, .12); }
.kpi-card--warn .kpi-icon { color: #f59e0b; background: rgba(245, 158, 11, .12); }
.kpi-card--info .kpi-icon { color: #0ea5e9; background: rgba(14, 165, 233, .12); }
.kpi-card--revenue .kpi-icon { color: #a855f7; background: rgba(168, 85, 247, .12); }
.kpi-card--danger .kpi-icon { color: #ef4444; background: rgba(239, 68, 68, .12); }

.campaign-section { padding: 0 24px 22px; }
.campaign-section > h2 { font-size: 15px; margin: 0 0 12px; color: var(--ink); }
.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.chart-grid--even { grid-template-columns: 1fr 1fr; }
.campaign-section .chart-card { display: flex; flex-direction: column; }
@media (max-width: 900px) { .chart-grid, .chart-grid--even { grid-template-columns: 1fr; } }

.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 120px 1fr 72px; align-items: center; gap: 10px; }
.funnel-row .funnel-label { font-size: 12px; color: var(--muted); }
.funnel-bar-track { background: var(--soft); border-radius: 999px; height: 16px; overflow: hidden; }
.funnel-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-500, #6366f1), #22d3ee); transition: width .4s ease; }
.funnel-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); font-size: 13px; }
.funnel-pct { font-size: 11px; color: var(--muted); text-align: right; }

/* ---- Construtor de jornadas (canvas) ---- */
.jf-shell { display: flex; flex-direction: column; gap: 10px; }
.jf-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jf-toolbar .jf-spacer { margin-left: auto; }
.jf-canvas {
  position: relative;
  height: 640px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface-elevated);
  background-image: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0);
  background-size: 22px 22px;
  touch-action: none;
}
.jf-viewport { position: absolute; inset: 0; transform-origin: 0 0; }
.jf-svg { position: absolute; left: 0; top: 0; width: 6000px; height: 4000px; pointer-events: none; overflow: visible; }
.jf-edge { fill: none; stroke: var(--line-strong, #94a3b8); stroke-width: 2; }
.jf-edge--true { stroke: #16a34a; }
.jf-edge--false { stroke: #ef4444; }
.jf-edge-temp { fill: none; stroke: var(--brand-600, #6366f1); stroke-width: 2; stroke-dasharray: 5 4; }
.jf-node {
  position: absolute;
  width: 224px;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  user-select: none;
  cursor: grab;
}
.jf-node.selected { border-color: var(--brand-600, #6366f1); box-shadow: 0 0 0 2px rgba(99, 102, 241, .25), var(--shadow-lg); }
.jf-node-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--ink); }
.jf-node-head i { color: var(--brand-600, #6366f1); }
.jf-node-head .jf-node-type { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 11px; }
.jf-node-body { padding: 8px 12px; font-size: 12px; color: var(--muted); min-height: 20px; word-break: break-word; }
.jf-node-body .jf-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 11px; }
.jf-port { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--brand-600, #6366f1); border: 2px solid var(--surface-elevated); }
.jf-port--in { left: -8px; top: 50%; transform: translateY(-50%); }
.jf-port--out { right: -8px; top: 50%; transform: translateY(-50%); background: #0ea5e9; cursor: crosshair; }
.jf-port--out.jf-port--true { top: 34%; background: #16a34a; }
.jf-port--out.jf-port--false { top: 70%; background: #ef4444; }
.jf-port-label { position: absolute; right: 12px; font-size: 9px; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.jf-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; pointer-events: none; }

.jf-modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.jf-modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--surface-elevated); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.jf-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.jf-modal-header h3 { margin: 0; font-size: 15px; color: var(--ink); }
.jf-modal-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.jf-modal-body label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.jf-modal-body input, .jf-modal-body select, .jf-modal-body textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--field-border, var(--line)); border-radius: 7px;
  background: var(--field-bg, var(--surface)); color: var(--field-text, var(--ink)); font-size: 13px;
}
.jf-modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.jf-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.jf-palette button { text-align: left; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-elevated); color: var(--ink); cursor: pointer; font-size: 12px; }
.jf-palette button:hover { border-color: var(--brand-600, #6366f1); }

@media (max-width: 700px) {
  .campaign-kpis { grid-template-columns: 1fr 1fr; padding: 0 14px 14px; }
  .campaign-section { padding: 0 14px 18px; }
  .funnel-row { grid-template-columns: 90px 1fr 56px; }
  .jf-canvas { height: 520px; }
}

.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.row-actions form { display: inline; margin: 0; }

.jf-node-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: none;
  gap: 2px;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  box-shadow: var(--shadow);
}
.jf-node:hover .jf-node-actions,
.jf-node.selected .jf-node-actions { display: flex; }
.jf-node-actions button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.jf-node-actions button:hover { background: var(--soft); color: var(--ink); }
.jf-node-actions button[data-jf-act="delete"]:hover { background: rgba(239, 68, 68, .12); color: #ef4444; }

.jf-token-row { display: flex; gap: 6px; align-items: center; }
.jf-token-row input { flex: 1 1 auto; }
.jf-token-row select { flex: 0 0 auto; width: auto; max-width: 150px; }
.jf-token-row .secondary-button { flex: 0 0 auto; white-space: nowrap; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 0 24px 20px; }
.media-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-elevated); box-shadow: var(--shadow); }
.media-card img { width: 100%; height: 120px; object-fit: cover; display: block; background: var(--soft); }
.media-card .media-file { height: 120px; display: grid; place-items: center; font-size: 34px; color: var(--muted); background: var(--soft); }
.media-meta { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.media-meta strong { font-size: 12px; color: var(--ink); }
.media-meta small { font-size: 11px; color: var(--muted); }
.media-actions { display: flex; gap: 10px; padding: 6px 10px 10px; }
.media-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 220px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; }
.media-picker label { display: flex; flex-direction: column; gap: 4px; align-items: center; cursor: pointer; font-size: 10px; color: var(--muted); text-align: center; padding: 6px; border: 1px solid transparent; border-radius: 8px; }
.media-picker label:hover { border-color: var(--line-strong, var(--line)); }
.media-picker input { accent-color: var(--brand-600, #6366f1); }
.media-picker img { width: 100%; height: 60px; object-fit: cover; border-radius: 6px; }
.media-picker .media-file-sm { height: 60px; width: 100%; display: grid; place-items: center; font-size: 22px; color: var(--muted); background: var(--soft); border-radius: 6px; }
.cta-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; margin-bottom: 6px; }
.utm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.composer-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.composer-toolbar2 { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.composer-toolbar2 .format-btn { min-width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-elevated); color: var(--ink); cursor: pointer; }
.composer-toolbar2 .format-btn:hover { border-color: var(--brand-600, #6366f1); }
.emoji-pop2 { position: absolute; z-index: 70; width: 320px; max-height: 300px; overflow: auto; background: var(--surface-elevated); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px; }
.emoji-pop2 .emoji-search { width: 100%; margin-bottom: 6px; }
.emoji-pop2 .emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-pop2 .emoji-grid button { border: none; background: transparent; font-size: 20px; cursor: pointer; border-radius: 6px; padding: 3px; }
.emoji-pop2 .emoji-grid button:hover { background: var(--soft); }
.emoji-pop2 h5 { margin: 8px 2px 4px; font-size: 11px; text-transform: uppercase; color: var(--muted); }

.jf-palette button span { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.jf-palette button small { color: var(--muted); font-size: 10px; font-weight: 400; }
.jf-node-help { margin: 0 0 10px; }
.jf-node-head { cursor: help; }

.jf-edge--jump { stroke: #0ea5e9 !important; stroke-dasharray: 6 4; }

.jf-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.jf-tab { border: 1px solid var(--line); background: var(--surface-elevated); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.jf-tab:hover { border-color: var(--brand-600, #6366f1); color: var(--ink); }
.jf-tab.active { background: var(--brand-600, #6366f1); border-color: var(--brand-600, #6366f1); color: #fff; }

.sidebar-nav .nav-group-title { display: block; padding: 8px 12px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.jf-canvas:fullscreen { width: 100vw; height: 100vh; border-radius: 0; }
.jf-canvas--expanded { position: fixed; inset: 0; z-index: 95; width: 100vw; height: 100vh; border-radius: 0; }

.jf-shell:fullscreen { display: flex; flex-direction: column; gap: 10px; width: 100vw; height: 100vh; padding: 14px; background: var(--surface-elevated); overflow: hidden; }
.jf-shell:fullscreen .jf-canvas { flex: 1 1 auto; height: auto; }
.jf-shell--expanded { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface-elevated); overflow: hidden; }
.jf-shell--expanded .jf-canvas { flex: 1 1 auto; height: auto; }
.jf-schedule div[data-sched-delay], .jf-schedule div[data-sched-at] { display: flex; gap: 10px; flex-wrap: wrap; }
