/* ── Modal inbox ─────────────────────────────────────────── */
.aviso-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--surface);
}
.aviso-item.nao-lido {
  border-color: rgba(90,180,255,.5);
  background: rgba(90,180,255,.05);
  border-left: 3px solid var(--info, #5ab4ff);
}
.aviso-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.aviso-meta {
  font-size: .78rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.aviso-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--info, #5ab4ff);
  margin-right: 4px;
}
.aviso-msg {
  padding: 8px 12px;
  background: var(--surface-2);
  border-left: 3px solid var(--border);
  border-radius: 4px;
  font-size: .92rem;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.aviso-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* ── Lista de conversas (novo modelo de inbox) ─────────────── */
.conv-list { display: flex; flex-direction: column; gap: 4px; }
.conv-list-header {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.conv-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.conv-card:hover { border-color: var(--accent); background: var(--surface-2); }
.conv-card.nao-lido {
  border-left: 3px solid var(--info, #5ab4ff);
  background: rgba(90,180,255,.05);
}
.conv-card-main { flex: 1; min-width: 0; }
.conv-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.conv-card-head strong { color: var(--text-strong); }
.conv-card-time { font-size: .75rem; color: var(--muted); }
.conv-card-preview {
  font-size: .85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.conv-card-from { font-weight: 700; color: var(--text); margin-right: 4px; }
.conv-card-sub {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 2px;
}
.conv-card-outro { font-weight: 600; }

/* Linhas de destinatário (picker passo 2) */
.dest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: border-color .15s, background .15s;
}
.dest-row:hover { border-color: var(--accent); background: var(--surface-2); }
.dest-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.dest-row-info { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dest-row-info strong { color: var(--text-strong); }
.conv-card-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--info, #5ab4ff);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Chat ─────────────────────────────────────────────────── */
.chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.chat-header .team-chip { margin-left: auto; }
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 4px 4px 12px;
  scroll-behavior: smooth;
}
.chat-bubble {
  max-width: 78%;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: .92rem;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
  display: inline-flex;
  flex-direction: column;
  min-width: 80px;
}
.chat-bubble.mine {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-from {
  font-size: .7rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 3px;
}
.chat-bubble.mine .chat-from { color: rgba(255,255,255,.85); }
.chat-time {
  font-size: .7rem;
  color: var(--muted);
  margin-top: 4px;
  text-align: right;
  align-self: flex-end;
}
.chat-bubble.mine .chat-time { color: rgba(255,255,255,.75); }
.chat-input {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.chat-input textarea {
  flex: 1;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-strong);
  font-family: inherit;
  font-size: .92rem;
  resize: none;
  outline: none;
  transition: border-color .15s;
}
.chat-input textarea:focus { border-color: var(--accent); }
.chat-input button {
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
}
.freq-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.freq-status-dot.alerta { background: var(--warn, #ef4444); }
.freq-status-dot.ok { background: #16a34a; }

/* Modal detalhes frequência */
.freq-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.freq-detail-eventos { display: flex; flex-direction: column; gap: 8px; }
.freq-detail-evento {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.freq-detail-evento-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.freq-detail-evento-title { font-weight: 700; }
.freq-detail-evento-date { font-size: 12px; color: var(--muted); }
.freq-detail-disp {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.freq-detail-disp.ambos   { background: rgba(34,197,94,.15);  color: #16a34a; }
.freq-detail-disp.manha   { background: rgba(245,158,11,.15); color: #b45309; }
.freq-detail-disp.noite   { background: rgba(99,102,241,.15); color: #4f46e5; }
.freq-detail-disp.ausente { background: rgba(239,68,68,.15);  color: var(--warn, #ef4444); }
/* faltou = líder marcou ausência; mais forte que "ausente" (nem foi escalado) */
.freq-detail-disp.faltou  { background: rgba(239,68,68,.9);   color: #fff; }
.freq-detail-obs {
  font-size: 13px;
  color: var(--text);
  margin-top: 6px;
  padding-left: 8px;
  border-left: 2px solid var(--border);
}

