/* MODALS */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 1000; display: none;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 560px; max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--surface); z-index: 10;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-subtitle { font-size: 12px; color: var(--text3); margin-top: 2px; }
.modal-close {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--surface3); color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  position: sticky; bottom: 0; background: var(--surface);
}

/* CHAT */
.chat-messages {
  flex: 1; padding: 16px 20px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-msg-in {
  display: flex; justify-content: flex-start;
}
.chat-msg-out {
  display: flex; justify-content: flex-end;
}
.chat-bubble-in {
  max-width: 75%; background: var(--surface2);
  padding: 10px 14px; border-radius: 12px 12px 12px 2px;
  font-size: 13px; line-height: 1.5; border: 1px solid var(--border);
}
.chat-bubble-out {
  max-width: 75%; background: rgba(79,124,255,0.15);
  padding: 10px 14px; border-radius: 12px 12px 2px 12px;
  font-size: 13px; line-height: 1.5; border: 1px solid rgba(79,124,255,0.3);
}
.chat-time { font-size: 10px; color: var(--text3); margin-top: 4px; }
.chat-input-row {
  padding: 12px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center;
}
