/* ===== Simulador de conversacion ===== */
.sim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  padding: 16px;
  max-width: 1120px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 900px) {
  .sim-layout { grid-template-columns: 1fr; }
  .sim-side { order: -1; }
}

.chat {
  display: flex;
  flex-direction: column;
  height: min(78vh, 720px);
  overflow: hidden;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7fafb;
  border-radius: var(--radius) var(--radius) 0 0;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
}
.chat-header strong { display: block; font-size: 14px; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f0f4f5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06);
  font-size: 14.5px;
}
.bubble.in { background: var(--bubble-in); align-self: flex-start; border-top-left-radius: 4px; }
.bubble.out { background: var(--bubble-out); align-self: flex-end; border-top-right-radius: 4px; }
.bubble .time { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; text-align: right; }
.bubble.system {
  align-self: center;
  background: #fff8ec;
  color: #92400e;
  font-size: 12.5px;
  max-width: 90%;
  text-align: center;
}

.quick-replies {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 14px 0;
  background: #f0f4f5;
}
.quick-replies button {
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}
.quick-replies button:hover { background: var(--brand-soft); }

.composer {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
}
.composer input {
  flex: 1; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 14px; font-size: 14px; outline: none;
}
.composer input:focus { border-color: var(--brand); }
.composer button {
  border: none; background: var(--brand); color: #fff;
  border-radius: 50%; width: 40px; height: 40px; font-size: 16px;
}
.composer button:hover { background: var(--brand-dark); }

.sim-side .card { padding: 14px; margin-bottom: 12px; }
.sim-side h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 4px 8px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.typing { font-size: 12px; color: var(--muted); padding: 0 14px 6px; background: #f0f4f5; min-height: 18px; }
.notice { font-size: 12px; background: #fff8ec; border: 1px solid #f0d5a8; color: #92400e; padding: 8px 10px; border-radius: 8px; }
